In unix/linux, what is the proc directory for? why does it exists?
What can I use it for (if not just for the system)?
|
In unix/linux, what is the proc directory for? why does it exists? What can I use it for (if not just for the system)? |
|||||||||||
|
Examples:
|
|||
|
|
|
Its main use is for debuggers and other diagnostic programs. For example, "top" and "ps" examine its contents to determine what processes are running. gdb and such like, also use proc (also ptrace system call) to examine the process's memory. Additionally it provides some system-wide information (uptime, version etc) which may be useful for some programs. And a bunch of other things - for example the "sysctl" kernel tunable parameters are in /proc/sys. |
|||
|
|
|
From the proc man page:
|
|||
|
|