Skip to content

Instantly share code, notes, and snippets.

@hoox
Last active April 13, 2016 00:52
Show Gist options
  • Save hoox/01e9813aa2bdcbe7f7da44faf0e69554 to your computer and use it in GitHub Desktop.
Save hoox/01e9813aa2bdcbe7f7da44faf0e69554 to your computer and use it in GitHub Desktop.
Linux Process Information (pseudo-file system)

Linux Process Information (pseudo-file system)

Find out everything about a particular Linux process...

Usage:

  • /proc/<pid>/<type>
  • eg. sudo cat /proc/1234/environ

Links:

http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html

Commands:

  • /proc/PID/cmdline - Command line arguments.
  • /proc/PID/cpu - Current and last cpu in which it was executed.
  • /proc/PID/cwd - Link to the current working directory.
  • /proc/PID/environ - Values of environment variables.
  • /proc/PID/exe - Link to the executable of this process.
  • /proc/PID/fd - Directory, which contains all file descriptors.
  • /proc/PID/maps - Memory maps to executables and library files.
  • /proc/PID/mem - Memory held by this process.
  • /proc/PID/root - Link to the root directory of this process.
  • /proc/PID/stat - Process status.
  • /proc/PID/statm - Process memory status information.
  • /proc/PID/status - Process status in human readable form.
  • etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment