Managing kernel parameters

To list all kernel parameters

[root@instance-1 ~]# sysctl -a
abi.vsyscall32 = 1
crypto.fips_enabled = 0
debug.exception-trace = 1
debug.kprobes-optimization = 1
dev.hpet.max-user-freq = 64
dev.mac_hid.mouse_button2_keycode = 97
dev.mac_hid.mouse_button3_keycode = 100

ex:

[root@instance-1 ~]# cat /proc/sys/fs/file-max
373992

[root@instance-1 ~]# sysctl -a |grep fs.file-max
fs.file-max = 373992

[root@instance-1 ~]# sysctl -w fs.file-max=380000
fs.file-max = 380000

[root@instance-1 ~]# sysctl -q fs.file-max
fs.file-max = 380000

[root@instance-1 ~]# sysctl -a |grep fs.file-max
fs.file-max = 380000

[root@instance-1 ~]# sysctl -p

[root@instance-1 ~]# sysctl -a |grep net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 32768 60999

sysctl -p /etc/sysctl.conf

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s