What is in /proc/<pid>/ that is useful for debugging?
IntermediateConceptProcesses, Signals & systemd
Answer
cmdline,environ(NUL-separated): how it was startedstatus: state, UIDs, memory (VmRSS), threadsfd/: open file descriptors as symlinkslimits: effective ulimitscwd,exe: working directory and binarymaps,smaps_rollup: memory mappingscgroup,ns/: cgroup and namespaces
tr '\0' '\n' < /proc/1234/environ
ls -l /proc/1234/fd | wc -l
More on Processes, Signals & systemd
What is the difference between a program, a process and a thread?BeginnerHow are new processes created in Linux?IntermediateWhat is a zombie process, and how do you get rid of it?IntermediateWhat is an orphan process?BeginnerExplain the process states shown in ps (R, S, D, T, Z).IntermediateWhy can't you kill a process in D state?Advanced