Directories in /proc
Every /proc directory contains quite a few directories named with a number. A listing of them starts off like this
These directories are called process directories, as they refer to a process’s ID and contain information 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.
total 0
dr-xr-xr-x 7 root root 0 2010-07-02 21:37 1
dr-xr-xr-x 7 root root 0 2010-07-02 21:37 10
dr-xr-xr-x 7 root root 0 2010-07-02 21:37 1066
dr-xr-xr-x 7 root root 0 2010-07-02 21:37 11
dr-xr-xr-x 7 root root 0 2010-07-02 21:37 12
dr-xr-xr-x 7 root root 0 2010-07-02 21:37 13
dr-xr-xr-x 7 root root 0 2010-07-02 21:37 14
dr-xr-xr-x 7 root root 0 2010-07-02 21:37 15
dr-xr-xr-x 7 root root 0 2010-07-02 21:37 16
Common groups of information concerning the kernel is grouped into directories and sub-directories within /proc.
Each of the process directories contains the following files:
cmdline — Contains the command line arguments that started the process.
cwd — A link to the current working directory for the process.
cpu — Provides specific information about the utilization of each of the system’s CPUs.
environ — Gives a list of the environment variables for the process.
exe — A link to the executable of this process.
fd — A directory containing all of the file descriptors for a particular process.
maps — Contains memory maps to the various executables and library files associated with this process.
mem — The memory held by the process.
root — A link to the root directory of the process.
stat — A status of the process.
statm — A status of the memory in use by the process.
status — Provides the status of the process in a form that is much more readable than stat or statm.
Leave a Reply
You must be logged in to post a comment.