26 Chapter 2. The /proc File System
occasionally compiled for particular architectures, this value tells you which package to install on
the system.
• model name — Gives you the popular name of the processor, including its project name.
• cpu MHz — Shows the precise speed in megahertz of that particular processor (in thousandths).
• cache size — Tells you the amount of level 2 memory cache available to the processor.
• flags — Defines a number of different qualities about the processor, such as the presence of a
floating point unit (FPU) and the ability to process MMX instructions.
2.2.4. /proc/devices
This file displays the various character and block devices currently configured for use with the kernel.
It does not include modules that are available but not loaded into the kernel. Below is a sample output
from this virtual file:
Character devices:
1 mem
2 pty
3 ttyp
4 ttyS
5 cua
7 vcs
10 misc
14 sound
29 fb
36 netlink
128 ptm
129 ptm
136 pts
137 pts
162 raw
254 iscsictl
Block devices:
1 ramdisk
2 fd
3 ide0
9 md
22 ide1
The output from /proc/devices includes the major number and name of the device.
Character devices are similar to block devices, except for two basic differences.
Block devices have a buffer available, allowing them to order requests before dealing with them. This
is important for devices designed to store information — such as hard drives — because the ability
to order the information before writing it to the device allows it to be placed in more efficient order.
Character devices do not require buffering.
The other difference is that block devices can send and receive information in blocks of a size config-
ured per device. Character devices send data with no preconfigured size.
For more information about devices see /usr/src/linux-2.4/Documentation/devices.txt.
Commenti su questo manuale