/proc/sys/directory is different from others in
/proc/because it not only provides information about the system but also allows the system administrator to immediately enable and disable kernel features.
/proc/sys/directory. Changing the wrong setting may render the kernel unstable, requiring a system reboot.
-loption at the shell prompt. If the file is writable, it may be used to configure the kernel. For example, a partial listing of
/proc/sys/fslooks like the following:
-r--r--r-- 1 root root 0 May 10 16:14 dentry-state -rw-r--r-- 1 root root 0 May 10 16:14 dir-notify-enable -rw-r--r-- 1 root root 0 May 10 16:14 file-max -r--r--r-- 1 root root 0 May 10 16:14 file-nr
file-maxcan be written to and, therefore, can be used to configure the kernel. The other files only provide feedback on current settings.
/proc/sys/file is done by echoing the new value into the file. For example, to enable the System Request Key on a running kernel, type the command:
echo 1 > /proc/sys/kernel/sysrq
/proc/sys/configuration files contain more than one value. To correctly send new values to them, place a space character between each value passed with the
echocommand, such as is done in this example:
echo 4 2 45 > /proc/sys/kernel/acct
echocommand disappear when the system is restarted. To make configuration changes take effect after the system is rebooted, see Section E.4, “Using the sysctl Command”.
/proc/sys/directory contains several subdirectories controlling different aspects of a running kernel.
raid/. Customized kernels can have other directories, such as
parport/, which provides the ability to share one parallel port between multiple device drivers.
cdrom/directory contains a file called
info, which reveals a number of important CD-ROM parameters:
CD-ROM information, Id: cdrom.c 3.20 2003/12/17 drive name: hdc drive speed: 48 drive # of slots: 1 Can close tray: 1 Can open tray: 1 Can lock tray: 1 Can change speed: 1 Can select disk: 0 Can read multisession: 1 Can read MCN: 1 Reports media changed: 1 Can play audio: 1 Can write CD-R: 0 Can write CD-RW: 0 Can read DVD: 0 Can write DVD-R: 0 Can write DVD-RAM: 0 Can read MRW: 0 Can write MRW: 0 Can write RAM: 0
/proc/sys/dev/cdrom, such as
checkmedia, can be used to control the system's CD-ROM. Use the
echocommand to enable or disable these features.
/proc/sys/dev/raid/directory becomes available with at least two files in it:
speed_limit_max. These settings determine the acceleration of RAID devices for I/O intensive tasks, such as resyncing the disks.