Some common Files in /proc
- pid/ holds information about process number pid. The kernel maintains a directory holding process information for every process
- pid/cmdline holds the command which was used to begin the process (using null characters to divided arguments)
- pid/environ holds a list of the environment variables which are available to the process
- pid/exe holds a link to the program which is running in the process
- pid/fd/ is a directory holding a link to each of the files in which the process has opened
- pid/mem holds the memory contents of the process
- pid/stat holds the process status information
- pid/statm holds the process memory usage information
The /proc file system is not a file system in the standard sense. The huge files found in /proc are the address spaces of running processes, only just the PID of the running processes. The owner and group owner of every file are the real-UID and primary group of the process's owner.
A sample listing from /proc is as given below
ls -l /proc
total 43384
-rw--- 1 root root 0 Apr 3 20:07 00000
-rw--- 1 root root 393216 Apr 3 20:07 00001
-rw--- 1 root root 0 Apr 3 20:07 00002
-rw--- 1 root root 0 Apr 3 20:07 00003
-rw--- 1 root root 1695744 Apr 3 20:07 00081
-rw--- 1 root root 1597440 Apr 3 20:07 00083
-rw--- 1 root root 1777664 Apr 3 20:08 00096