Set Kernel Runtime Parameters Flashcards

1
Q

Set Kernel Runtime Parameter

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Most useful sysctl Tunables

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly