78
This information is used for a variety of purposes, including providing the version data at the standard
login prompt.
4.3 Directories in /proc
Common groups of information concerning the kernel is grouped into directories and sub-directories
within /proc.
4.3.1 Process Directories
Every /proc directory contains quite a few directories named with a number. A listing of them starts
off like this:
[root@bleach /]# ls -l /proc
total 0
dr-xr-xr-x
dr-xr-xr-x
dr-xr-xr-x
dr-xr-xr-x
dr-xr-xr-x
dr-xr-xr-x
dr-xr-xr-x
dr-xr-xr-x
dr-xr-xr-x
[root@bleach /]#
These directories are called process directories, as they refer to a process's ID and contain informa-
tion specific to that process. The owner and group of each process directory is set to the user running
the process. When the process is terminated, its /proc process directory vanishes. However, while
the process is running, a great deal of information specific to that process is contained in the process
directory's various files.
Each of the process directories contains the following files:
•
cmdline — Contains the command line arguments that started the process. The output of cmd-
line file for the sshd process looks like this:
/usr/sbin/sshd
•
cpu — Provides specific information about the utilization of each of the system's CPUs. A
process running on a dual CPU system produces output similar to this:
cpu
cpu0 0 0
cpu1 11 3
•
cwd — A link to the current working directory for the process.
3 root
3 truk
3 root
3 rpc
3 rpcuser
3 root
3 daemon
3 root
3 xfs
11 3
root
0 May
truk
0 May
root
0 May
rpc
0 May
rpcuser
0 May
root
0 May
daemon
0 May
root
0 May
xfs
0 May
Chapter 4:The /proc Filesystem
8 10:56 1
8 10:56 1038
8 10:56 518
8 10:56 532
8 10:56 547
8 10:56 7
8 10:56 708
8 10:56 8
8 10:56 880
Need help?
Do you have a question about the LINUX 7.2 and is the answer not in the manual?
Questions and answers