Ps: Difference between revisions
Jump to navigation
Jump to search
(→TTY) |
(→TTY) |
||
Line 59: | Line 59: | ||
The [[Linux_TTY#TTY_Device_Components|TTY device]] character device file, relative to /dev. | The [[Linux_TTY#TTY_Device_Components|TTY device]] character device file, relative to /dev. | ||
==SESS== | |||
The process' session ID. |
Revision as of 02:49, 3 May 2018
Internal
Overview
ps gets its information from /proc/<pid>/stat files.
Options
-A, -e
Select all processes. -A and -e are identical.
-f
Full-format listing.
-L
Show threads.
The thread ID is listed under the "LWP" column.
--forest
Hierarchical display of the process tree.
--no-headers
Skips the display of the header line. Useful when counting lines in the ps output with wc -l.
-l
Displays the process state (S) and, if sleeping, what kernel channel it is waiting on (WCHAN).
Columns
PID
LWP
The thread ID.
NLWP
The number of threads for the process.
S
The process state.
WCHAN
If the process is sleeping, shows the kernel channel the process is waiting on.
TTY
The TTY device character device file, relative to /dev.
SESS
The process' session ID.