Set Kernel Runtime Parameters Flashcards Preview

RHCE > Set Kernel Runtime Parameters > Flashcards

Flashcards in Set Kernel Runtime Parameters Deck (2):
1

Set Kernel Runtime Parameter

cd /proc/sys/kernel

Check all kernel parameters
sysctl -a | grep kernel

Change runtime parameter non-persistently
sysctl -w kernel.sysrq=32
or
echo "48" > /proc/sys/kernel/sysrq

Sets system level variables:
cd /usr/lib/sysctl.d/


Persistently set Kernel Parameters:
vim /etc/sysctl.conf
kernel.threads-max = 7550

To load new values for the sysctl.conf file:

sysctl -p /etc/sysctl.conf

2

Most useful sysctl Tunables

net.ipv4.ip_forward = Set to 1 to enable packet forwarding network interfaces(/sys/proc/net/ipv4/ip_forward)

net.ipv4.icmp_echo_ignore_all = Set to 1 to disable ping (/sys/proc/net/ipv4/icmp_echo_ignore_all)

net.ipv4.icmp_echo_ignore_broadcasts = Set to 1 to disable broadcast ping (/sys/proc/net/ipv4/icmp_echo_ignore_broadcasts)

vm.swappiness = Use a value between 0 and 100 to increase the willingness of your server to swap data

kernel.hostname = set the hostname of this system