CINXE.COM
ps(1) - OpenBSD manual pages
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="/mandoc.css" type="text/css" media="all"> <title>ps(1) - OpenBSD manual pages</title> </head> <body> <header> <section> <h1><a href="https://www.openbsd.org/">OpenBSD</a> manual page server</h1> </section> <form role="search" action="/" method="get" autocomplete="off" autocapitalize="none"> <fieldset> <legend>Manual Page Search Parameters</legend> <label>Search query: <input type="search" name="query" value="ps" size="40"> </label> <button type="submit" name="apropos" value="0">man</button> <button type="submit" name="apropos" value="1">apropos</button> <br/> <select name="sec" aria-label="Manual section"> <option value="0">All Sections</option> <option value="1" selected="selected">1 - General Commands</option> <option value="2">2 - System Calls</option> <option value="3">3 - Library Functions</option> <option value="3p">3p - Perl Library</option> <option value="4">4 - Device Drivers</option> <option value="5">5 - File Formats</option> <option value="6">6 - Games</option> <option value="7">7 - Miscellaneous Information</option> <option value="8">8 - System Manager's Manual</option> <option value="9">9 - Kernel Developer's Manual</option> </select> <select name="arch" aria-label="CPU architecture"> <option value="default" selected="selected">All Architectures</option> <option>amd64</option> <option>alpha</option> <option>armv7</option> <option>arm64</option> <option>hppa</option> <option>i386</option> <option>landisk</option> <option>loongson</option> <option>luna88k</option> <option>macppc</option> <option>mips64</option> <option>octeon</option> <option>powerpc64</option> <option>riscv64</option> <option>sparc64</option> <option>amiga</option> <option>arc</option> <option>armish</option> <option>arm32</option> <option>atari</option> <option>aviion</option> <option>beagle</option> <option>cats</option> <option>hppa64</option> <option>hp300</option> <option>ia64</option> <option>mac68k</option> <option>mvme68k</option> <option>mvme88k</option> <option>mvmeppc</option> <option>palm</option> <option>pc532</option> <option>pegasos</option> <option>pmax</option> <option>powerpc</option> <option>sgi</option> <option>socppc</option> <option>solbourne</option> <option>sparc</option> <option>sun3</option> <option>vax</option> <option>wgrisc</option> <option>x68k</option> <option>zaurus</option> </select> <select name="manpath" aria-label="Manual path"> <option selected="selected">OpenBSD-current</option> <option>OpenBSD-7.6</option> <option>OpenBSD-7.5</option> <option>OpenBSD-7.4</option> <option>OpenBSD-7.3</option> <option>OpenBSD-7.2</option> <option>OpenBSD-7.1</option> <option>OpenBSD-7.0</option> <option>OpenBSD-6.9</option> <option>OpenBSD-6.8</option> <option>OpenBSD-6.7</option> <option>OpenBSD-6.6</option> <option>OpenBSD-6.5</option> <option>OpenBSD-6.4</option> <option>OpenBSD-6.3</option> <option>OpenBSD-6.2</option> <option>OpenBSD-6.1</option> <option>OpenBSD-6.0</option> <option>OpenBSD-5.9</option> <option>OpenBSD-5.8</option> <option>OpenBSD-5.7</option> <option>OpenBSD-5.6</option> <option>OpenBSD-5.5</option> <option>OpenBSD-5.4</option> <option>OpenBSD-5.3</option> <option>OpenBSD-5.2</option> <option>OpenBSD-5.1</option> <option>OpenBSD-5.0</option> <option>OpenBSD-4.9</option> <option>OpenBSD-4.8</option> <option>OpenBSD-4.7</option> <option>OpenBSD-4.6</option> <option>OpenBSD-4.5</option> <option>OpenBSD-4.4</option> <option>OpenBSD-4.3</option> <option>OpenBSD-4.2</option> <option>OpenBSD-4.1</option> <option>OpenBSD-4.0</option> <option>OpenBSD-3.9</option> <option>OpenBSD-3.8</option> <option>OpenBSD-3.7</option> <option>OpenBSD-3.6</option> <option>OpenBSD-3.5</option> <option>OpenBSD-3.4</option> <option>OpenBSD-3.3</option> <option>OpenBSD-3.2</option> <option>OpenBSD-3.1</option> <option>OpenBSD-3.0</option> <option>OpenBSD-2.9</option> <option>OpenBSD-2.8</option> <option>OpenBSD-2.7</option> <option>OpenBSD-2.6</option> <option>OpenBSD-2.5</option> <option>OpenBSD-2.4</option> <option>OpenBSD-2.3</option> <option>OpenBSD-2.2</option> </select> </fieldset> </form> </header> <hr> <div class="head" role="doc-pageheader" aria-label="Manual header line"><span class="head-ltitle">PS(1)</span> <span class="head-vol">General Commands Manual</span> <span class="head-rtitle">PS(1)</span></div> <main class="manual-text"> <section class="Sh"> <h2 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h2> <p class="Pp"><code class="Nm">ps</code> — <span class="Nd" role="doc-subtitle">display process status</span></p> </section> <section class="Sh"> <h2 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h2> <table class="Nm"> <tr> <td><code class="Nm">ps</code></td> <td>[[<code class="Fl">-</code>]<code class="Cm">AacefHhjkLlmrSTuvwx</code>] [<code class="Fl">-M</code> <var class="Ar">core</var>] [<code class="Fl">-N</code> <var class="Ar">system</var>] [<code class="Fl">-O</code> <var class="Ar">fmt</var>] [<code class="Fl">-o</code> <var class="Ar">fmt</var>] [<code class="Fl">-p</code> <var class="Ar">pid</var>] [<code class="Fl">-t</code> <var class="Ar">tty</var>] [<code class="Fl">-U</code> <var class="Ar">user</var>] [<code class="Fl">-W</code> <var class="Ar">swap</var>]</td> </tr> </table> </section> <section class="Sh"> <h2 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h2> <p class="Pp">The <code class="Nm">ps</code> utility displays information about active processes. When given no options, <code class="Nm">ps</code> prints information about processes of the current user that have a controlling terminal.</p> <p class="Pp">The information displayed is selected based on a set of keywords (and for even more control, see the <code class="Fl">-L</code>, <code class="Fl">-O</code>, and <code class="Fl">-o</code> options). The default output format includes, for each process, the process's ID, controlling terminal, state, CPU time (including both user and system time), and associated command.</p> <p class="Pp">The options are as follows:</p> <dl class="Bl-tag"> <dt id="A"><a class="permalink" href="#A"><code class="Fl">-A</code></a></dt> <dd>Display information about processes for all users, including those without controlling terminals.</dd> <dt id="a"><a class="permalink" href="#a"><code class="Fl">-a</code></a></dt> <dd>Display information about processes for all users with controlling terminals.</dd> <dt id="c"><a class="permalink" href="#c"><code class="Fl">-c</code></a></dt> <dd>Do not display full command with arguments, but only the executable name. This may be somewhat confusing; for example, all <a class="Xr" href="/sh.1" aria-label="sh, section 1">sh(1)</a> scripts will show as “sh”.</dd> <dt id="e"><a class="permalink" href="#e"><code class="Fl">-e</code></a></dt> <dd>Display the environment as well.</dd> <dt id="f"><a class="permalink" href="#f"><code class="Fl">-f</code></a></dt> <dd>Arrange processes into a tree. Each command is ordered and prefixed with indentation text showing sibling and parent/child relationships. If either of the <code class="Fl">-m</code> and <code class="Fl">-r</code> options are also used, they control how sibling processes are sorted relative to each other.</dd> <dt id="H"><a class="permalink" href="#H"><code class="Fl">-H</code></a></dt> <dd>Also display information about kernel visible threads.</dd> <dt id="h"><a class="permalink" href="#h"><code class="Fl">-h</code></a></dt> <dd>Repeat the information header as often as necessary to guarantee one header per page of information.</dd> <dt id="j"><a class="permalink" href="#j"><code class="Fl">-j</code></a></dt> <dd>Print information associated with the following keywords: user, pid, ppid, pgid, sess, jobc, state, tt, time, and command.</dd> <dt id="k"><a class="permalink" href="#k"><code class="Fl">-k</code></a></dt> <dd>Also display information about kernel threads.</dd> <dt id="L"><a class="permalink" href="#L"><code class="Fl">-L</code></a></dt> <dd>List the set of available keywords. This option should not be specified with other options.</dd> <dt id="l"><a class="permalink" href="#l"><code class="Fl">-l</code></a></dt> <dd>Display information associated with the following keywords: uid, pid, ppid, cpu, pri, nice, vsz, rss, wchan, state, tt, time, and command.</dd> <dt id="M"><a class="permalink" href="#M"><code class="Fl">-M</code></a> <var class="Ar">core</var></dt> <dd>Extract values associated with the name list from the specified core instead of the running kernel.</dd> <dt id="m"><a class="permalink" href="#m"><code class="Fl">-m</code></a></dt> <dd>Sort by memory usage, instead of by start time ID.</dd> <dt id="N"><a class="permalink" href="#N"><code class="Fl">-N</code></a> <var class="Ar">system</var></dt> <dd>Extract the name list from the specified system instead of the running kernel.</dd> <dt id="O"><a class="permalink" href="#O"><code class="Fl">-O</code></a> <var class="Ar">fmt</var></dt> <dd>Add the information associated with the space or comma separated list of keywords specified, after the process ID, in the default information display. Keywords may be appended with an equals sign (‘=’) and a string. This causes the printed header to use the specified string instead of the standard header.</dd> <dt id="o"><a class="permalink" href="#o"><code class="Fl">-o</code></a> <var class="Ar">fmt</var></dt> <dd>Display information associated with the space or comma separated list of keywords specified. Keywords may be appended with an equals sign (‘=’) and a string. This causes the printed header to use the specified string instead of the standard header.</dd> <dt id="p"><a class="permalink" href="#p"><code class="Fl">-p</code></a> <var class="Ar">pid</var></dt> <dd>Display information associated with the specified process ID.</dd> <dt id="r"><a class="permalink" href="#r"><code class="Fl">-r</code></a></dt> <dd>Sort by current CPU usage, instead of by start time ID.</dd> <dt id="S"><a class="permalink" href="#S"><code class="Fl">-S</code></a></dt> <dd>Change the way the process time is calculated by summing all exited children to their parent process.</dd> <dt id="T"><a class="permalink" href="#T"><code class="Fl">-T</code></a></dt> <dd>Display information about processes attached to the device associated with the standard input.</dd> <dt id="t"><a class="permalink" href="#t"><code class="Fl">-t</code></a> <var class="Ar">tty</var></dt> <dd>Display information about processes attached to the specified terminal device.</dd> <dt id="U"><a class="permalink" href="#U"><code class="Fl">-U</code></a> <var class="Ar">user</var></dt> <dd>Only display processes belonging to username or UID <var class="Ar">user</var>.</dd> <dt id="u"><a class="permalink" href="#u"><code class="Fl">-u</code></a></dt> <dd>Display information associated with the following keywords: user, pid, %cpu, %mem, vsz, rss, tt, state, start, time, and command. The <code class="Fl">-u</code> option implies the <code class="Fl">-r</code> option.</dd> <dt id="v"><a class="permalink" href="#v"><code class="Fl">-v</code></a></dt> <dd>Display information associated with the following keywords: pid, state, time, sl, re, pagein, vsz, rss, lim, tsiz, %cpu, %mem, and command. The <code class="Fl">-v</code> option implies the <code class="Fl">-m</code> option.</dd> <dt id="W"><a class="permalink" href="#W"><code class="Fl">-W</code></a> <var class="Ar">swap</var></dt> <dd>When not using the running kernel, extract swap information from the specified file.</dd> <dt id="w"><a class="permalink" href="#w"><code class="Fl">-w</code></a></dt> <dd>Use 132 columns to display information, instead of the default, which is the window size. If the <code class="Fl">-w</code> option is specified more than once, <code class="Nm">ps</code> will use as many columns as necessary without regard for window size.</dd> <dt id="x"><a class="permalink" href="#x"><code class="Fl">-x</code></a></dt> <dd>Display information about processes without controlling terminals.</dd> </dl> </section> <section class="Sh"> <h2 class="Sh" id="KEYWORDS"><a class="permalink" href="#KEYWORDS">KEYWORDS</a></h2> <p class="Pp">The following is a complete list of the available keywords and their meanings. Several of them have aliases, which are also noted.</p> <div class="Bd-indent"> <dl class="Bl-tag"> <dt id="_cpu"><a class="permalink" href="#_cpu"><code class="Cm">%cpu</code></a></dt> <dd>Alias: <code class="Cm">pcpu</code>. The CPU utilization of the process; this is a decaying average over up to a minute of previous (real) time. Since the time base over which this is computed varies (since processes may be very young), it is possible for the sum of all <code class="Cm">%cpu</code> fields to exceed 100%.</dd> <dt id="_mem"><a class="permalink" href="#_mem"><code class="Cm">%mem</code></a></dt> <dd>Alias: <code class="Cm">pmem</code>. The percentage of real memory used by this process.</dd> <dt id="acflag"><a class="permalink" href="#acflag"><code class="Cm">acflag</code></a></dt> <dd>Alias: <code class="Cm">acflg</code>. Accounting flag.</dd> <dt id="command"><a class="permalink" href="#command"><code class="Cm">command</code></a></dt> <dd>Alias: <code class="Cm">args</code>. Command and arguments.</dd> <dt id="cpu"><a class="permalink" href="#cpu"><code class="Cm">cpu</code></a></dt> <dd>Short-term CPU usage factor (for scheduling).</dd> <dt id="cpuid"><a class="permalink" href="#cpuid"><code class="Cm">cpuid</code></a></dt> <dd>CPU ID (zero on single processor systems).</dd> <dt id="cwd"><a class="permalink" href="#cwd"><code class="Cm">cwd</code></a></dt> <dd>Current working directory.</dd> <dt id="dsiz"><a class="permalink" href="#dsiz"><code class="Cm">dsiz</code></a></dt> <dd>Data size, in Kilobytes.</dd> <dt id="etime"><a class="permalink" href="#etime"><code class="Cm">etime</code></a></dt> <dd>Elapsed time since the process was started.</dd> <dt id="flags"><a class="permalink" href="#flags"><code class="Cm">flags</code></a></dt> <dd>Alias: <code class="Cm">f</code>. The thread flags (in hexadecimal), as defined in the include file <code class="In"><<a class="In">sys/proc.h</a>></code>: <div class="Bd Pp Li"> <pre>P_INKTR 0x1 writing ktrace(2) record P_PROFPEND 0x2 this thread needs SIGPROF P_ALRMPEND 0x4 this thread needs SIGVTALRM P_SIGSUSPEND 0x8 need to restore before-suspend mask P_CANTSLEEP 0x10 this thread is not permitted to sleep P_SINTR 0x80 sleep is interruptible P_SYSTEM 0x200 system process: no sigs, stats, or swapping P_TIMEOUT 0x400 timing out during sleep P_WEXIT 0x2000 working on exiting P_OWEUPC 0x8000 profiling sample needs recording P_SUSPSINGLE 0x80000 need to suspend for single threading P_THREAD 0x4000000 not the original thread P_SUSPSIG 0x8000000 stopped because of a signal P_CPUPEG 0x40000000 do not move to another cpu</pre> </div> </dd> <dt id="gid"><a class="permalink" href="#gid"><code class="Cm">gid</code></a></dt> <dd>Effective group.</dd> <dt id="group"><a class="permalink" href="#group"><code class="Cm">group</code></a></dt> <dd>Text name of effective group ID.</dd> <dt id="inblk"><a class="permalink" href="#inblk"><code class="Cm">inblk</code></a></dt> <dd>Alias: <code class="Cm">inblock</code>. Total blocks read.</dd> <dt id="jobc"><a class="permalink" href="#jobc"><code class="Cm">jobc</code></a></dt> <dd>Job control count.</dd> <dt id="ktrace"><a class="permalink" href="#ktrace"><code class="Cm">ktrace</code></a></dt> <dd>Tracing flags.</dd> <dt id="ktracep"><a class="permalink" href="#ktracep"><code class="Cm">ktracep</code></a></dt> <dd>Tracing vnode.</dd> <dt id="lim"><a class="permalink" href="#lim"><code class="Cm">lim</code></a></dt> <dd>The soft limit on memory used, specified via a call to <a class="Xr" href="/setrlimit.2" aria-label="setrlimit, section 2">setrlimit(2)</a>.</dd> <dt id="logname"><a class="permalink" href="#logname"><code class="Cm">logname</code></a></dt> <dd>Alias: <code class="Cm">login</code>. Login name of user who started the process.</dd> <dt id="lstart"><a class="permalink" href="#lstart"><code class="Cm">lstart</code></a></dt> <dd>The exact time the command started, using the “%c” format described in <a class="Xr" href="/strftime.3" aria-label="strftime, section 3">strftime(3)</a>.</dd> <dt id="majflt"><a class="permalink" href="#majflt"><code class="Cm">majflt</code></a></dt> <dd>Total page faults.</dd> <dt id="maxrss"><a class="permalink" href="#maxrss"><code class="Cm">maxrss</code></a></dt> <dd>Maximum resident set size (in 1024 byte units).</dd> <dt id="minflt"><a class="permalink" href="#minflt"><code class="Cm">minflt</code></a></dt> <dd>Total page reclaims.</dd> <dt id="msgrcv"><a class="permalink" href="#msgrcv"><code class="Cm">msgrcv</code></a></dt> <dd>Total messages received (reads from pipes/sockets).</dd> <dt id="msgsnd"><a class="permalink" href="#msgsnd"><code class="Cm">msgsnd</code></a></dt> <dd>Total messages sent (writes on pipes/sockets).</dd> <dt id="nice"><a class="permalink" href="#nice"><code class="Cm">nice</code></a></dt> <dd>Alias: <code class="Cm">ni</code>. The process scheduling increment (see <a class="Xr" href="/setpriority.2" aria-label="setpriority, section 2">setpriority(2)</a>).</dd> <dt id="nivcsw"><a class="permalink" href="#nivcsw"><code class="Cm">nivcsw</code></a></dt> <dd>Total involuntary context switches.</dd> <dt id="nsigs"><a class="permalink" href="#nsigs"><code class="Cm">nsigs</code></a></dt> <dd>Alias: <code class="Cm">nsignals</code>. Total signals taken.</dd> <dt id="nswap"><a class="permalink" href="#nswap"><code class="Cm">nswap</code></a></dt> <dd>Total swaps in/out.</dd> <dt id="nvcsw"><a class="permalink" href="#nvcsw"><code class="Cm">nvcsw</code></a></dt> <dd>Total voluntary context switches.</dd> <dt id="nwchan"><a class="permalink" href="#nwchan"><code class="Cm">nwchan</code></a></dt> <dd>Wait channel (as an address).</dd> <dt id="oublk"><a class="permalink" href="#oublk"><code class="Cm">oublk</code></a></dt> <dd>Alias: <code class="Cm">oublock</code>. Total blocks written.</dd> <dt id="p_ru"><a class="permalink" href="#p_ru"><code class="Cm">p_ru</code></a></dt> <dd>Resource usage (valid only for zombie processes).</dd> <dt id="paddr"><a class="permalink" href="#paddr"><code class="Cm">paddr</code></a></dt> <dd>Swap address.</dd> <dt id="pagein"><a class="permalink" href="#pagein"><code class="Cm">pagein</code></a></dt> <dd>Pageins (same as <code class="Cm">majflt</code>).</dd> <dt id="pgid"><a class="permalink" href="#pgid"><code class="Cm">pgid</code></a></dt> <dd>Process group number.</dd> <dt id="pid"><a class="permalink" href="#pid"><code class="Cm">pid</code></a></dt> <dd>Process ID.</dd> <dt id="pledge"><a class="permalink" href="#pledge"><code class="Cm">pledge</code></a></dt> <dd>Comma separated list of active <a class="Xr" href="/pledge.2" aria-label="pledge, section 2">pledge(2)</a> promises.</dd> <dt id="ppid"><a class="permalink" href="#ppid"><code class="Cm">ppid</code></a></dt> <dd>Parent process ID.</dd> <dt id="pri"><a class="permalink" href="#pri"><code class="Cm">pri</code></a></dt> <dd>Scheduling priority.</dd> <dt id="procflags"><a class="permalink" href="#procflags"><code class="Cm">procflags</code></a></dt> <dd>The process flags (in hexadecimal), as defined in the include file <code class="In"><<a class="In">sys/proc.h</a>></code>: <div class="Bd Pp Li"> <pre>PS_CONTROLT 0x1 process has a controlling terminal PS_EXEC 0x2 process called exec(3) PS_INEXEC 0x4 process is doing an exec right now PS_EXITING 0x8 process is exiting PS_SUGID 0x10 process had set ID privileges since last exec PS_SUGIDEXEC 0x20 last exec(3) was set[ug]id PS_PPWAIT 0x40 parent is waiting for process to exec/exit PS_ISPWAIT 0x80 process is parent of PPWAIT child PS_PROFIL 0x100 process has started profiling PS_TRACED 0x200 process is being traced PS_WAITED 0x400 debugging process has waited for child PS_COREDUMP 0x800 busy coredumping PS_SINGLEEXIT 0x1000 other threads must die PS_SINGLEUNWIND 0x2000 other threads must unwind PS_NOZOMBIE 0x4000 pid 1 waits for me instead of dad PS_STOPPING 0x8000 just stopped, need to send SIGCHLD PS_SYSTEM 0x10000 No signals, stats or swapping PS_EMBRYO 0x20000 New process, not yet fledged PS_ZOMBIE 0x40000 Dead and ready to be waited for PS_NOBROADCASTKILL 0x80000 Process excluded from kill -1 PS_PLEDGE 0x100000 process has called pledge(2) PS_WXNEEDED 0x00200000 process allowed to violate W^X PS_EXECPLEDGE 0x00400000 has exec pledges PS_ORPHAN 0x00800000 process is on an orphan list PS_CHROOT 0x01000000 process is chrooted PS_NOBTCFI 0x02000000 no Branch Target CFI PS_CONTINUED 0x20000000 process continued from stopped state but has not been waited for yet PS_STOPPED 0x40000000 process is in stopped state</pre> </div> </dd> <dt id="re"><a class="permalink" href="#re"><code class="Cm">re</code></a></dt> <dd>Core residency time (in seconds; 127 = infinity).</dd> <dt id="rgid"><a class="permalink" href="#rgid"><code class="Cm">rgid</code></a></dt> <dd>Real group ID.</dd> <dt id="rgroup"><a class="permalink" href="#rgroup"><code class="Cm">rgroup</code></a></dt> <dd>Text name of real group ID.</dd> <dt id="rlink"><a class="permalink" href="#rlink"><code class="Cm">rlink</code></a></dt> <dd>Reverse link on run queue, or 0.</dd> <dt id="rss"><a class="permalink" href="#rss"><code class="Cm">rss</code></a></dt> <dd>The real memory (resident set) size of the process (in 1024 byte units).</dd> <dt id="rsz"><a class="permalink" href="#rsz"><code class="Cm">rsz</code></a></dt> <dd>Alias: <code class="Cm">rssize</code>. Resident set size + (text size / text use count).</dd> <dt id="rtable"><a class="permalink" href="#rtable"><code class="Cm">rtable</code></a></dt> <dd>Routing table.</dd> <dt id="ruid"><a class="permalink" href="#ruid"><code class="Cm">ruid</code></a></dt> <dd>Real user ID.</dd> <dt id="ruser"><a class="permalink" href="#ruser"><code class="Cm">ruser</code></a></dt> <dd>User name (from <code class="Cm">ruid</code>).</dd> <dt id="sess"><a class="permalink" href="#sess"><code class="Cm">sess</code></a></dt> <dd>Session ID (PID of session leader).</dd> <dt id="sig"><a class="permalink" href="#sig"><code class="Cm">sig</code></a></dt> <dd>Alias: <code class="Cm">pending</code>. Pending signals.</dd> <dt id="sigcatch"><a class="permalink" href="#sigcatch"><code class="Cm">sigcatch</code></a></dt> <dd>Alias: <code class="Cm">caught</code>. Caught signals.</dd> <dt id="sigignore"><a class="permalink" href="#sigignore"><code class="Cm">sigignore</code></a></dt> <dd>Alias: <code class="Cm">ignored</code>. Ignored signals.</dd> <dt id="sigmask"><a class="permalink" href="#sigmask"><code class="Cm">sigmask</code></a></dt> <dd>Alias: <code class="Cm">blocked</code>. Blocked signals.</dd> <dt id="sl"><a class="permalink" href="#sl"><code class="Cm">sl</code></a></dt> <dd>Sleep time (in seconds; 127 = infinity).</dd> <dt id="ssiz"><a class="permalink" href="#ssiz"><code class="Cm">ssiz</code></a></dt> <dd>Stack size, in Kilobytes.</dd> <dt id="start"><a class="permalink" href="#start"><code class="Cm">start</code></a></dt> <dd>The time the command started. If the command started less than 24 hours ago, the start time is displayed using the “%l:%M%p” format described in <a class="Xr" href="/strftime.3" aria-label="strftime, section 3">strftime(3)</a>. If the command started less than 7 days ago, the start time is displayed using the “%a%I%p” format. Otherwise, the start time is displayed using the “%e%b%y” format.</dd> <dt id="state"><a class="permalink" href="#state"><code class="Cm">state</code></a></dt> <dd>Alias: <code class="Cm">stat</code>. The state is given by a sequence of letters, for example, “RWN”. The first letter indicates the run state of the process: <p class="Pp"></p> <dl class="Bl-tag Bl-compact"> <dt>D</dt> <dd>Marks a process in disk (or other short term, uninterruptible) wait.</dd> <dt>I</dt> <dd>Marks a process that is idle (sleeping for longer than about 20 seconds).</dd> <dt>R</dt> <dd>Marks a runnable process.</dd> <dt>S</dt> <dd>Marks a process that is sleeping for less than about 20 seconds.</dd> <dt>T</dt> <dd>Marks a stopped process.</dd> <dt>Z</dt> <dd>Marks a dead process (a “zombie”).</dd> </dl> <p class="Pp">Additional characters after these, if any, indicate additional state information:</p> <p class="Pp"></p> <dl class="Bl-tag Bl-compact"> <dt>+</dt> <dd>The process is in the foreground process group of its controlling terminal.</dd> <dt><</dt> <dd>The process has a raised CPU scheduling priority (see <a class="Xr" href="/setpriority.2" aria-label="setpriority, section 2">setpriority(2)</a>).</dd> <dt>></dt> <dd>The process has specified a soft limit on memory requirements and is currently exceeding that limit; such a process is (necessarily) not swapped.</dd> <dt>c</dt> <dd>The process is chrooted.</dd> <dt>E</dt> <dd>The process is trying to exit.</dd> <dt>K</dt> <dd>The process is a kernel thread.</dd> <dt>N</dt> <dd>The process has a reduced CPU scheduling priority.</dd> <dt>p</dt> <dd>The process has called <a class="Xr" href="/pledge.2" aria-label="pledge, section 2">pledge(2)</a>.</dd> <dt>s</dt> <dd>The process is a session leader.</dd> <dt>U</dt> <dd>The process has unveiled, and <a class="Xr" href="/unveil.2" aria-label="unveil, section 2">unveil(2)</a> is now locked.</dd> <dt>u</dt> <dd>The process has unveiled, but not yet locked <a class="Xr" href="/unveil.2" aria-label="unveil, section 2">unveil(2)</a> (could be a program error).</dd> <dt>V</dt> <dd>The process is suspended during a <a class="Xr" href="/vfork.2" aria-label="vfork, section 2">vfork(2)</a>.</dd> <dt>X</dt> <dd>The process is being traced or debugged.</dd> <dt>/<var class="Ar">n</var></dt> <dd>On multiprocessor machines, specifies processor number <var class="Ar">n</var>.</dd> </dl> </dd> <dt id="supgid"><a class="permalink" href="#supgid"><code class="Cm">supgid</code></a></dt> <dd>Group IDs of supplementary groups.</dd> <dt id="supgrp"><a class="permalink" href="#supgrp"><code class="Cm">supgrp</code></a></dt> <dd>Group names of supplementary groups.</dd> <dt id="svgid"><a class="permalink" href="#svgid"><code class="Cm">svgid</code></a></dt> <dd>Saved GID from a setgid executable.</dd> <dt id="svuid"><a class="permalink" href="#svuid"><code class="Cm">svuid</code></a></dt> <dd>Saved UID from a setuid executable.</dd> <dt id="tdev"><a class="permalink" href="#tdev"><code class="Cm">tdev</code></a></dt> <dd>Controlling terminal device number.</dd> <dt id="tid"><a class="permalink" href="#tid"><code class="Cm">tid</code></a></dt> <dd>Thread ID. Used together with <code class="Fl">-H</code>.</dd> <dt id="time"><a class="permalink" href="#time"><code class="Cm">time</code></a></dt> <dd>Alias: <code class="Cm">cputime</code>. Accumulated CPU time, user + system.</dd> <dt id="tpgid"><a class="permalink" href="#tpgid"><code class="Cm">tpgid</code></a></dt> <dd>Controlling terminal process group ID.</dd> <dt id="tsess"><a class="permalink" href="#tsess"><code class="Cm">tsess</code></a></dt> <dd>Controlling terminal session pointer.</dd> <dt id="tsiz"><a class="permalink" href="#tsiz"><code class="Cm">tsiz</code></a></dt> <dd>Text size, in Kilobytes.</dd> <dt id="tt"><a class="permalink" href="#tt"><code class="Cm">tt</code></a></dt> <dd>An abbreviation for the pathname of the controlling terminal, if any. The abbreviation consists of the two letters following “/dev/tty”, or, for the console, “co”. This is followed by a ‘-’ if the process can no longer reach that controlling terminal (i.e. it has been revoked).</dd> <dt id="tty"><a class="permalink" href="#tty"><code class="Cm">tty</code></a></dt> <dd>Full name of controlling terminal.</dd> <dt id="ucomm"><a class="permalink" href="#ucomm"><code class="Cm">ucomm</code></a></dt> <dd>Alias: <code class="Cm">comm</code>. Name to be used for accounting.</dd> <dt id="uid"><a class="permalink" href="#uid"><code class="Cm">uid</code></a></dt> <dd>Effective user ID.</dd> <dt id="upr"><a class="permalink" href="#upr"><code class="Cm">upr</code></a></dt> <dd>Alias: <code class="Cm">usrpri</code>. Scheduling priority on return from system call.</dd> <dt id="user"><a class="permalink" href="#user"><code class="Cm">user</code></a></dt> <dd>User name (from <code class="Cm">uid</code>).</dd> <dt id="vsz"><a class="permalink" href="#vsz"><code class="Cm">vsz</code></a></dt> <dd>Alias: <code class="Cm">vsize</code>. Virtual size, in Kilobytes.</dd> <dt id="wchan"><a class="permalink" href="#wchan"><code class="Cm">wchan</code></a></dt> <dd>The event (an address in the system) on which a process waits. When printed numerically, the initial part of the address is trimmed off and the result is printed in hex; for example, 0x80324000 prints as 324000.</dd> <dt id="xstat"><a class="permalink" href="#xstat"><code class="Cm">xstat</code></a></dt> <dd>Exit or stop status (valid only for stopped or zombie process).</dd> </dl> </div> </section> <section class="Sh"> <h2 class="Sh" id="ENVIRONMENT"><a class="permalink" href="#ENVIRONMENT">ENVIRONMENT</a></h2> <p class="Pp">The following environment variables affect the execution of <code class="Nm">ps</code>:</p> <dl class="Bl-tag"> <dt id="COLUMNS"><a class="permalink" href="#COLUMNS"><code class="Ev">COLUMNS</code></a></dt> <dd>If set to a positive integer, output is formatted to the given width in columns. Otherwise, <code class="Nm">ps</code> defaults to the terminal width minus 1. If none of <code class="Dv">stdout</code>, <code class="Dv">stderr</code>, and <code class="Dv">stdin</code> are a terminal, 79 columns are used.</dd> <dt id="LC_CTYPE"><a class="permalink" href="#LC_CTYPE"><code class="Ev">LC_CTYPE</code></a></dt> <dd>The character encoding <a class="Xr" href="/locale.1" aria-label="locale, section 1">locale(1)</a>. It decides which byte sequences form characters, which characters are printable, and what their display width is. If unset or set to "C", "POSIX", or an unsupported value, only printable ASCII characters are printed. Tabs, newlines, non-printable ASCII characters, and non-ASCII bytes are encoded with <a class="Xr" href="/vis.3" aria-label="vis, section 3">vis(3)</a>. If UTF-8 output is enabled, valid characters that are not printable are replaced with the Unicode replacement character U+FFFD. These rules for example apply to command names, arguments, and environments and to directory, user, and group names.</dd> <dt id="TZ"><a class="permalink" href="#TZ"><code class="Ev">TZ</code></a></dt> <dd>The time zone to use when displaying dates. See <a class="Xr" href="/environ.7" aria-label="environ, section 7">environ(7)</a> for more information.</dd> </dl> </section> <section class="Sh"> <h2 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h2> <dl class="Bl-tag Bl-compact"> <dt><span class="Pa">/dev</span></dt> <dd>special files and device names</dd> <dt><span class="Pa">/var/db/kvm_bsd.db</span></dt> <dd>system namelist database</dd> <dt><span class="Pa">/var/run/dev.db</span></dt> <dd><span class="Pa">/dev</span> name database</dd> </dl> </section> <section class="Sh"> <h2 class="Sh" id="EXIT_STATUS"><a class="permalink" href="#EXIT_STATUS">EXIT STATUS</a></h2> <p class="Pp">The <code class="Nm">ps</code> utility exits 0 on success, and >0 if an error occurs.</p> </section> <section class="Sh"> <h2 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h2> <p class="Pp">Display information on all system processes:</p> <p class="Pp"></p> <div class="Bd Bd-indent"><code class="Li">$ ps -auxw</code></div> </section> <section class="Sh"> <h2 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE ALSO</a></h2> <p class="Pp"><a class="Xr" href="/fstat.1" aria-label="fstat, section 1">fstat(1)</a>, <a class="Xr" href="/kill.1" aria-label="kill, section 1">kill(1)</a>, <a class="Xr" href="/netstat.1" aria-label="netstat, section 1">netstat(1)</a>, <a class="Xr" href="/pgrep.1" aria-label="pgrep, section 1">pgrep(1)</a>, <a class="Xr" href="/pkill.1" aria-label="pkill, section 1">pkill(1)</a>, <a class="Xr" href="/procmap.1" aria-label="procmap, section 1">procmap(1)</a>, <a class="Xr" href="/systat.1" aria-label="systat, section 1">systat(1)</a>, <a class="Xr" href="/top.1" aria-label="top, section 1">top(1)</a>, <a class="Xr" href="/w.1" aria-label="w, section 1">w(1)</a>, <a class="Xr" href="/kvm.3" aria-label="kvm, section 3">kvm(3)</a>, <a class="Xr" href="/strftime.3" aria-label="strftime, section 3">strftime(3)</a>, <a class="Xr" href="/dev_mkdb.8" aria-label="dev_mkdb, section 8">dev_mkdb(8)</a>, <a class="Xr" href="/iostat.8" aria-label="iostat, section 8">iostat(8)</a>, <a class="Xr" href="/pstat.8" aria-label="pstat, section 8">pstat(8)</a>, <a class="Xr" href="/vmstat.8" aria-label="vmstat, section 8">vmstat(8)</a></p> </section> <section class="Sh"> <h2 class="Sh" id="STANDARDS"><a class="permalink" href="#STANDARDS">STANDARDS</a></h2> <p class="Pp">The <code class="Nm">ps</code> utility is compliant with the <span class="St">IEEE Std 1003.1-2008 (“POSIX.1”)</span> specification, except that the flag [<code class="Fl">-G</code>] is unsupported and the flags [<code class="Fl">-ptU</code>] support only single arguments, not lists.</p> <p class="Pp">The flags [<code class="Fl">-defglnu</code>] are marked by <span class="St">IEEE Std 1003.1-2008 (“POSIX.1”)</span> as being an X/Open System Interfaces option. Of these, [<code class="Fl">-dfgn</code>] are not supported by this implementation of <code class="Nm">ps</code>; behaviour for the flags [<code class="Fl">-elu</code>] differs between this implementation and the X/Open System Interfaces option of <span class="St">IEEE Std 1003.1-2008 (“POSIX.1”)</span>.</p> <p class="Pp">The flags [<code class="Fl">-cfHhjkLMmNOrSTvWwx</code>] are extensions to <span class="St">IEEE Std 1003.1-2008 (“POSIX.1”)</span>.</p> <p class="Pp">Only the following keywords are recognised by <span class="St">IEEE Std 1003.1-2008 (“POSIX.1”)</span>: <code class="Cm">args</code>, <code class="Cm">comm</code>, <code class="Cm">etime</code>, <code class="Cm">group</code>, <code class="Cm">nice</code>, <code class="Cm">pcpu</code>, <code class="Cm">pgid</code>, <code class="Cm">pid</code>, <code class="Cm">ppid</code>, <code class="Cm">rgroup</code>, <code class="Cm">ruser</code>, <code class="Cm">time</code>, <code class="Cm">tty</code>, <code class="Cm">user</code>, and <code class="Cm">vsz</code>.</p> </section> <section class="Sh"> <h2 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h2> <p class="Pp">A <code class="Nm">ps</code> command first appeared in <span class="Ux">Version 3 AT&T UNIX</span>.</p> </section> <section class="Sh"> <h2 class="Sh" id="CAVEATS"><a class="permalink" href="#CAVEATS">CAVEATS</a></h2> <p class="Pp">When printing using the <code class="Cm">command</code> keyword, a process that has exited and has a parent that has not yet waited for the process (in other words, a zombie) is listed as “⟨defunct⟩”, and a process which is blocked while trying to exit is listed as “⟨exiting⟩”. <code class="Nm">ps</code> makes an educated guess as to the file name and arguments given when the process was created by examining memory or the swap area. The method is inherently somewhat unreliable and in any event a process is entitled to destroy this information, so the names cannot be depended on too much. The <code class="Cm">ucomm</code> (accounting) keyword can, however, be depended on.</p> <p class="Pp">The information displayed is only a snapshot of a constantly changing system.</p> </section> </main> <div class="foot" role="doc-pagefooter" aria-label="Manual footer line"><span class="foot-left"></span><span class="foot-date">October 15, 2024</span> <span class="foot-os">OpenBSD-current</span></div> </body> </html>