Search notes:

Shell command ps: Format specifiers

ps allows to control what columns are shown with format specifiers using the command line options -o (which is an alias for o and --format), -O (or O).
Format specifiers are also used when sorting the output of ps with --sort.
ps L prints all format specifiers.
%cpu, pcpu CPU utilization of the process in ##.# format (cputime divided realtime). Sum is rarely 100%. Compare cp
%mem, pmem Ratio of the process's resident set size to the physically available memory.
ag_id The autogroup identifier associated with a process which operates in conjunction with the CFS scheduler to improve interactive desktop performance.
ag_nice The autogroup nice value which affects scheduling of all processes in that group.
args, cmd, command Command with all its arguments.
blocked, sig_block, sigmask Mask of the blocked signals.
bsdstart Time the command started. See also lstart, start, start_time and stime.
bsdtime accumulated CPU time (user + system).
c processor utilization, compare %cpu.
caught, sig_catch, sigcatch mask of the caught signals.
cgname Name of control groups to which the process belongs.
cgroup Control groups to which the process belongs.
cgroupns Unique inode number describing the namespace the process belongs to.
class, policy, cls scheduling class of the process.
comm, ucmd, ucomm command name. Compare with args and the -f and/or c options.
cp per-mill CPU usage, compare %cpu
cputime, time cumulative CPU time, [DD-]hh:mm:ss format.
cputimes, times cumulative CPU time in seconds.
cuc The CPU utilization of a process, including dead children, in an extended ##.### format. Compare with %cpu, c, cp, cuu and pcpu.
cuu The CPU utilization of a process in an extended ##.### format. Compare with %cpu, c, cp, cuu and pcpu.
drs Data resident set size, i.e. the amount of physical memory devoted to other than executable code.
egid, gid Effective group ID number of the process (decimal integer).
egroup, group Effective group ID of the process. This will be the textual group ID, if it can be obtained and the field width permits, or a decimal representation otherwise.
eip Instruction pointer. As of kernel 4.9.xx will be zeroed out unless task is exiting or being core dumped.
esp Stack pointer. As of kernel 4.9.xx will be zeroed out unless task is exiting or being core dumped.
etime Elapsed time since the process was started ([[DD-]hh:]mm:ss)
etimes Elapsed time since the process was started, in seconds.
euid, uid Effective user ID
euser, uname, user Effective user name (text or numeric). The n option forces numeric output representation.
exe Path to the executable. Useful if path cannot be printed with cmd, comm or args.
f, flag, flags Flags associated with the process.
fgid, fsgid Filesystem access group ID.
fgroup, fsgroup Filesystem access group ID (textual or numerical).
fname First 8 bytes of the base name of the process's executable file.
fuid, fsuid Filesystem access user ID.
fuser Filesystem access user ID (textual or numerical)
ignored, sig_ignore, sigignore Mask of the ignored signals. According to the width of the field, a 32 or 64 bits mask in hexadecimal format is displayed.
ipcns Unique inode number describing the namespace the process belongs to.
label Security label, most commonly used for SELinux context data and/or(?) the Mandatory Access Control (MAC) found on high-security systems.
lstart Time the command started. See also bsdstart, start, start_time, and stime.
lsession Login session identifier of a process, if systemd support has been included.
luid Login ID associated with a process.
lwp, spid, tid Light weight process (thread) ID of the dispatchable entity. This value may also appear as: a process ID (pid); a process group ID (pgrp); a session ID for the session leader (sid); a thread group ID for the thread group leader (tgid); and a tty process group ID for the process group leader (tpgid). See also command line option -L.
lxc The name of the lxc container within which a task is running. If a process is not running inside a container, a dash ('-') will be shown.
machine Displays the machine name for processes assigned to VM or container, if systemd support has been included.
maj_flt The number of major page faults that have occurred with this process.
min_flt The number of minor page faults that have occurred with this process.
mntns Unique inode number describing the namespace the process belongs to.
netns Unique inode number describing the namespace the process belongs to.
ni, nice Nice value. (19 is nicest, -20 is least nice to others). Compare with pri
nlwp, thcount Number of threads (lwps) in the process. See also command line option -L.
numa The node associated with the most recently used processor. A -1 means that NUMA information is unavailable.
nwchan Address of the kernel function where the process is sleeping (use wchan if you want the kernel function name). Compare with wchan
oom Out of Memory Score. The value, ranging from 0 to +1000, used to select task(s) to kill when memory is exhausted.
oomadj Out of Memory Adjustment Factor. The value is added to the current out of memory score which is then used to determine which task to kill when memory is exhausted.
ouid Unix user identifier of the owner of the session of a process, if systemd support has been included.
pending, sig, sig_pend Mask of the pending signals. Signals pending on the process are distinct from signals pending on individual threads. Use the m option or the -m option to see both. According to the width of the field, a 32 or 64 bits mask in hexadecimal format is displayed.
pgid, pgrp Process group ID or, equivalently, the process ID of the process group leader.
pid, tgid A number representing the thread group to which a task belongs. It is the process ID of the thread group leader.
pidns Unique inode number describing the namespace the process belongs to.
ppid Parent process ID
pri Priority of the process. Compare with rtprio and nice
psr Processor that process last executed on. This column is also added with the command line option -P. Compare with sgi_p.
pss Proportional share size, the non-swapped physical memory, with shared memory proportionally accounted to all tasks mapping it.
rbytes Number of bytes which this process really did cause to be fetched from the storage layer.
rchars Number of bytes which this task has caused to be read from storage.
rgid Real group ID.
rgroup Real group name (textual or numerical).
rops Number of read I/O operations (System calls such as read, pread etc.). Compare with wops.
rss, rssize, rsz Resident set size, the non-swapped physical memory that a task has used (in kB), compare with sz, vsz and trs
rtprio Realtime priority. Compare with pri
ruid Real user ID.
ruser Real user ID (textual or numerical).
s, state Minimal state display, i. e. one character only). Compare with stat
sched Scheduling policy of the process.
seat Displays the identifier associated with all hardware devices assigned to a specific workplace, if systemd support has been included.
sess, session, sid Session ID or, equivalently, the process ID of the session leader.
sgi_p Processor that the process is currently executing on. Displays * if the process is not currently running or runnable. Compare with psr
sgid, svgid Saved group ID.
sgroup Saved group name (textual or numerical).
size Approximate amount of swap space that would be required if the process were to dirty all writable pages and then be swapped out.
slice Slice unit which a process belongs to, if systemd support has been included.
stackp Address of the bottom (start) of stack for the process.
start Time the command started. See also lstart, bsdstart, start_time and stime.
start_time, stime Starting time or date of the process. See also bsdstart, start and lstart.
stat Multi-character process state, compare with s (or state)
suid, svuid Saved user ID.
supgid Group ids of supplementary groups (if any).
supgrp Group names of supplementary groups (if any).
suser, svuser Saved user name (numerical or texutal).
sz Size in physical pages of the core image of the process (text, data and stack space, but without device mappings [subject to change)). Compare with vsz and rss.
timens Unique inode number describing the namespace the process belongs to.
tname, tt, tty Controlling tty.
tpgid ID of the foreground process group on the tty (terminal) that the process is connected to, or -1 if the process is not connected to a tty.
trs Text resident set size, the amount of physical memory devoted to executable code, compare with rss
unit Unit which a process belongs to, if systemd support has been included.
userns Unique inode number describing the namespace the process belongs to.
uss Unique set size, the non-swapped physical memory, which is not shared with an another task.
utsns Unique inode number describing the namespace the process belongs to. See namespaces(7).
uunit Displays user unit which a process belongs to, if systemd support has been included.
vsz, vsize Virtual memory size of the process in KiB. Device mappings are currently excluded (subject to change).
wbytes Number of bytes which this process caused to be sent to the storage layer.
wcbytes Number of cancelled write bytes.
wchan Name of the kernel function in which the process is sleeping. wchan stands for wait channel. Compare with /proc/$pid/wchan and the format specifier nwchan.
wchars Number of bytes which this task has caused, or shall cause to be written to disk.
wops Number of write I/O operations (system calls such as write and pwrite). Compare with rops.

Index