Linux Commands – ps
Hello Everyone
Welcome to CloudAffaire and this is Debjeet.
In the last blog post, we have discussed chgrp command in Linux which is used to change the group ownership of a file or directory.
https://cloudaffaire.com/linux-commands-chgrp/
In this blog post, we will discuss ps command in Linux. ps command is used to display current processes. ps command prints a snapshot of the currently active processes. If you want to have the real-time view of processes, use the top command.
Linux Commands – ps:
Ps command can be used to print a snapshot of the current processes. Ps command provides lots of options to control the output. You can choose how much data (rows and columns) to display and the format of the display. ps command accepts multiple types of options.
- UNIX options, which may be grouped and must be preceded by a dash.
- BSD options, which may be grouped and must not be used with a dash.
- GNU long options, which are preceded by two dashes.
Note: Options of different types may be freely mixed, but conflicts can appear.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
######################### ## Linux Commands | ps ## ######################### ## Prerequisites: One Unix/Linux/POSIX-compliant operating system with bash shell ##--- ## ps ##--- ## ps [option] ## list current active processes ps ## current process ps -e ## how many rows? ps -ef ## how many columns? ps -ef --sort -pid ## display format? ps o pid,sid,user ## BSD options ps -o pid,sid,user ## UNIX options ps --format pid,sid,user ## GNU long options |
General Options:
OPTIONS | DESCRIPTION |
-A, -e | all processes |
-a | all with tty, except session leaders |
a | all with tty, including other users |
-d | all except session leaders |
-N, –deselect | negate selection |
r | only running processes |
T | all processes on this terminal |
x | processes without controlling ttys |
You can use ps -A or -e options to list all processes. By default, ps lists current active processes.
1 2 3 4 |
## ps -A or -e options ps -A ## returns all processes ps -e ## same |
You can use ps -a option to select all processes except both session leaders and processes not associated with a terminal.
1 2 3 4 5 |
## ps -a option ps -a ps -eo pid,sid,comm,tty | awk '($1 == $2 || $4 != "?") {print $1,$2,$3,$4}' ## returns session leaders or process having terminal |
You can use ps -d option to select all processes except session leaders. A session leader is a process whose session id and process id are same.
1 2 3 4 5 6 |
## ps -d option ps -d ps -eo pid,sid,comm | awk '$1 == $2 {print $1,$2,$3}' ## returns session leaders ps -do pid,sid,comm | awk '$1 == $2 {print $1,$2,$3}' ## does not returns session leaders |
You can use ps –deselect or -N options to select all processes except those that fulfill the specified conditions (negates the selection). There are lots of options for selection which are covered later in this blog.
1 2 3 4 5 |
## ps --deselect or -N options ps -p 1 ## returns only pid 1 ps -p 1 -N ## returns all expect pid 1 |
You can use ps T or t options to select all processes associated with this terminal.
1 2 3 4 5 6 |
## ps T or t options ps T -o pid,sid,comm,tty ## returns all user process having terminal ps -eo pid,sid,comm,tty | awk '($4 != "?") {print $1,$2,$3,$4}' ## returns all process having terminal |
You can use ps r option to returns only running processes (STAT=R). STAT column meaning has been given at the end of this blog.
1 2 3 4 5 |
## ps r option ps r -o pid,tty,stat,time,cmd ## returns only running processes ps -eo pid,tty,stat,time,cmd ## returns all processes |
You can use ps a option to list all processes with a terminal (tty), or to list all processes when used together with the x option. This option lifts the BSD-style “only yourself” restriction.
1 2 3 4 5 6 |
## ps a option ## ps x option ps a ## returns all process having terminal ps ax ## returns all process |
Selection Options:
OPTIONS | DESCRIPTION |
-C <command> | command name |
-G, –Group <GID> | real group id or name |
-g, –group <group> | session or effective group name |
-p, p, –pid <PID> | process id |
–ppid <PID> | parent process id |
-q, q, –quick-pid <PID> | process id (quick mode) |
-s, –sid <session> | session id |
-t, t, –tty <tty> | terminal |
-u, U, –user <UID> | effective user id or name |
-U, –User <UID> | real user id or name |
ps command provides selection options to filter the output based on selection criteria. These options accept a single argument in the form of a blank-separated or comma-separated list. For example: ps -p “1 2” -p 3,4.
You can use ps -C cmdlist option to select processes by command name. This selects the processes whose executable name is given in cmdlist.
1 2 3 4 |
## ps -C cmdlist option ps -C crond ## returns cron process details ps -eo pid,sid,comm | awk '($3 == "crond") {print $1,$2,$3}' ## same thing |
You can use ps -G grplist or or –Group grplist options to select the processes whose real group name or ID is in the grplist list.
1 2 3 4 5 6 7 8 9 10 11 |
## ps -G grplist or --Group grplist options ps -G 0 -o pid,group,gid,user,uid,comm ## returns all process owned by root group (gid 0) ps --Group 0 -o pid,group,gid,user,uid,comm ps -G root -o pid,group,gid,user,uid,comm ## returns all process owned by root group (group root) ps --Group root -o pid,group,gid,user,uid,comm ## same thing using awk ps -eo pid,group,gid,user,uid,comm | awk '($2 == "root") {print $1,$2,$3,$4,$5,$6}' ps -eo pid,group,gid,user,uid,comm | awk '($3 == 0) {print $1,$2,$3,$4,$5,$6}' |
You can use ps -g grplist or –group grplist options to select the processes whose session or effective group name is in the grplist list.
1 2 3 4 5 6 7 8 9 10 11 |
## ps -g grplist or --group grplist options ps -g 0 -o pid,group,gid,user,uid,comm ## returns all process owned by root group (gid 0) ps --group 0 -o pid,group,gid,user,uid,comm ps -g root -o pid,group,gid,user,uid,comm ## returns all process owned by root group (group root) ps --group root -o pid,group,gid,user,uid,comm ## same thing using awk ps -eo pid,group,gid,user,uid,comm | awk '($2 == "root") {print $1,$2,$3,$4,$5,$6}' ps -eo pid,group,gid,user,uid,comm | awk '($3 == 0) {print $1,$2,$3,$4,$5,$6}' |
You can use ps p pidlist or -p pidlist or –pid pidlist options to select the processes whose process ID numbers appear in pidlist.
1 2 3 4 5 6 7 8 |
## ps p pidlist or -p pidlist or --pid pidlist options ps -p 1 -o pid,group,gid,user,uid,comm ## returns process with PID 1 ps -o pid,group,gid,user,uid,comm -p {1..10} ## returns process with PID between 1 to 10 ## same thing using awk ps -eo pid,group,gid,user,uid,comm | awk '($1 >= 1 && $1 <= 10) {print $1,$2,$3,$4,$5,$6}' |
You can use ps –ppid pidlist option to select the processes with a parent process ID in pidlist. That is, it selects processes that are children of those listed in pidlist.
1 2 3 4 5 6 7 8 |
## ps --ppid pidlist option ps -e -o ppid,pid,comm ## returns all processes ps --ppid 1 -o ppid,pid,comm ## returns all processes whose parent process id is 1 ## same thing using awk ps -e -o ppid,pid,comm | awk '($1 == 1) {print $1,$2,$3}' |
You can use ps q pidlist or -q pidlist or –quick-pid pidlist options to select the processes whose process ID numbers appear in pidlist. With this option ps reads the necessary info only for the pids listed in the pidlist and doesn’t apply additional filtering rules. The order of pids is unsorted and preserved. No additional selection options, sorting and forest type listings are allowed in this mode.
1 2 3 4 5 6 |
## ps q pidlist or -q pidlist or --quick-pid pidlist ps -q 1 -o pid,sid,comm ## returns processes with pid 1 ## same thing using awk ps -eo pid,sid,comm | awk '($1 == 1) {print $1,$2,$3}' |
You can use ps -s sesslist or –sid sesslist options to select the processes with a session ID specified in sesslist.
1 2 3 4 5 6 |
## ps -s sesslist or --sid sesslist options ps -s 1 -o pid,sid,comm ## returns processes with sid 1 ## same thing using awk ps -eo pid,sid,comm | awk '($2 == 1) {print $1,$2,$3}' |
You can use ps t ttylist or -t ttylist or –tty ttylist options to select the processes associated with the terminals given in ttylist. Terminals (ttys, or screens for text output) can be specified in several forms: /dev/ttyS1, ttyS1, S1. A plain “-” may be used to select processes not attached to any terminal.
1 2 3 4 5 6 |
## ps t ttylist or -t ttylist or --tty ttylist options ps -t tty1 -o pid,sid,tty,comm ## returns processes with terminal tty1 ## same thing using awk ps -eo pid,sid,tty,comm | awk '($3 == "tty1") {print $1,$2,$3,$4}' |
You can use ps U userlist or -u userlist or –user userlist options to select the processes whose effective user name or ID is in userlist. The effective user ID describes the user whose file access permissions are used by the process.
1 2 3 4 5 6 7 8 9 10 11 |
## ps U userlist or -u userlist or --user userlist ps -u 0 -o pid,group,gid,user,uid,comm ## returns all process owned by root user (uid 0) ps --user 0 -o pid,group,gid,user,uid,comm ps -u root -o pid,group,gid,user,uid,comm ## returns all process owned by root user (user root) ps --user root -o pid,group,gid,user,uid,comm ## same thing using awk ps -eo pid,group,gid,user,uid,comm | awk '($4 == "root") {print $1,$2,$3,$4,$5,$6}' ps -eo pid,group,gid,user,uid,comm | awk '($5 == 0) {print $1,$2,$3,$4,$5,$6}' |
You can use ps -U userlist or –User userlist options to select the processes whose real user name or ID is in userlist. The real user ID identifies the user who created the process.
1 2 3 4 5 6 7 8 9 10 11 |
## ps -U userlist or --User userlist options ps -U 0 -o pid,ruser,euser,ruid,euid,comm ## returns all process whose real user id is 0 (ruid 0) ps --User 0 -o pid,ruser,euser,ruid,euid,comm ps -U root -o pid,ruser,euser,ruid,euid,comm ## returns all process whose real user name is root (ruser root) ps --User root -o pid,ruser,euser,ruid,euid,comm ## same thing using awk ps -eo pid,ruser,euser,ruid,euid,comm | awk '($2 == "root") {print $1,$2,$3,$4,$5,$6}' ps -eo pid,ruser,euser,ruid,euid,comm | awk '($4 == 0) {print $1,$2,$3,$4,$5,$6}' |
Format Options:
ps command supports different format options to control which columns will be displayed in the output. By default, ps command only displays process id, terminal name, time, and command column. But you can use this format option to display different columns as provided in the output table at the end of this blog. Below are the format options available with ps command.
OPTIONS | DESCRIPTION |
-F | extra full |
-f | full-format, including command lines |
f, –forest | ascii art process tree |
-H | show process hierarchy |
-j | jobs format |
j | BSD job control format |
-l | long format |
l | BSD long format |
-M, Z | add security data (for SELinux) |
-O <format> | preloaded with default columns |
O <format> | as -O, with BSD personality |
-o, o, –format <format> | user-defined format |
s | signal format |
u | user-oriented format |
v | virtual memory format |
X | register format |
-y | do not show flags, show rss vs. addr (used with -l) |
You can use ps o format or -o format or –format format options to print the output in user-defined format. format is a single argument in the form of a blank-separated or comma-separated list, which offers a way to specify individual output columns. You can also format the Headers with -o option (ps -o pid, ruser=RealUser -o comm=Command) as desired. The output columns and their meaning is given at the end of this blog post.
1 2 3 4 5 6 7 |
## ps -o format option ps ## ps command by default returns PID,TTY,TIME and CMD columns ps -o pid,uid,user,group,comm ## using -o, you can select the columns to display ps -o pid,uid,user,group,comm=CMD ## headers can renamed as well (COMMAND renamed to CMD) |
You can use ps command with different predefined format options to control the column selection in the output.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
## display in full-format listing ps -f ## returns UID,PID,PPID,C,STIME,TTY,TIME and CMD columns ps -fL ## returns UID,PID,PPID,LWP,C,NLWP,STIME,TTY,TIME and CMD columns ## display in extra-full format listing ps -F ## returns UID,PID,PPID,C,SZ,RSS,PSR,STIME,TTY,TIME and CMD columns ## display in long-format listing ps -l ## returns F,S,UID,PID,PPID,C,PRI,NI,ADDR,SZ,WCHAN,TTY,TIME and CMD columns ps -lc ## returns F,S,UID,PID,PPID,CLS,PRI,ADDR,SZ,WCHAN,TTY,TIME and CMD columns ps -ly ## returns S,UID,PID,PPID,C,PRI,NI,RSS,SZ,WCHAN,TTY,TIME and CMD columns ## display in BSD long format ps l ## returns F,UID,PID,PPID,PRI,NI,VSZ,RSS,WCHAN,STAT,TTY,TIME and COMMAND columns ## display in security context format (for SELinux) listing ps --context ## returns PID,CONTEXT and COMMAND columns ## display in BSD job control format listing ps j ## returns PPID,PID,PGID,SID,TTY,TPGID,STAT,UID,TIME and COMMAND columns ## display in jobs format listing ps -j ## returns PID,PGID,SID,TTY,TIME and CMD columns ## display in signal format listing ps s ## returns UID,PID,PENDING,BLOCKED,IGNORED,CAUGHT,STAT,TTY,TIME and COMMAND columns ## display in user oriented format listing ps u ## returns USER,PID,%CPU,%MEM,VSZ,RSS,TTY,STAT,START,TIME and COMMAND columns ## display in virtual memory format listing ps v ## returns PID,TTY,STAT,TIME,MAJFL,TRS,DRS,RSS,%MEM and COMMAND columns ## display in security data (for SELinux) format listing ps -M ## returns LABEL,PID,TTY,TIME and CMD columns ps Z ## returns LABEL,PID,TTY,STAT,TIME and COMMAND columns ## display in register format listing ps X ## returns PID,STACKP,ESP,EIP,TMOUT,ALARM,STAT,TTY,TIME and COMMAND columns ## display in preloaded format listing ps -O user,group ## returns PID,USER,GROUP,S,TTY,TIME and COMMAND columns ## display in preloaded BDS format listing ps O user,group ## returns PID,USER,GROUP,S,TTY,TIME and COMMAND columns ## **columns may get changed depending upon the environment |
Output Modifier Options:
You can use ps command output modifier options to change the format of the output. The below table lists the different output modifier options available to ps command.
OPTIONS | DESCRIPTION |
–context | display security context (for SELinux) |
–headers | repeat header lines, one per page |
–no-headers | do not print header at all |
–cols, –columns, –width <num> | set screen width |
–rows, –lines <num> | set screen height |
H | as if they were processes |
-L | possibly with LWP and NLWP columns |
-m, m | after processes |
-T | possibly with SPID column |
-c | show scheduling class with -l option |
c | show true command name |
e | show the environment after command |
k, –sort | specify sort order as: [+|-]key[,[+|-]key[,…]] |
L | show format specifiers |
n | display numeric uid and wchan |
S, –cumulative | include some dead child process data |
-y | do not show flags, show rss (only with -l) |
-V, V, –version | display version information and exit |
-w, w | unlimited output width |
You can use ps c option to show the true command name rather than command with argv value. Command arguments and any modifications to them are thus not shown.
1 2 3 4 5 |
## ps c options ps -f ## returns command with arguments in CMD column ps -f c ## returns only command name without any arguments |
You can use ps e option to show the environment after the command.
1 2 3 |
## ps e option ps e ## returns environment information |
You can use ps –headers option to repeat header lines, one per page of output.
1 2 3 |
## ps --headers option ps -e --headers ## prints header on top of every page |
You can use ps –cols n or –columns n or –width n options to set the screen width.
1 2 3 4 5 6 |
## ps --cols n or --columns n or --width n options tput cols ## returns 203 in my terminal ps e ## displays upto 203 characters, truncates rest ps e --cols 203 ## no change ps e --cols 500 ## displays upto 500 characters |
You can use ps –lines n or –rows n options to set the screen height.
1 2 3 4 |
## ps --lines n or --rows n options tput lines ## returns 46 in my terminal ps -e --headers --lines 10 ## prints header every 10 lines |
You can use ps f or –forest options to print process hierarchy (forest) in ASCII art. This option is similar to pstree command. The -H option does the same thing without ASCII art.
1 2 3 4 5 6 7 |
## ps f or --forest or -H options ps -e -o ppid,pid,sid,command ## returns all process info without process hierarchy ps -e -o ppid,pid,sid,command f ## returns all process info with process hierarchy ps -eH -o ppid,pid,sid,command ## returns all process info with process hierarchy |
You can use ps h or –no-headers or –no-heading options to suppress printing of headers.
1 2 3 4 5 |
## ps h or --no-headers or --no-heading ps h ## no header is printed ps --no-headers ps --no-heading |
You can use ps w or -w options to set wide output. Use these options twice for unlimited width.
1 2 3 4 5 6 |
## ps w or -w options tput cols ## returns 203 in my terminal ps e ## displays upto 203 charecters, truncates rest ps ew ## displays more info ps eww ## displays entire info |
You can use ps S option to sum up some information, such as CPU usage, from dead child processes into their parent. This is useful for examining a system where a parent process repeatedly forks off short-lived children to do work.
1 2 3 4 |
## ps S option ps -o ppid,pid,cputime ## does not sums cpu usage of child processes ps -eo ppid,pid,cputime ## sums cpu usage of child processes |
You can use ps –sort spec or k spec to sort the output based on spec. Sorting syntax is [+|-]key[,[+|-]key[,…]]. The “+” sign sorts in ascending order which is the default order and “-” sing is used to sort in descending order.
1 2 3 4 5 6 |
## ps --sort or k options ps -eo pid --sort -pid ## sorts in decending order ps -eo pid --sort pid ## sorts in ascending order ps -eo pid,sid --sort sid,-pid ## sorting with multiple keys ps -eo pid,sid kpid,-sid ## sorting with multiple keys |
You can use ps H or -L or m or -m or -T options to display process threads information. Below are the meaning of each thread options.
- H: Show threads as if they were processes.
- -L: Show threads, possibly with LWP and NLWP columns.
- m: Show threads after processes.
- -m: Show threads after processes.
- -T: Show threads, possibly with SPID column.
1 2 3 4 5 6 7 8 |
## ps H or -L or m or -m or -T options ps -e H ## Show threads as if they were processes. ps -eL ## Show threads, possibly with LWP and NLWP columns. ps -e m ## Show threads after processes. ps -em ## Show threads after processes. ps -eT ## Show threads, possibly with SPID column. ps -eo pid,sid,lwp,nlwp ## SHow LWP and NLWP columns |
You can use ps L option to list all format specifiers (available output columns in ps command). The below table give you the complete list of columns that can be outputted using ps command.
1 2 3 |
## ps L option ps L |
Format Specifier:
CODE | HEADER | DESCRIPTION |
%cpu | %CPU | cpu utilization of the process (cputime/realtime ratio) in % |
%mem | %MEM | ratio of the process’s resident set size to the physical memory in % |
args | COMMAND | command with all its arguments as a string. |
blocked | BLOCKED | mask of the blocked signals. |
bsdstart | START | time the command started. |
bsdtime | TIME | accumulated cpu time, user + system. |
c | C | processor utilization. |
caught | CAUGHT | mask of the caught signals |
cgname | CGNAME | display name of control groups to which the process belongs. |
cgroup | CGROUP | display control groups to which the process belongs. |
class | CLS | scheduling class of the process. |
cls | CLS | scheduling class of the process. |
cmd | CMD | see args. (alias args, command). |
comm | COMMAND | command name (only the executable name). |
command | COMMAND | See args. (alias args, command). |
cp | CP | per-mill (tenths of a percent) CPU usage. |
cputime | TIME | cumulative CPU time, “[DD-]hh:mm:ss” format. (alias time). |
cputimes | TIME | cumulative CPU time in seconds (alias times). |
drs | DRS | the amount of physical memory devoted to other than executable code. |
egid | EGID | effective group ID number of the process. (alias gid). |
egroup | EGROUP | effective group ID text of the process. (alias group). |
eip | EIP | instruction pointer. |
esp | ESP | stack pointer. |
etime | ELAPSED | elapsed time since the process was started, in the form [[DD-]hh:]mm:ss. |
etimes | ELAPSED | elapsed time since the process was started, in seconds. |
euid | EUID | effective user ID (alias uid). |
euser | EUSER | effective user name in text. (alias uname, user). |
f | F | flags associated with the process. (alias flag, flags). |
fgid | FGID | filesystem access group ID. (alias fsgid). |
fgroup | FGROUP | filesystem access group ID in text. |
flag | F | see f. (alias f, flags). |
flags | F | see f. (alias f, flag). |
fname | COMMAND | first 8 bytes of the base name of the process’s executable file. |
fuid | FUID | filesystem access user ID. (alias fsuid). |
fuser | FUSER | filesystem access user ID in text. |
gid | GID | see egid. (alias egid). |
group | GROUP | see egroup. (alias egroup). |
ignored | IGNORED | mask of the ignored signals. (alias sig_ignore, sigignore). |
ipcns | IPCNS | Unique inode number describing the namespace the process belongs to. |
label | LABEL | security label, most commonly used for SELinux context data. |
lstart | STARTED | time the command started. See also bsdstart, start, start_time, and stime. |
lsession | SESSION | displays the login session identifier of a process. |
luid | LUID | displays Login ID associated with a process. |
lwp | LWP | light weight process (thread) ID of the dispatchable entity (alias spid, tid). |
lxc | LXC | The name of the lxc container within which a task is running. |
machine | MACHINE | displays the machine name for processes assigned to VM or container. |
maj_flt | MAJFLT | The number of major page faults that have occurred with this process. |
min_flt | MINFLT | The number of minor page faults that have occurred with this process. |
mntns | MNTNS | Unique inode number describing the namespace the process belongs to. |
netns | NETNS | Unique inode number describing the namespace the process belongs to. |
ni | NI | nice value. |
nice | NI | see ni.(alias ni). |
nlwp | NLWP | number of lwps (threads) in the process. (alias thcount). |
numa | NUMA | The node assocated with the most recently used processor. |
nwchan | WCHAN | address of the kernel function where the process is sleeping. |
ouid | OWNER | displays the Unix user identifier of the owner of the session of a process. |
pcpu | %CPU | see %cpu. (alias %cpu). |
pending | PENDING | mask of the pending signals. |
pgid | PGID | process group ID or, equivalently, the process ID of the process group leader. (alias pgrp). |
pgrp | PGRP | see pgid. (alias pgid). |
pid | PID | a number representing the process ID (alias tgid). |
pidns | PIDNS | Unique inode number describing the namespace the process belongs to. |
pmem | %MEM | see %mem. (alias %mem). |
policy | POL | scheduling class of the process. (alias class, cls). |
ppid | PPID | parent process ID. |
pri | PRI | priority of the process. Higher number means lower priority. |
psr | PSR | processor that process is currently assigned to. |
rgid | RGID | real group ID. |
rgroup | RGROUP | real group name. |
rss | RSS | resident set size, the non-swapped physical memory that a task has used. |
rssize | RSS | see rss. (alias rss, rsz). |
rsz | RSZ | see rss. (alias rss, rssize). |
rtprio | RTPRIO | realtime priority. |
ruid | RUID | real user ID. |
ruser | RUSER | real user ID. |
s | S | minimal state display (one character). |
sched | SCH | scheduling policy of the process. |
seat | SEAT | displays the identifier associated with all hardware devices assigned to a specific workplace. |
sess | SESS | session ID or, equivalently, the process ID of the session leader. (alias session, sid). |
sgi_p | P | processor that the process is currently executing on. |
sgid | SGID | saved group ID. (alias svgid). |
sgroup | SGROUP | saved group name. |
sid | SID | see sess. (alias sess, session). |
sig | PENDING | see pending. (alias pending, sig_pend). |
sigcatch | CAUGHT | see caught. (alias caught, sig_catch). |
sigignore | IGNORED | see ignored. (alias ignored, sig_ignore). |
sigmask | BLOCKED | see blocked. (alias blocked, sig_block). |
size | SIZE | approximate amount of swap space that would be required to dirty all writable pages and then be swapped out. |
slice | SLICE | displays the slice unit which a process belongs to. |
spid | SPID | see lwp. (alias lwp, tid). |
stackp | STACKP | address of the bottom (start) of stack for the process. |
start | STARTED | time the command started. |
start_time | START | starting time or date of the process. |
stat | STAT | multi-character process state. |
state | S | see s. (alias s). |
stime | STIME | see start_time. (alias start_time). |
suid | SUID | saved user ID. (alias svuid). |
supgid | SUPGID | group ids of supplementary groups, if any. |
supgrp | SUPGRP | group names of supplementary groups, if any. |
suser | SUSER | saved user name. |
svgid | SVGID | see sgid. (alias sgid). |
svuid | SVUID | see suid. (alias suid). |
sz | SZ | size in physical pages of the core image of the process. |
tgid | TGID | a number representing the thread group to which a task belongs (alias pid). I |
thcount | THCNT | see nlwp. (alias nlwp). number of kernel threads owned by the process. |
tid | TID | the unique number representing a dispatchable entity (alias lwp, spid). |
time | TIME | cumulative CPU time, “[DD-]HH:MM:SS” format. (alias cputime). |
times | TIME | cumulative CPU time in seconds (alias cputimes). |
tname | TTY | controlling tty (terminal). (alias tt, tty). |
tpgid | TPGID | ID of the foreground process group on the tty (terminal) that the process is connected to. |
trs | TRS | text resident set size, the amount of physical memory devoted to executable code. |
tt | TT | controlling tty (terminal). (alias tname, tty). |
tty | TT | controlling tty (terminal). (alias tname, tt). |
ucmd | CMD | see comm. (alias comm, ucomm). |
ucomm | COMMAND | see comm. (alias comm, ucmd). |
uid | UID | see euid. (alias euid). |
uname | USER | see euser. (alias euser, user). |
unit | UNIT | displays unit which a process belongs to. |
user | USER | see euser. (alias euser, uname). |
userns | USERNS | Unique inode number describing the namespace the process belongs to. |
utsns | UTSNS | Unique inode number describing the namespace the process belongs to. |
uunit | UUNIT | displays user unit which a process belongs to. |
vsize | VSZ | see vsz. (alias vsz). |
vsz | VSZ | virtual memory size of the process in KiB (1024-byte units). |
wchan | WCHAN | name of the kernel function in which the process is sleeping. |
Hope you have enjoyed this article. In the next blog post, we will discuss du command in Linux.