0

we have linux machine redhat 6

when we print all paramers from /etc/sysctl.conf we see only ~20 but when we perform sysctl -a we see more then 200

so from where sysctl -a print all these parameters ?

or for example

when we do

 sysctl -w variable=value 

how to know where variable should be saved ?

second

how to know each parameters if this dynamic or static ?

1 Answer 1

2

The option -a of sysctl prints all available options as stated in the manual.

-a, --all Display all values currently available. 

These options come from the built-in or loaded Linux kernel modules. Some if not all modules provide some variables that can be tuned via sysctl. The /etc/sysctl.conf includes the variables that have been changed. Any variable uses its default value when not changed.

Please, note that there are multiple files to load system parameters like files under /etc/sysctl.d/.

If you want to know whether a variable can be changed or not, you can look at the corresponding file under /proc/sys. Some files (variables) are read-only while others can be read and written.

Here is an example of one changeable variable (1st one) and one read-only (second) from /proc/sys/kernel/

-rw-r--r-- 1 root root 0 Apr 4 10:23 shmmax -r--r--r-- 1 root root 0 Apr 4 10:14 version 
5
  • regarding - built-in or loaded Linux kernel modules , how to know the path of this modules , second how to know if variable is statis or dinamic ( dinamic is value that change ) Commented Apr 4, 2017 at 7:20
  • in my redhat machine we not have /etc/sysctl.d/ folder Commented Apr 4, 2017 at 7:22
  • do you know how to verify if kernel parameter is dynamic ? ( I mean the OS change this value ) Commented Apr 4, 2017 at 7:41
  • The kernel documentation on kernel.org/doc/Documentation typically explains the kernel runtime parameters, their default and accepted values. A google search site:www.kernel.org/doc/Documentation/ <parameter-name> is often the quickest to find the appropriate manual page. And anything not overruled from the locations explained in man sysctl or manually by an administrator with echo value > /proc/sys/section/module/parameter or similar should be at the default setting Commented Apr 4, 2017 at 7:41
  • yes but I am asking about howto know kernel parameter is dynamic ( that change according to the OS state ? ) Commented Apr 4, 2017 at 8:00

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.