Chapter 2. The
proc
File System
45
controller is communicating with the CD ROM at 20 megabytes per second, while the tape drive is
only connected at 10 megabytes per second.
2.3.9.
/proc/sys/
The
/proc/sys/
directory is different from others in
/proc/
because it not only provides informa 
tion about the system but also allows you to make configuration changes to the kernel. This allows the
administrator of the machine to immediately enable and disable kernel features.
Warning
Use caution when changing settings on a production system using the various files in the /proc/sys/
directory. Changing the wrong setting may render the kernel unstable, requiring a reboot of the sys 
tem.
For this reason, be sure you know the valid options for that file and the expected outcome before
attempting to change a value in /proc/sys/.
A good way to determine if a particular file can configured or is only designed to provide information
is to list it with the  l flag in the terminal. If the file is writable, you may use it to configure the kernel.
For example, a partial listing of
/proc/sys/fs
looks like this:
 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
 r  r  r  
1 root
root
0 May 10 16:14 dquot nr
 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
In this listing, the files
dir notify enable
and
file max
can be written to and, therefore, can be
used to configure the kernel. The other files only provide feedback on current settings.
Changing a value within a
/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
This will change the
sysrq
file's value from
0
(off) to
1
(on).
The purpose of the System Request Key is to allow you to immediately instruct the kernel to do
a number of important activities by using a simple key combination, such as immediately shutting
down or restarting a system, syncing all mounted file systems, or dumping important information to
your console. This feature is most useful when using a development kernel or if you are experiencing
system freezes. However, it is considered a security risk for an unattended console and is therefore
turned off by default under Red Hat Linux.
Refer to
/usr/src/linux 2.4/Documentation/sysrq.txt
for more information on the System
Request Key.
A few
/proc/sys/
configuration files contain more than one value. In order to correctly send new
values to them, place a space character between each value passed with the
echo
command, such as
is done in this example:
echo 4 2 45 > /proc/sys/kernel/acct






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

tomcat hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved