Check out my first novel, midnight's simulacra!

Procfs: Difference between revisions

From dankwiki
Line 67: Line 67:
</pre>
</pre>


Good, I guess?
Good, I guess? Gotta love that silent truncation to <tt>TASK_COMM_LEN</tt> bytes (16 as of Linux 5.3.5).


To remedy this and other problems, <tt>proc/PID/status</tt> also exists, reproducing *most* of the information from <tt>stat</tt> using newline-delimited key-value pairs. The process name here is backslash-escaped. Let's return to our three friendly processes:
To remedy this and other problems, <tt>proc/PID/status</tt> also exists, reproducing *most* of the information from <tt>stat</tt> using newline-delimited key-value pairs. The process name here is backslash-escaped. Let's return to our three friendly processes: