13 01:28 637 dr-xr-xr-x 3 rpcuser rpcuser 0 Feb 13 01:28 666
These directories are called process directories, as they are named after a program's process
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.
Each process directory contains the following files:
•
cmdline
— Contains the command issued when starting the process.
•
cwd
— A symbolic link to the current working directory for the process.
•
environ
— A list of the environment variables for the process. The environment variable is
given in all upper-case characters, and the value is in lower-case characters.
•
exe
— A symbolic link to the executable of this process.
•
fd
— A directory containing all of the file descriptors for a particular process. These are given
in numbered links:
total 0 lrwx------ 1 root root 64 May 8 11:31 0 -> /dev/null lrwx------ 1
root root 64 May 8 11:31 1 -> /dev/null lrwx------ 1 root root 64 May 8
11:31 2 -> /dev/null lrwx------ 1 root root 64 May 8 11:31 3 -> /dev/ptmx
lrwx------ 1 root root 64 May 8 11:31 4 -> socket:[7774817] lrwx------ 1
root root 64 May 8 11:31 5 -> /dev/ptmx lrwx------ 1 root root 64 May 8
11:31 6 -> socket:[7774829] lrwx------ 1 root root 64 May 8 11:31 7 ->
/dev/ptmx
•
maps
— A list of memory maps to the various executables and library files associated with this
process. This file can be rather long, depending upon the complexity of the process, but
sample output from the
sshd
process begins like the following:
08048000-08086000 r-xp 00000000 03:03 391479 /usr/sbin/sshd
08086000-08088000 rw-p 0003e000 03:03 391479 /usr/sbin/sshd
08088000-08095000 rwxp 00000000 00:00 0 40000000-40013000 r-xp 00000000
03:03 293205 /lib/ld-2.2.5.so 40013000-40014000 rw-p 00013000 03:03 293205
/lib/ld-2.2.5.so 40031000-40038000 r-xp 00000000 03:03 293282
/lib/libpam.so.0.75 40038000-40039000 rw-p 00006000 03:03 293282
/lib/libpam.so.0.75 40039000-4003a000 rw-p 00000000 00:00 0
4003a000-4003c000 r-xp 00000000 03:03 293218 /lib/libdl-2.2.5.so
4003c000-4003d000 rw-p 00001000 03:03 293218 /lib/libdl-2.2.5.so
•
mem
— The memory held by the process. This file cannot be read by the user.
•
root
— A link to the root directory of the process.
Chapter 5. The proc File System
66
Summary of Contents for ENTERPRISE LINUX 4.5.0 -
Page 1: ...Red Hat Enterprise Linux 4 5 0 4 5 0 Reference Guide ISBN N A Publication date ...
Page 2: ...Red Hat Enterprise Linux 4 5 0 ...
Page 4: ...Red Hat Enterprise Linux 4 5 0 ...
Page 24: ...xxiv ...
Page 26: ......
Page 36: ...12 ...
Page 72: ...48 ...
Page 112: ...88 ...
Page 122: ...98 ...
Page 140: ...116 ...
Page 142: ......
Page 300: ...276 ...
Page 318: ...294 ...
Page 320: ......
Page 332: ...308 ...
Page 350: ...326 ...
Page 378: ...354 ...
Page 388: ...364 ...
Page 394: ...370 ...
Page 395: ...Part IV Appendixes ...
Page 396: ......