Anonymous

Procfs: Difference between revisions

From dankwiki
90 bytes added ,  09:58, 11 October 2019
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: