Check out my first novel, midnight's simulacra!

Procfs: Difference between revisions

From dankwiki
No edit summary
Line 2: Line 2:


==<tt>proc/PID</tt>==
==<tt>proc/PID</tt>==
Each entity associated with a non-zero PID (this includes most kernel threads) has a corresponding toplevel procfs directory named by its PID (e.g. when using [[systemd]] as init and mounting procfs at <tt>/proc</tt>, systemd's primary process is described by <tt>/proc/1</tt> (the process only appears in procfs mounts within the same PID namespace). One of the entries is <tt>proc/PID/task</tt>, a directory which contains the threads making up the process, using the TID as name:
Each entity associated with a non-zero PID (this includes most kernel threads) has a corresponding toplevel procfs directory named by its PID (e.g. when using [[systemd]] as init and mounting procfs at <tt>/proc</tt>, systemd's primary process is described by <tt>/proc/1</tt> (the process only appears in procfs mounts within the same PID namespace)). One of the entries is <tt>proc/PID/task</tt>, a directory which contains the threads making up the process, using the TID as name:


<pre>
<pre>