The /proc file system contains a directory entry for each process running on the
system.
The name of each directory is the process ID of the corresponding process.
Each process directory contains these entries:
cmdline contains the argument list for the process.
The command line may be blank for zombie processes and the arguments might not be available if the process is swapped out.
You can take a quick look at what is running on your system by issuing the following command:
$ strings -f /proc/[0-9]*/cmdline
cwd is a symbolic link that points to the inode for the current working directory of the process.
cpu entry appears only on SMP Linux kernels. It contains a breakdown of process time (user and system) by CPU.
environ contains the process's environment.
exe is a symbolic link that points to the executable image running in the process. This could also point to a script that is being executed or the executable processing it, depending on the nature of the script.
fd is a subdirectory that contains entries for the file descriptors opened by the process as a symbolic link to the actual file's inode.
Opening the file descriptor entry (for example, /proc/self/fd/1) opens the file itself; if the file is a terminal or other special device, it may interfere with the process itself by stealing data.
maps displays information about files mapped into the process's address. For each mapped file, maps displays the range of addresses in the process's address space into which the file is mapped, the permissions on these addresses, the name of the file, and other information.
The maps table for each process displays the executable running in the process, any loaded shared libraries, and other files that the process has mapped in.
root is a symbolic link to the root directory for this process. Usually, this is a symbolic link to /, the system root directory. (chroot)
stat contains lots of status and statistical information about the process. These are the same data as presented in the status entry, but in raw numerical format,
all on a single line.
statm contains information about the memory used by the process.
The variable names, in order, used in array.c are size, resident, share, trs, lrs, drs, and dt.
These give the total size (including code, data, and stack), resident set size, shared pages, text pages, stack pages, and dirty pages.
status contains lots of status and statistical information about the process, formatted to be comprehensible by humans. It includes the name, state, process id, parent process id, uids and group ids (including real, effective, and saved ids), virtual memory statistics, and signal masks.
mem entry can be used to access the memory image of a particular process.
The source file /usr/src/linux/fs/proc/array.c seems to have most of the routines that actually generate /proc output for the per process entries.