Библиотека сайта rus-linux.net
| The Linux System Administrator's Guide: Version 0.7 | ||
|---|---|---|
| Prev | Chapter 4. Overview of the Directory Tree | Next |
4.7. The /proc filesystem
The /proc filesystem contains a
illusionary filesystem. It does not exist on a disk. Instead, the
kernel creates it in memory. It is used to provide information
about the system (originally about processes, hence the name). Some
of the more important files and directories are explained below.
The /proc filesystem is described in more
detail in the proc manual page.
/proc/1A directory with information about process number 1. Each process has a directory below
/procwith the name being its process identification number./proc/cpuinfoInformation about the processor, such as its type, make, model, and performance.
/proc/devicesList of device drivers configured into the currently running kernel.
/proc/dmaShows which DMA channels are being used at the moment.
/proc/filesystemsFilesystems configured into the kernel.
/proc/interruptsShows which interrupts are in use, and how many of each there have been.
/proc/ioportsWhich I/O ports are in use at the moment.
/proc/kcoreAn image of the physical memory of the system. This is exactly the same size as your physical memory, but does not really take up that much memory; it is generated on the fly as programs access it. (Remember: unless you copy it elsewhere, nothing under
/proctakes up any disk space at all.)/proc/kmsgMessages output by the kernel. These are also routed to syslog.
/proc/ksymsSymbol table for the kernel.
/proc/loadavgThe `load average' of the system; three meaningless indicators of how much work the system has to do at the moment.
/proc/meminfoInformation about memory usage, both physical and swap.
/proc/modulesWhich kernel modules are loaded at the moment.
/proc/netStatus information about network protocols.
/proc/selfA symbolic link to the process directory of the program that is looking at
/proc. When two processes look at/proc, they get different links. This is mainly a convenience to make it easier for programs to get at their process directory./proc/statVarious statistics about the system, such as the number of page faults since the system was booted.
/proc/uptimeThe time the system has been up.
/proc/versionThe kernel version.
Note that while the above files tend to be easily readable
text files, they can sometimes be formatted in a way that is not
easily digestible. There are many commands that do little more than
read the above files and format them for easier understanding. For
example, the free program reads
/proc/meminfo and converts the amounts given in
bytes to kilobytes (and adds a little more information, as
well).
