Download Red Hat Linux 7.3 The Official Red Hat Linux Reference Guide

Transcript
48
Chapter 2. The /proc File System
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. For more information on the System
Request Key, refer to /usr/src/linux-2.4/Documentation/sysrq.txt.
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
Note
Any configuration changes you make using the echo command will disappear when the system is
restarted. To make your configuration changes take effect at the time the system is booted, see
Section 2.4.
The /proc/sys/ directory contains several subdirectories controlling different aspects of a
running kernel.
2.3.8.1. /proc/sys/dev/
This directory provides parameters for particular devices on the system. Most systems have
at least two directories, cdrom and raid, but customized kernels can have others, such as
parport, which provides the ability to share one parallel port between multiple device
drivers.
The cdrom directory contains a file called info, which reveals a number of important CDROM parameters:
CD-ROM information, Id: cdrom.c 3.12 2000/10/18
drive name: hdc
drive speed: 32
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
This file can be quickly scanned to discover the qualities of an unknown CD-ROM, at least in
the eyes of the kernel. If multiple CD-ROMs are available on a system, each device is given
its own column of information.