Interview Prep/Linux/Processes, Signals & systemd

What is in /proc/<pid>/ that is useful for debugging?

IntermediateConceptProcesses, Signals & systemd
Answer
  • cmdline, environ (NUL-separated): how it was started
  • status: state, UIDs, memory (VmRSS), threads
  • fd/: open file descriptors as symlinks
  • limits: effective ulimits
  • cwd, exe: working directory and binary
  • maps, smaps_rollup: memory mappings
  • cgroup, ns/: cgroup and namespaces
tr '\0' '\n' &lt; /proc/1234/environ
ls -l /proc/1234/fd | wc -l
All Linux questions Roadmap: Linux

More on Processes, Signals & systemd