<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
  "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">

<!--
	Initial convertion from man page format to docbook XML format 
    by Jens Elkner (elkner@linofee.org).  Used XML instead of SGML
	since XML/XSLT is IMHO mainstream (i.e. much more people know/are able 
	to use/handle XML/XSLT wrt. SGML) and there are much more [free/OpenSource]
	XML/XSLT processors, than for SGML. Especially for Linux, the only
    SGML processors I know, are OpenSP/OpenJade. However, they seem
	to be quite bogus/of poor quality, have a bad/no documentation
	and are probably not maintained anymore ...
-->

<!-- 
	Conversion to man:
	==================
	# xsltproc dbk2man.xsl psman.dbk

	Conversion to html:
	=====================
	# xsltproc dbk2html.xsl psman.dbk 

    make sure to point dbk2{man,html}.xsl to the right location for
    docbook XSL manpages stylesheet (see line 3)

	Of course, you may use any other XSLT processor, like xalan or saxon,
	etc.
-->
	
<refentry id="ps">
	
	<refentryinfo>
		<productname>Linux</productname>
		<title>User Commands</title>
		<date>28 July 2004</date>
	</refentryinfo>
	
	<refmeta>
		<refentrytitle>ps</refentrytitle>
		<manvolnum>1</manvolnum>
	</refmeta>
	
	<refnamediv>
		<refname>ps</refname>
		<refpurpose>report a snapshot of the current processes</refpurpose>
	</refnamediv>
	
	<refsynopsisdiv><title>SYNOPSIS</title>
		<cmdsynopsis>
			<command>ps</command>
			<group><replaceable>options</replaceable></group>
		</cmdsynopsis>
	</refsynopsisdiv>
	
<refsection>
		
	<title>DESCRIPTION</title>
		
<para><command>ps</command> 
displays information about a selection of the active processes. If you want
a repetitive update of the selection and the displayed information, use 
<citerefentry><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum>
</citerefentry> instead.
</para>
		
<para>
This version of <command>ps</command> accepts several kinds of 
options:
	<orderedlist numeration="arabic" spacing="compact">
		<listitem><para>UNIX options, which may be grouped and must be 
		preceeded by a dash.</para></listitem>
		<listitem><para>BSD options, which may be grouped and must not be 
		used with a dash.</para></listitem>
		<listitem><para>GNU long options, which are preceeded by two 
		dashes.</para></listitem>
	</orderedlist>			
</para>
		
<para>
Options of different types may be freely mixed, but conflicts can appear.
There are some synonomous options, which are functionally identical, due to
the many standards and <command>ps</command> implementations that this 
<command>ps</command> is compatible with.
</para>

<para>
Note that 
<command>ps</command>&nbsp;<option
	>-a</option><option
	>u</option><replaceable
	>x</replaceable> 
is distinct from 
<command>ps</command>&nbsp;<option
	>a</option><option
	>u</option><option
	>x</option>. 
The POSIX and UNIX standards require that 
<command>ps</command>&nbsp;<option
	>-a</option><option
	>u</option><replaceable
	>x</replaceable> 
print all processes owned by a user named <replaceable>x</replaceable>, as 
well as printing all processes that would be selected by <option>-a</option>. 
If the user named <replaceable>x</replaceable> does not exist, 
this <command>ps</command> may interpret the command as 
<command>ps</command>&nbsp;<option
	>a</option><option
	>u</option><option
	>x</option>
instead and print a warning. This behavior is intended to aid in transitioning 
old scripts and habits. It is fragile, subject to change, and thus should not 
be relied upon.
</para>

<para>
By default, <command>ps</command> selects all processes with the same 
effective user ID (<literal>EUID</literal>) as the curent user and associated 
with the same terminal as the invoker. It displays the process ID 
(<literal>PID</literal>), the terminal associated with the process 
(<literal>TTY</literal>), the cumulated CPU time in [dd-]hh:mm:ss format 
(<literal>TIME</literal>), and the executable name (<literal>CMD</literal>). Output is 
unsorted by default.
</para>

<para>
The use of BSD-style options will add process state (<literal>STAT</literal>) to 
the default display and show the command args (<literal>COMMAND</literal>) instead 
of the executable name.
You can override this with the <envar>PS_FORMAT</envar> environment variable. 
The use of BSD-style options will also change the process selection to 
include processes on other terminals (<literal>TTY</literal>) that are owned by you; 
alternately, this may be described as setting the selection to be the set of 
all processes filtered to exclude processes owned by other users or not on a 
terminal. These effects are not considered when options are described as being 
"identical" below, so <option>-M</option> will be considered identical to 
<option>Z</option> and so on.
</para>

<para>
Except as described below, process selection options are additive. The default
selection is discarded, and then the selected processes are added to the set
of processes to be displayed. A process will thus be shown if it meets any of
the given selection criteria.
</para>

</refsection>
	
<refsection>
	
	<title>EXAMPLES</title>

<para>To see every process on the system using standard syntax:
	<programlisting>
    <command>ps</command> <option
    	>-e</option>
    <command>ps</command> <option
    	>-e</option><option
    	>f</option>
    <command>ps</command> <option
    	>-e</option><option
    	>F</option>
    <command>ps</command> <option
    	>-e</option><option
    	>l</option><option
    	>y</option>
</programlisting>
</para>

<para>To see every process on the system using BSD syntax:
	<programlisting>
    <command>ps</command> <option
    	>a</option><option
    	>x</option>
    <command>ps</command> <option
    	>a</option><option
    	>x</option><option
    	>u</option>
</programlisting>
</para>

<para>To print a process tree:
	<programlisting>
    <command>ps</command> <option
    	>-e</option><option
    	>j</option><option
    	>H</option>
    <command>ps</command> <option
    	>a</option><option
    	>x</option><option
    	>j</option><option
    	>f</option>
</programlisting>
</para>

<para>To get info about threads:
	<programlisting>
    <command>ps</command> <option
    	>-e</option><option
    	>L</option><option
    	>f</option>
    <command>ps</command> <option
    	>a</option><option
    	>x</option><option
    	>m</option><option
    	>s</option>
</programlisting>
</para>

<para>To get security info:
	<programlisting>
    <command>ps</command> <option
    	>-e</option><option
    	>o</option
		> <constant>euser</constant
		>,<constant>ruser</constant
		>,<constant>suser</constant
		>,<constant>fuser</constant
		>,<constant>f</constant
		>,<constant>comm</constant
		>,<constant>label</constant>
    <command>ps</command> <option
    	>a</option><option
    	>x</option><option
    	>Z</option>
    <command>ps</command> <option
    	>-e</option><option
    	>M</option>
</programlisting>
</para>

<para>To see every process running as root (real &amp; effective ID) in user 
	format:
	<programlisting>
    <command>ps</command> <option
    	>-U</option>&nbsp;<replaceable>root</replaceable> <option
    	>-u</option>&nbsp;<replaceable>root</replaceable> <option
    	>u</option>
</programlisting>
</para>

<para>To see every process with a user-defined format:
	<programlisting>
    <command>ps</command> <option
    	>-e</option><option
    	>o</option
		> <constant>pid</constant
		>,<constant>tid</constant
		>,<constant>class</constant
		>,<constant>rtprio</constant
		>,<constant>ni</constant
		>,<constant>pri</constant
		>,<constant>psr</constant
		>,<constant>pcpu</constant
		>,<constant>stat</constant
		>,<constant>wchan:</constant><replaceable>14</replaceable
		>,<constant>comm</constant>
    <command>ps</command> <option
    	>a</option><option
    	>x</option><option
    	>o</option
		> <constant>stat</constant
		>,<constant>euid</constant
		>,<constant>ruid</constant
		>,<constant>tty</constant
		>,<constant>tpgid</constant
		>,<constant>sess</constant
		>,<constant>pgrp</constant
		>,<constant>ppid</constant
		>,<constant>pid</constant
		>,<constant>pcpu</constant
		>,<constant>comm</constant>
    <command>ps</command> <option>-e</option><option>o </option
		><constant>spid</constant
		>,<constant>tt</constant
		>,<constant>user</constant
		>,<constant>fname</constant
		>,<constant>tmout</constant
		>,<constant>f</constant
		>,<constant>wchan</constant>
</programlisting>
</para>
	
<para>Print only the process IDs of syslogd:
	<programlisting>
    <command>ps</command> <option
    	>-C</option>&nbsp;<replaceable>syslogd</replaceable> <option
    	>-o</option>&nbsp;<constant>pid=</constant>
</programlisting>
</para>

<para>Print only the name of PID 42:
	<programlisting>
    <command>ps</command> <option
    	>-p</option>&nbsp;<replaceable>42</replaceable> <option
    	>-o</option>&nbsp;<constant>comm=</constant>
</programlisting>
</para>

</refsection>

<refsection>
	
	<title>SIMPLE PROCESS SELECTION</title>
	
	<variablelist>
		<varlistentry id="dash.A">
			<term><option>-A</option></term>
			<listitem><para>Select all processes. Identical 
				to <option>-e</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.N">
			<term><option>-N</option></term>
			<listitem><para>Select all processes except those that fulfill 
				the specified conditions. (negates the selection) Identical 
				to <option>--deselect</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="T">
			<term><option>T</option></term>
			<listitem><para>Select all processes associated with this 
			terminal. Identical to the <option>t</option> option without 
			any argument.
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.a">
			<term><option>-a</option></term>
			<listitem><para>Select all processes except session leaders 
				(see <citerefentry>
					<refentrytitle>getsid</refentrytitle>
					<manvolnum>2</manvolnum>
				</citerefentry>)
                and processes not associated with a terminal.
			</para></listitem>
		</varlistentry>
		<varlistentry id="a">
			<term><option>a</option></term>
			<listitem><para>Lift the BSD-style "only yourself" restriction, 
				which is imposed upon the set of all processes when some 
				BSD-style (without "-") options are used or when 
				the <command>ps</command> personality setting is BSD-like. 
				The set of processes selected  in this manner is in addition 
				to the set of processes selected by other means. 
				An alternate description is that this option 
				causes <command>ps</command> to list all processes with a 
				terminal (tty), or to list all processes when used together 
				with the <option>x</option> option.
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.d">
			<term><option>-d</option></term>
			<listitem><para>Select all processes except session leaders.
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.e">
			<term><option>-e</option></term>
			<listitem><para>Select all processes. Identical 
				to <option>-A</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="g">
			<term><option>g</option></term>
			<listitem><para>Really all, even session leaders. This flag is 
				obsolete and may be discontinued in a future release. It is 
				normally implied by the <option>a</option> flag, and is only 
				useful when operating in the sunos4 personality.
			</para></listitem>
		</varlistentry>
		<varlistentry id="r">
			<term><option>r</option></term>
			<listitem><para>Restrict the selection to only running processes.
			</para></listitem>
		</varlistentry>
		<varlistentry id="x">
			<term><option>x</option></term>
			<listitem><para>Lift the BSD-style "must have a tty" restriction,
				which is imposed upon the set of all processes when some 
				BSD-style (without "-") options are used or when 
				the <command>ps</command> personality
                setting is BSD-like. The set of processes selected in this
                manner is in addition to the set of processes selected by
                other means. An alternate description is that this option
                causes <command>ps</command> to list all processes owned by 
				you (same EUID as <command>ps</command>), or to list all 
				processes when used together with 
				the <option>a</option> option.
			</para></listitem>
		</varlistentry>
		<varlistentry id="long.deselect">
			<term><option>--deselect</option></term>
			<listitem><para>Select all processes except those that fulfill 
				the specified conditions. (negates the selection) Identical 
				to <option>-N</option>.
			</para></listitem>
		</varlistentry>
	</variablelist>
</refsection>

<refsection>
	
	<title>PROCESS SELECTION BY LIST</title>

<para>These options accept a single argument in the form of a 
blank-separated or comma-separated list. They can be used multiple times. 
For example: 
	<programlisting>
    <command>ps</command>&nbsp;<option
	>-p</option> "<replaceable>1</replaceable
	> <replaceable>2</replaceable
	>" <option>-p</option> <replaceable>3</replaceable
	>,<replaceable>4</replaceable>
</programlisting>
</para>
	<variablelist>
		<varlistentry id="dash.C">
			<term><option>-C</option> <replaceable>cmdlist</replaceable>
			</term>
			<listitem><para>Select by command name.
                This selects the processes whose executable name is given 
				in <replaceable>cmdlist</replaceable>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.G">
			<term><option>-G</option> <replaceable>grplist</replaceable>
			</term>
			<listitem><para>Select by real group ID (<literal>RGID</literal>) or 
				name.
                This selects the processes whose real group name or ID is in
                the grplist list. The real group ID identifies the group of
                the user who created the process, 
				see <citerefentry>
					<refentrytitle>getgid</refentrytitle>
					<manvolnum>2</manvolnum>
				</citerefentry>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="U">
			<term><option>U</option> <replaceable>userlist</replaceable>
			</term>
			<listitem><para>Select by effective user ID (<literal>EUID</literal>) 
				or name.
                This selects the processes whose effective user name or ID is
                in <replaceable>userlist</replaceable>. The effective user ID 
				describes the user whose file access permissions are used by 
				the process (see <citerefentry>
					<refentrytitle>getgid</refentrytitle>
					<manvolnum>2</manvolnum>
				</citerefentry>). Identical to <option>-u</option
				> and <option>--user</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.g">
			<term><option>-g</option> <replaceable>grplist</replaceable>
			</term>
			<listitem><para>Select by session OR by effective group name.
                Selection by session is specified by many standards, but
                selection by effective group is the logical behavior that
                several other operating systems use. 
				This <command>ps</command> will select by
                session when the list is completely numeric (as sessions are).
                Group ID numbers will work only when some group names are also
                specified. See 
				the <option>-s</option> and <option>--group</option> options.
			</para></listitem>
		</varlistentry>
		<varlistentry id="p">
			<term><option>p</option> <replaceable>pidlist</replaceable></term>
			<listitem><para>Select by process ID. Identical 
				to <option>-p</option> and <option>--pid</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.p">
			<term><option>-p</option> <replaceable>pidlist</replaceable>
			</term>
			<listitem><para>Select by PID.
                This selects the processes whose process ID numbers appear in
                <replaceable>pidlist</replaceable>. Identical 
				to <option>-p</option> and <option>--pid</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.s">
			<term><option>-s</option> <replaceable>sesslist</replaceable>
			</term>
			<listitem><para>Select by session ID.
                This selects the processes with a session ID specified
                in <replaceable>sesslist</replaceable>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="t">
			<term><option>t</option> <replaceable>ttylist</replaceable></term>
			<listitem><para>Select by tty. Nearly identical 
				to <option>-t</option> and <option>--tty</option>, but can 
				also be used with an empty <replaceable>ttylist</replaceable
				> to indicate the terminal associated 
				with <command>ps</command>. 
				Using the <option>T</option> option is considered cleaner
                than using <option>T</option> with an 
				empty <replaceable>ttylist</replaceable>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.t">
			<term><option>-t</option> <replaceable>ttylist</replaceable>
			</term>
			<listitem><para>Select by tty.
                This selects the processes associated with the terminals given
                in <replaceable>ttylist</replaceable>. Terminals (ttys, or 
				screens for text output) can be specified in several 
				forms: <literal>/dev/ttyS1</literal>, <literal>ttyS1</literal
				>, <literal>S1</literal>. A plain "<literal>-</literal>" may 
				be used to select processes not attached to any terminal.
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.u">
			<term><option>-u</option> <replaceable>userlist</replaceable>
			</term>
			<listitem><para>Select by effective user ID (<literal>EUID</literal>) 
				or name.
                This selects the processes whose effective user name or ID is
                in <replaceable>userlist</replaceable>. The effective user ID 
				describes the user whose file access permissions are used by 
				the process (see <citerefentry>
					<refentrytitle>geteuid</refentrytitle>
					<manvolnum>2</manvolnum>
				</citerefentry>). Identical 
				to <option>U</option> and <option>--user</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="long.Group">
			<term><option>--Group</option> <replaceable>grplist</replaceable>
			</term>
			<listitem><para>Select by real group ID (<literal>RGID</literal>) or 
				name. Identical to <option>-G</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="long.User">
			<term><option>--User</option> <replaceable>userlist</replaceable>
			</term>
			<listitem><para>Select by real user ID (<literal>RUID</literal>) or 
				name. Identical to <option>-U</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="long.group">
			<term><option>--group</option> <replaceable>grplist</replaceable>
			</term>
			<listitem><para>Select by effective group ID (<literal>EGID</literal>) 
				or name.
                This selects the processes whose effective group name or ID is
                in <replaceable>grplist</replaceable>. The effective group ID 
				describes the group whose file access permissions are used by 
				the process (see <citerefentry>
					<refentrytitle>getegid</refentrytitle>
					<manvolnum>2</manvolnum>
				</citerefentry>). The <option>-g</option> option is often an 
				alternative to <option>--group</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="long.pid">
			<term><option>--pid</option> <replaceable>pidlist</replaceable>
			</term>
			<listitem><para>Select by process ID. Identical 
				to <option>-p</option> and <option>p</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="long.ppid">
			<term><option>--ppid</option> <replaceable>pidlist</replaceable>
			</term>
			<listitem><para>Select by parent process ID. This selects the 
				processes with a parent process ID 
				in <replaceable>pidlist</replaceable>. 
				That is, it selects processes that are children of those 
				listed in <replaceable>pidlist</replaceable>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="long.sid">
			<term><option>--sid</option> <replaceable>sesslist</replaceable>
			</term>
			<listitem><para>Select by session ID. Identical 
				to <option>-s</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="long.tty">
			<term><option>--tty</option> <replaceable>ttylist</replaceable>
			</term>
			<listitem><para>Select by terminal. Identical 
				to <option>-t</option> and <option>t</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="long.user">
			<term><option>--user</option> <replaceable>userlist</replaceable>
			</term>
			<listitem><para>Select by effective user ID (<literal>EUID</literal>) 
				or name. Identical to <option>-u</option> and <option
				>U</option>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash">
			<term><option>-</option><replaceable>pid</replaceable></term>
			<listitem><para>Identical 
				to <option>--sid</option>&nbsp;<replaceable>pid</replaceable>.
			</para></listitem>
		</varlistentry>
		<varlistentry>
			<term><replaceable>pid</replaceable></term>
			<listitem><para>Identical 
				to <option>--pid</option>&nbsp;<replaceable>pid</replaceable>.
			</para></listitem>
		</varlistentry>
	</variablelist>
</refsection>

<refsection>

	<title>OUTPUT FORMAT CONTROL</title>

<para>
These options are used to choose the information displayed 
by <command>ps</command>. The output may differ by personality.
</para>
	
<variablelist>
	<varlistentry id="dash.F">
		<term><option>-F</option></term>
		<listitem><para>extra full format. See 
			the <option>-f</option> option, which <option>-F</option> implies.
		</para></listitem>
	</varlistentry>
	<varlistentry id="dash.O">
		<term><option>-O</option> <replaceable>format</replaceable></term>
		<listitem><para>is like <option>-o</option>, but preloaded with some 
			default columns. Identical to 
			<!-- avoid line breaks in unusual places -->
			<programlisting>
    <command>ps</command> <option
			>-o</option
			> <constant>pid</constant
			>,<replaceable>format</replaceable
			>,<constant>state</constant
			>,<constant>tname</constant
			>,<constant>time</constant
			>,<constant>command</constant>
</programlisting>or<programlisting>
    <command>ps</command> <option
			>-o</option
			> <constant>pid</constant
			>,<replaceable>format</replaceable
			>,<constant>tname</constant
			>,<constant>time</constant
			>,<constant>cmd</constant> 
</programlisting>(see -o below).
		</para></listitem>
	</varlistentry>
	<varlistentry id="O">
		<term><option>O</option> <replaceable>format</replaceable></term>
		<listitem><para id="O.para">is preloaded <option>o</option
			> (overloaded).
            The BSD <option>O</option> option can act 
			like <option>-O</option> (user-defined output format
            with some common fields predefined) or can be used to specify
            sort order. Heuristics are used to determine the behavior of
            this option. To ensure that the desired behavior is obtained
            (sorting or formatting), specify the option in some other way
            (e.g. with <option>-O</option> or <option>--sort</option>). When 
			used as a formatting option, it is identical 
			to <option>-O</option>, with the BSD personality.
		</para></listitem>
	</varlistentry>
	<varlistentry id="dash.M">
		<term><option>-M</option></term>
		<listitem><para id="dash.M.para">Add a column of security data. 
			Identical to <option>Z</option> (for SE Linux).
		</para></listitem>
	</varlistentry>
	<varlistentry id="X">
		<term><option>X</option></term>
		<listitem><para>Register format.</para></listitem>
	</varlistentry>
	<varlistentry id="Z">
			<term><option>Z</option></term>
			<listitem><para id="Z.para">Add a column of security data. 
				Identical to <option>-M</option> (for SE Linux).
			</para></listitem>
	</varlistentry>
	<varlistentry id="dash.c">
		<term><option>-c</option></term>
		<listitem><para id="dash.c.para">Show different scheduler information 
			for the <option>-l</option> option.
		</para></listitem>
	</varlistentry>
	<varlistentry id="dash.f">
		<term><option>-f</option></term>
		<listitem><para id="dash.f.para">does full-format listing. This 
			option can be combined 
			with many other UNIX-style options to add additional columns. It
            also causes the command arguments to be printed. When used
            with <option>-L</option>, the <literal>NLWP</literal> (number of 
			threads) and <literal>LWP</literal> (thread ID) columns will be added. 
			See the <option>c</option> option, the format 
			keyword <constant>args</constant>, and the format 
			keyword <constant>comm</constant>.
		</para></listitem>
	</varlistentry>
	<varlistentry id="j">
		<term><option>j</option></term>
		<listitem><para>BSD job control format.</para></listitem>
	</varlistentry>
	<varlistentry id="dash.j">
		<term><option>-j</option></term>
		<listitem><para>jobs format</para></listitem>
	</varlistentry>
	<varlistentry id="l">
		<term><option>l</option></term>
		<listitem><para>display BSD long format.</para></listitem>
	</varlistentry>
	<varlistentry id="dash.l">
		<term><option>-l</option></term>
		<listitem><para>long format. The <option>-y</option> option is often 
			useful with this.
		</para></listitem>
	</varlistentry>
	<varlistentry id="o">
		<term><option>o</option> <replaceable>format</replaceable></term>
		<listitem><para>specify user-defined format. Identical 
			to <option>-o</option> and <option>--format</option>.
		</para></listitem>
	</varlistentry>
	<varlistentry id="dash.o">
		<term><option>-o</option> <replaceable>format</replaceable></term>
		<listitem><para>user-defined format.
            <replaceable>format</replaceable> is a single argument in the 
			form of a blank-separated or comma-separated list, which offers 
			a way to specify individual output columns. The recognized 
			keywords are described in 
			the <citation><link linkend="stdfmt" 
				endterm="stdfmt.title"/></citation> section below.
            Headers may be renamed (<command>ps</command
				>&nbsp;<option>-o</option
				>&nbsp;<constant>pid</constant
				>,<constant>rusers=<replaceable>RealUser</replaceable
				></constant
				>&nbsp;<option>-o</option
				>&nbsp;<constant>comm=<replaceable>Command</replaceable
					></constant>) 
			as desired. If all
            column headers are empty (<command>ps</command
				>&nbsp;<option
            	>-o</option
				>&nbsp;<constant>pid=</constant
				>&nbsp;<option>-o</option
				>&nbsp;<constant>comm=</constant>) then the header
            line will not be output. Column width will increase as needed
            for wide headers; this may be used to widen up columns such as
            <literal>WCHAN</literal> (<command>ps</command
				>&nbsp;<option>-o</option
				>&nbsp;<constant>pid</constant
				>,<constant>wchan=WIDE-WCHAN-COLUMN</constant
				>&nbsp;<option>-o</option
				>&nbsp;<constant>comm</constant>). Explicit
            width control (<command>ps</command
				>&nbsp;<option>-o</option
				>&nbsp;<constant>pid</constant
				>,<constant>wchan:</constant><replaceable>42</replaceable
				>,<constant>cmd</constant>) is offered too. The
            behavior of <command>ps</command
				>&nbsp;<option>-o</option
				>&nbsp;<constant>pid=</constant><replaceable>X</replaceable
				>,<constant>comm=</constant><replaceable>Y</replaceable
			> varies with personality; output may be one column named 
			"<literal>X,comm=Y</literal>" or two columns named 
			"<literal>X</literal>"
            and "<literal>Y</literal>". Use multiple <option>-o</option
			> options when in doubt. Use the <envar>PS_FORMAT</envar
			> environment variable to specify a default as desired; DefSysV 
			and DefBSD are macros that may be used to choose the default 
			UNIX or BSD columns.
		</para></listitem>
	</varlistentry>
	<varlistentry id="s">
		<term><option>s</option></term>
		<listitem><para>display signal format</para></listitem>
	</varlistentry>
	<varlistentry id="u">
		<term><option>u</option></term>
		<listitem><para>display user-oriented format</para></listitem>
	</varlistentry>
	<varlistentry id="v">
		<term><option>v</option></term>
		<listitem><para>display virtual memory format</para></listitem>
	</varlistentry>
	<varlistentry id="long.format">
		<term><option>--format</option> <replaceable>format</replaceable>
		</term>
		<listitem><para>user-defined format. Identical 
			to <option>-o</option> and <option>o</option>.
		</para></listitem>
	</varlistentry>
	<varlistentry id="long.context">
		<term><option>--context</option></term>
		<listitem><para>Display security context format (for SE Linux).
		</para></listitem>
	</varlistentry>
</variablelist>
</refsection>

<refsection>
	
	<title>OUTPUT MODIFIERS</title>
	
	<variablelist>
		<varlistentry id="dash.H">
			<term><option>-H</option></term>
			<listitem><para>show process hierarchy (forest)</para></listitem>
		</varlistentry>
		<varlistentry id="N">
			<term><option>N</option> <replaceable>namelist</replaceable>
			</term>
			<listitem><para>Specify namelist file. Identical 
				to <option>-n</option>, see <option>-n</option> above.
			</para></listitem>
		</varlistentry>
		<!-- partially duplicated -->
		<varlistentry id="O.dup">
			<term><option>O</option> <replaceable>format</replaceable></term>
		<listitem><para>is preloaded <option>o</option
			> (overloaded).
            The BSD <option>O</option> option can act 
			like <option>-O</option> (user-defined output format
            with some common fields predefined) or can be used to specify
            sort order. Heuristics are used to determine the behavior of
            this option. To ensure that the desired behavior is obtained
            (sorting or formatting), specify the option in some other way
            (e.g. with <option>-O</option> or <option>--sort</option>). When 
			used as a formatting option, it is identical 
			to <option>-O</option>, with the BSD personality.</para>

			<para>For sorting, obsolete BSD <option>O</option> option syntax 
				is <!-- this is tricky ;-) -->
                <option>O</option
				>[<constant>+</constant>|<constant>-</constant
				>]<replaceable>k1</replaceable
				>[,[<constant>+</constant>|<constant>-</constant
				>]<replaceable>k2</replaceable>[,
				<replaceable>...</replaceable>]]. It orders the processes 
				listing
                according to the multilevel sort specified by the sequence of
                one-letter short keys <replaceable>k1</replaceable>, 
				<replaceable>k2</replaceable>,<replaceable>...</replaceable
				> described in the <citation><link linkend="obsolete.sort" 
					endterm="obsolete.sort.title"></link></citation> section 
				below. The <option>+</option> is currently optional, merely
                re-iterating the default direction on a key, but may help to
                distinguish an <option>O</option> sort from 
				an <option>O</option> format. The <option>-</option> reverses
                direction only on the key it precedes.
			</para>
			</listitem>
		</varlistentry>
		<varlistentry id="S">
			<term><option>S</option></term>
			<listitem><para>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.
			</para></listitem>
		</varlistentry>
		<varlistentry id="c">
			<term><option>c</option></term>
			<listitem><para>Show the true command name. This is derived from 
				the name of the executable file, rather than from the argv 
				value. Command arguments and any modifications to them 
				(see <citerefentry>
					<refentrytitle>setproctitle</refentrytitle>
					<manvolnum>3</manvolnum>
				</citerefentry>)
                are thus not shown. This option effectively turns 
				the <constant>args</constant> format keyword into 
				the <constant>comm</constant> format 
				keyword; it is useful with the <option>-f</option> format 
				option and with the various BSD-style format options, which 
				all normally display the command arguments. See 
				the <option>-f</option> option, the format 
				keyword <constant>args</constant>, and the format 
				keyword <constant>comm</constant>.
			</para></listitem>
		</varlistentry>
		<varlistentry id="e">
			<term><option>e</option></term>
			<listitem><para>Show the environment after the command.
			</para></listitem>
		</varlistentry>
		<varlistentry id="f">
			<term><option>f</option></term>
			<listitem><para>ASCII-art process hierarchy (forest).
			</para></listitem>
		</varlistentry>
		<varlistentry id="h">
			<term><option>h</option></term>
			<listitem><para>No header. (or, one header per screen in the BSD 
				personality) The <option>h</option> option is problematic. 
				Standard BSD <command>ps</command> uses this option to print 
				a header on each page of output, but older 
				Linux <command>ps</command> uses this option to totally 
				disable the header. This version 
				of <command>ps</command> follows the Linux usage of not 
				printing the header unless the BSD personality has been 
				selected, in which case it prints a header on each page of 
				output. Regardless of the current personality, you can use 
				the long options <option>--headers</option> and <option
				>--no-headers</option> to enable printing headers each page 
				or disable headers entirely, respectively.
			</para></listitem>
		</varlistentry>
		<varlistentry id="k">
			<term><option>k</option> <replaceable>spec</replaceable></term>
			<listitem><para id="k.para">specify sorting order. Sorting syntax 
				is [<constant>+</constant>|<constant>-</constant
				>]<replaceable>key</replaceable>[,[<constant
					>+</constant>|<constant>-</constant
						>]<replaceable>key</replaceable
							>[,<replaceable>...</replaceable>...]] . Choose 
				a multi-letter key from the <citation><link linkend="stdfmt"
					endterm="stdfmt.title"/></citation> section. 
				The <constant>+</constant> is optional since
                default direction is increasing numerical or lexicographic
				order.</para>
				<para>Identical to <option>--sort</option>. Examples:
				<programlisting>
    <command>ps</command
					>&nbsp;<option>j</option
					><option>a</option
					><option>x</option
					><option>k</option
					><option>u</option
					><option>i</option
					><option>d</option
					>,<option>-ppid</option
					>,<option>+pid</option>
    <command>ps</command
					>&nbsp;<option>a</option
					><option>x</option
					><option>k</option
					>&nbsp;<constant>comm</constant
					>&nbsp;<option>o</option
					>&nbsp;<constant>comm</constant
					>,<constant>args</constant>
    <command>ps</command
					>&nbsp;<option>kstart_time</option
					>&nbsp;<option>-e</option
					><option>f</option>
</programlisting>
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.n">
			<term><option>-n</option> <replaceable>namelist</replaceable>
			</term>
			<listitem><para>set namelist file. Identical 
				to <option>N</option>.
                The namelist file is needed for a 
				proper <literal>WCHAN</literal> display, and must match the 
				current Linux kernel exactly for correct output. Without 
				this option, the default search path for the namelist is:
				<programlisting>
    $PS_SYSMAP
    $PS_SYSTEM_MAP
    /proc/*/wchan
    /boot/System.map-`uname -r`
    /boot/System.map
    /lib/modules/`uname -r`/System.map
    /usr/src/linux/System.map
    /System.map
</programlisting>
			</para></listitem>
		</varlistentry>
		<varlistentry id="n">
			<term><option>n</option></term>
			<listitem><para>Numeric output for <literal>WCHAN</literal
			> and <literal>USER</literal>. (including all types of UID and GID)
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.w">
			<term><option>-w</option></term>
			<listitem><para>Wide output. Use this option twice for 
				unlimited width.
			</para></listitem>
		</varlistentry>
		<varlistentry id="w">
			<term><option>w</option></term>
			<listitem><para>Wide output. Use this option twice for 
				unlimited width.
			</para></listitem>
		</varlistentry>
		<varlistentry id="long.cols">
			<term><option>--cols</option> <replaceable>n</replaceable>
			</term>
			<listitem><para>set screen width</para></listitem>
		</varlistentry>
		<varlistentry id="long.columns">
			<term><option>--columns</option> <replaceable>n</replaceable>
			</term>
			<listitem><para>set screen width</para></listitem>
		</varlistentry>
		<varlistentry id="long.cumulative">
			<term><option>--cumulative</option></term>
			<listitem><para>include some dead child process data (as a sum 
				with the parent)
			</para></listitem>
		</varlistentry>
		<varlistentry id="long.forest">
			<term><option>--forest</option></term>
			<listitem><para>ASCII art process tree</para></listitem>
		</varlistentry>
		<varlistentry id="long.headers">
			<term><option>--headers</option></term>
			<listitem><para>repeat header lines, one per page of output
			</para></listitem>
		</varlistentry>
		<varlistentry id="long.no-headers">
			<term><option>--no-headers</option></term>
			<listitem><para>print no header line at all</para></listitem>
		</varlistentry>
		<varlistentry id="long.lines">
			<term><option>--lines</option> <replaceable>n</replaceable>
			</term>
			<listitem><para>set screen height</para></listitem>
		</varlistentry>
		<varlistentry id="long.rows">
			<term><option>--rows</option> <replaceable>n</replaceable>
			</term>
			<listitem><para>set screen height</para></listitem>
		</varlistentry>
		<varlistentry id="long.sort">
			<term><option>--sort</option> <replaceable>spec</replaceable>
			</term>
			<listitem><para>specify sorting order. Sorting syntax 
				is [<constant>+</constant>|<constant>-</constant
				>]<replaceable>key</replaceable>[,[<constant
					>+</constant>|<constant>-</constant
						>]<replaceable>key</replaceable
							>[,<replaceable>...</replaceable>...]] . Choose 
				a multi-letter key from the <citation><link linkend="stdfmt"
					endterm="stdfmt.title"/></citation> section. 
				The <constant>+</constant> is optional since
                default direction is increasing numerical or lexicographic
				order.</para>
			<para>
			Identical to <option>k</option>. For example:
			<programlisting>
    <command>ps</command
				>&nbsp;<option>j</option
				><option>a</option
				><option>x</option
				>&nbsp;<option>--sort=</option><constant>uid</constant
				>,<option>-ppid</option
				>,<option>+pid</option>
</programlisting>
			</para>
			</listitem>
		</varlistentry>
		
		
	</variablelist>
	<variablelist id="long.width">
		<varlistentry>
			<term><option>--width</option> <replaceable>n</replaceable>
			</term>
			<listitem><para>set screen width</para></listitem>
		</varlistentry>
	</variablelist>
</refsection>
	
<refsection>
	
	<title>THREAD DISPLAY</title>
	
	<variablelist>
		<varlistentry id="H">
			<term><option>H</option></term>
			<listitem><para>Show threads as if they were processes.
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.L">
			<term><option>-L</option></term>
			<listitem><para>Show threads, possibly 
				with <literal>LWP</literal> and <literal>NLWP</literal> columns.
			</para></listitem>
		</varlistentry>
		<varlistentry id="dash.T">
			<term><option>-T</option></term>
			<listitem><para>Show threads, possibly 
				with <literal>SPID</literal> column.
			</para></listitem>
		</varlistentry>
		<varlistentry id="m">
			<term><option>m</option></term>
			<listitem><para>Show threads after processes.</para></listitem>
		</varlistentry>
	</variablelist>
</refsection>

<refsection>
	
	<title>OTHER INFORMATION</title>
	
	<variablelist>
		<varlistentry id="L">
			<term><option>L</option></term>
			<listitem><para>List all format specifiers.</para></listitem>
		</varlistentry>
		<varlistentry id="dash.V">
			<term><option>-V</option></term>
			<listitem><para>Print the procps version.</para></listitem>
		</varlistentry>
		<varlistentry id="V">
			<term><option>V</option></term>
			<listitem><para>Print the procps version.</para></listitem>
		</varlistentry>
		<varlistentry id="long.help">
			<term><option>--help</option></term>
			<listitem><para>Print a help message.</para></listitem>
		</varlistentry>
		<varlistentry id="long.info">
			<term><option>--info</option></term>
			<listitem><para>Print debugging info.</para></listitem>
		</varlistentry>
		<varlistentry id="long.version">
			<term><option>--version</option></term>
			<listitem><para>Print the procps version.</para></listitem>
		</varlistentry>
	</variablelist>
</refsection>

<refsection>

	<title>NOTES</title>

<para>
This <command>ps</command> works by reading the virtual files in 
<literal>/proc</literal>. This <command>ps</command> does not need to
be setuid <literal>kmem</literal> or have any privileges to run. Do not 
give this <command>ps</command> any special permissions.
</para>

<para>This <command>ps</command> needs access to namelist data for 
proper <literal>WCHAN</literal> display. For kernels prior to 2.6, the 
<literal>System.map</literal> file must be installed.
</para>

<para><literal>CPU</literal> usage is currently expressed as the percentage of time 
spent running during the entire lifetime of a process. This is not ideal, and 
it does not conform to the standards that <command>ps</command> otherwise 
conforms to. <literal>CPU</literal> usage is unlikely to add up to exactly 100%.
</para>

<para>The <literal>SIZE</literal> and <literal>RSS</literal> fields don't count some parts 
of a process including the page tables, kernel stack, struct thread_info, and 
struct task_struct. This is usually at least 20 KiB of memory that is always 
resident. <literal>SIZE</literal> is the virtual size of the process 
(code+data+stack).
</para>

<para>
Processes marked &lt;defunct&gt; are dead processes (so-called "zombies") 
that remain because their parent has not destroyed them properly. 
These processes will be destroyed by <citerefentry>
	<refentrytitle>init</refentrytitle>
	<manvolnum>8</manvolnum>
</citerefentry> if the parent process exits.
</para>
</refsection>

<refsection id="procflags">

	<title id="procflags.title">PROCESS FLAGS</title>

<para>
The sum of these values is displayed in the <literal>F</literal> column, which is 
provided by the flags output specifier.
</para>
	<variablelist>
		<varlistentry>
			<term>1</term>
			<listitem><para>forked but didn't exec</para></listitem>
		</varlistentry>
		<varlistentry>
			<term>4</term>
			<listitem><para>used super-user privileges</para></listitem>
		</varlistentry>
	</variablelist>
</refsection>

<refsection id="procstatecodes">

	<title id="procstatecodes.title">PROCESS STATE CODES</title>

<para>
Here are the different values that the <option>s</option>, <option
>stat</option> and <option>state</option> output specifiers
(header <literal>STAT</literal> or <literal>S</literal>) will display to describe the 
state of a process.
</para>
	
	<variablelist>
		<varlistentry>
			<term>D</term>
			<listitem><para>Uninterruptible sleep (usually IO)
			</para></listitem>
		</varlistentry>
		<varlistentry>
			<term>R</term>
			<listitem><para>Running or runnable (on run queue)
			</para></listitem>
		</varlistentry>
		<varlistentry>
			<term>D</term>
			<listitem><para>Interruptible sleep (waiting for an event to 
				complete)
			</para></listitem>
		</varlistentry>
		<varlistentry>
			<term>T</term>
			<listitem><para>Stopped, either by a job control signal or 
				because it is being traced.
			</para></listitem>
		</varlistentry>
		<varlistentry>
			<term>W</term>
			<listitem><para>paging (not valid since the 2.6.xx kernel)
			</para></listitem>
		</varlistentry>
		<varlistentry>
			<term>X</term>
			<listitem><para>dead (should never be seen)</para></listitem>
		</varlistentry>
		<varlistentry>
			<term>Z</term>
			<listitem><para>Defunct ("zombie") process, terminated but 
				not reaped by its parent.
			</para></listitem>
		</varlistentry>
		
	</variablelist>
<para>
For BSD formats and when the <constant>stat</constant> keyword is used, 
additional characters may be displayed:
</para>
	<variablelist>
		<varlistentry>
			<term>&lt;</term>
			<listitem><para>high-priority (not nice to other users)
			</para></listitem>
		</varlistentry>
		<varlistentry>
			<term>N</term>
			<listitem><para>low-priority (nice to other users)
			</para></listitem>
		</varlistentry>
		<varlistentry>
			<term>L</term>
			<listitem><para>has pages locked into memory (for real-time and 
				custom IO)
			</para></listitem>
		</varlistentry>
		<varlistentry>
			<term>s</term>
			<listitem><para>is a session leader</para></listitem>
		</varlistentry>
		<varlistentry>
			<term>l</term>
			<listitem><para>is multi-threaded 
				(using <function>CLONE_THREAD</function>, like NPTL pthreads 
				do)
			</para></listitem>
		</varlistentry>
		<varlistentry>
			<term>+</term>
			<listitem><para>is in the foreground process group
			</para></listitem>
		</varlistentry>
	</variablelist>
</refsection>

<refsection id="obsolete.sort">
	
	<title id="obsolete.sort.title">OBSOLETE SORT KEYS</title>
	
<para>
These keys are used by the BSD <option>O</option> option (when it is used 
for sorting). The GNU <command>--sort</command> option doesn't use these 
keys, but the specifiers described below in 
the <citation><link linkend="stdfmt" 
endterm="stdfmt.title"/></citation> section. Note that the values used in 
sorting are the internal values ps uses and not the "cooked" values used in 
some of the output format fields (e.g. sorting on tty will sort into device 
number, not according to the terminal name displayed). 
Pipe <command>ps</command> output into the <citerefentry>
	<refentrytitle>sort</refentrytitle>
	<manvolnum>1</manvolnum>
</citerefentry> command if you want to sort the cooked values.
</para>
<informaltable frame="none" orient="port">
	<tgroup cols="3" colsep="1" rowsep="1">
		<colspec colnum="1" colname="key" colwidth="1*" colsep="0" 
			align="left"/>
		<colspec colnum="2" colname="long" colwidth="1*" colsep="0" 
			align="left"/>
		<colspec colnum="3" colname="desc" colwidth="1*" colsep="0" 
			align="left"/>
		<thead>
			<row><entry>KEY</entry>
			<entry>LONG</entry>
			<entry>DESCRIPTION</entry>
			</row>
		</thead>
		<tbody>
			<row>
				<entry>c</entry>
				<entry>cmd</entry>
				<entry>simple name of executable</entry>
			</row>
			<row>
				<entry>C</entry>
				<entry>pcpu</entry>
				<entry>cpu utilization</entry>
			</row>
			<row>
				<entry>f</entry>
				<entry>flags</entry>
				<entry>flags as in long format F field</entry>
			</row>
			<row>
				<entry>g</entry>
				<entry>pgrp</entry>
				<entry>process group ID</entry>
			</row>
			<row>
				<entry>G</entry>
				<entry>tpgid</entry>
				<entry>controlling tty process group ID</entry>
			</row>
			<row>
				<entry>j</entry>
				<entry>cutime</entry>
				<entry>cumulative user time</entry>
			</row>
			<row>
				<entry>J</entry>
				<entry>cstime</entry>
				<entry>cumulative system time</entry>
			</row>
			<row>
				<entry>k</entry>
				<entry>utime</entry>
				<entry>user time</entry>
			</row>
			<row>
				<entry>m</entry>
				<entry>min_flt</entry>
				<entry>number of minor page faults</entry>
			</row>
			<row>
				<entry>M</entry>
				<entry>maj_flt</entry>
				<entry>number of major page faults</entry>
			</row>
			<row>
				<entry>n</entry>
				<entry>cmin_flt</entry>
				<entry>cumulative minor page faults</entry>
			</row>
			<row>
				<entry>N</entry>
				<entry>cmaj_flt</entry>
				<entry>cumulative major page faults</entry>
			</row>
			<row>
				<entry>o</entry>
				<entry>session</entry>
				<entry>session ID</entry>
			</row>
			<row>
				<entry>p</entry>
				<entry>pid</entry>
				<entry>process ID</entry>
			</row>
			<row>
				<entry>P</entry>
				<entry>ppid</entry>
				<entry>parent process ID</entry>
			</row>
			<row>
				<entry>r</entry>
				<entry>rss</entry>
				<entry>resident set size</entry>
			</row>
			<row>
				<entry>R</entry>
				<entry>resident</entry>
				<entry>resident pages</entry>
			</row>
			<row>
				<entry>s</entry>
				<entry>size</entry>
				<entry>memory size in kilobytes</entry>
			</row>
			<row>
				<entry>S</entry>
				<entry>share</entry>
				<entry>amount of shared pages</entry>
			</row>
			<row>
				<entry>t</entry>
				<entry>tty</entry>
				<entry>the device number of the controling tty</entry>
			</row>
			<row>
				<entry>T</entry>
				<entry>start_time</entry>
				<entry>time process was started</entry>
			</row>
			<row>
				<entry>U</entry>
				<entry>uid</entry>
				<entry>user ID number</entry>
			</row>
			<row>
				<entry>u</entry>
				<entry>user</entry>
				<entry>user name</entry>
			</row>
			<row>
				<entry>v</entry>
				<entry>vsize</entry>
				<entry>total VM size in kB</entry>
			</row>
			<row>
				<entry>y</entry>
				<entry>priority</entry>
				<entry>kernel scheduling priority</entry>
			</row>
			<!-- (conflict, system vs. start time) 
			<row>
				<entry>K</entry>
				<entry>stime</entry>
				<entry>system time</entry>
			</row>
			-->
		</tbody>
	</tgroup>
</informaltable>
</refsection>

<refsection>
	
	<title>AIX FORMAT DESCRIPTORS</title>
	
<para>
This <command>ps</command> supports AIX format descriptors, which work 
somewhat like the formatting codes of <citerefentry>
	<refentrytitle>printf</refentrytitle>
	<manvolnum>1</manvolnum>
</citerefentry> and <citerefentry>
	<refentrytitle>printf</refentrytitle>
	<manvolnum>3</manvolnum>
</citerefentry>. For example, the normal default
output can be produced with this:  <command>ps</command
>&nbsp;<option>-e</option><option>o</option
>&nbsp;"<constant>%p</constant>&nbsp;<constant>%y</constant
>&nbsp;<constant>%x</constant>&nbsp;<constant>%c</constant>". The 
<literal>NORMAL</literal> codes are described in the next section.
</para>

<informaltable frame="none" orient="port">
	<tgroup cols="3" colsep="1" rowsep="1">
		<colspec colnum="1" colname="key" colwidth="1*" colsep="0" 
			align="left"/>
		<colspec colnum="2" colname="long" colwidth="1*" colsep="0" 
			align="left"/>
		<colspec colnum="3" colname="desc" colwidth="1*" colsep="0" 
			align="left"/>
		<thead>
			<row>
				<entry>CODE</entry>
				<entry>NORMAL</entry>
				<entry>HEADER</entry>
			</row>
		</thead>
		<tbody>
			<row>
				<entry>%C</entry>
				<entry>pcpu</entry>
				<entry>%CPU</entry>
			</row>
			<row>
				<entry>%G</entry>
				<entry>group</entry>
				<entry>GROUP</entry>
			</row>
			<row>
				<entry>%P</entry>
				<entry>ppid</entry>
				<entry>PPID</entry>
			</row>
			<row>
				<entry>%U</entry>
				<entry>user</entry>
				<entry>USER</entry>
			</row>
			<row>
				<entry>%a</entry>
				<entry>args</entry>
				<entry>COMMAND</entry>
			</row>
			<row>
				<entry>%c</entry>
				<entry>comm</entry>
				<entry>COMMAND</entry>
			</row>
			<row>
				<entry>%g</entry>
				<entry>rgroup</entry>
				<entry>RGROUP</entry>
			</row>
			<row>
				<entry>%n</entry>
				<entry>nice</entry>
				<entry>NI</entry>
			</row>
			<row>
				<entry>%p</entry>
				<entry>pid</entry>
				<entry>PID</entry>
			</row>
			<row>
				<entry>%r</entry>
				<entry>pgid</entry>
				<entry>PGID</entry>
			</row>
			<row>
				<entry>%t</entry>
				<entry>etime</entry>
				<entry>ELAPSED</entry>
			</row>
			<row>
				<entry>%u</entry>
				<entry>ruser</entry>
				<entry>RUSER</entry>
			</row>
			<row>
				<entry>%x</entry>
				<entry>time</entry>
				<entry>TIME</entry>
			</row>
			<row>
				<entry>%y</entry>
				<entry>tty</entry>
				<entry>TTY</entry>
			</row>
			<row>
				<entry>%z</entry>
				<entry>vsz</entry>
				<entry>VSZ</entry>
			</row>
		</tbody>
	</tgroup>
</informaltable>
</refsection>
	
<refsection id="stdfmt">
	
	<title id="stdfmt.title">STANDARD FORMAT SPECIFIERS</title>
	
<para>Here are the different keywords that may be used to control the output 
format (e.g. with option <option>-o</option>) or to sort the selected 
processes with the GNU-style <option>--sort</option> option.
</para>

<para>For example: <command>ps</command
>&nbsp;<option>-e</option><option
>o</option
>&nbsp;<constant>pid</constant
>,<constant>user</constant
>,<constant>args</constant
>&nbsp;<option>--sort</option
>&nbsp;<constant>user</constant>
</para>

<para>
This version of <command>ps</command> tries to recognize most of the 
keywords used in other implementations of <command>ps</command>.
</para>

<para>
The following user-defined format specifiers may contain 
spaces: <constant>args</constant>, <constant>cmd</constant
>, <constant>comm</constant>, <constant>command</constant
>, <constant>fname</constant>, <constant>ucmd</constant
>, <constant>ucomm</constant>, <constant>lstart</constant
>, <constant>bsdstart</constant>, <constant>start</constant>.
</para>

<para>Some keywords may not be available for sorting.
</para>

<informaltable frame="none">
	<tgroup cols="3" colsep="1" rowsep="1">
		<colspec colnum="1" colname="key" colwidth="10" colsep="0" 
			align="left"/>
		<colspec colnum="2" colname="long" colwidth="10" colsep="0" 
			align="left"/>
		<colspec colnum="3" colname="desc" colwidth="40" colsep="0" 
			align="left"/>
		<thead>
			<row>
				<entry>CODE</entry>
				<entry>HEADER</entry>
				<entry>DESCRIPTION</entry>
			</row>
		</thead>
		<tbody>
			<row>
				<entry><constant>%cpu</constant></entry>
				<entry>%CPU</entry>
				<entry>
<para>cpu utilization of the process in 
"<literal>##.#</literal>" format.</para>

<para><!-- force a linebreak for better readability -->
Currently, it is the 
CPU time used divided by the time 
the process has been running (cputime/realtime ratio), 
expressed as a percentage. It will not add up to 100% 
unless you are lucky. (alias <constant>pcpu</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>%mem</constant></entry>
				<entry>%MEM</entry>
				<entry>
<para>ratio of the process's resident set size  to the
physical memory on the machine, expressed as a
percentage. (alias <constant>pmem</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>args</constant></entry>
				<entry>COMMAND</entry>
				<entry>
<para>command with all its arguments as a string.
Modifications to the arguments may be shown.</para> 

<para>
The output in this column may contain spaces. A process
marked &lt;defunct&gt; is partly dead, waiting to be
fully destroyed by its parent. Sometimes the
process args will be unavailable; when this
happens, <constant>ps</constant> will instead print the executable name
in brackets. (alias <constant>cmd</constant>, <constant>command</constant>). 
See also the <constant>comm</constant> format keyword, 
the <option>-f</option> option, and the <option>c</option> option.</para>

<para>
When specified last, this column will extend to the
edge of the display. If <command>ps</command> can not determine
display width, as when output is redirected (piped)
into a file or another command, the output width is
undefined. (it may be 80, unlimited, determined by
the <envar>TERM</envar> variable, and so on) The <envar>COLUMNS</envar>
environment variable or <option>--cols</option> option may be used
to exactly determine the width in this case. The <option>w</option>
or <option>-w</option> option may be also be used to adjust width.</para>
				</entry>
			</row>
			<row>
				<entry><constant>blocked</constant></entry>
				<entry>BLOCKED</entry>
				<entry>
<para>mask of the blocked signals, 
see <citerefentry>
	<refentrytitle>signal</refentrytitle>
	<manvolnum>7</manvolnum>
</citerefentry>.</para>

<para>
According to the width of the field, a 32-bit or
64-bit mask in hexadecimal format is displayed.
(alias <constant>sig_block</constant>, <constant>sigmask</constant>).</para>
</entry>
			</row>
			<row>
				<entry><constant>bsdstart</constant></entry>
				<entry>START</entry>
				<entry>
<para>time the command started.</para>

<para>
If the process was
started less than 24 hours ago, the output format
is "HH:MM", else it is "mmm dd" (where mmm is the
three letters of the month).</para>
				</entry>
			</row>
			<row>
				<entry><constant>bsdtime</constant></entry>
				<entry>TIME</entry>
				<entry>
<para>accumulated cpu time, user + system.</para>

<para>
The display format is usualy "MMM:SS", but can be shifted to
the right if the process used more than 999 minutes
of cpu time.</para>
				</entry>
			</row>
			<row>
				<entry><constant>c</constant></entry>
				<entry>C</entry>
				<entry>
<para>processor utilization.</para> 

<para>
Currently, this is the integer value of
the percent usage over the lifetime of the process 
(see <constant>%cpu</constant>)</para>
				</entry>
			</row>
			<row>
				<entry><constant>caught</constant></entry>
				<entry>CAUGHT</entry>
				<entry>
<para>mask of the caught signals, see <citerefentry>
	<refentrytitle>signal</refentrytitle>
	<manvolnum>7</manvolnum>
</citerefentry>.</para>

<para>
According to the width of the field, a 32 or 64
bits mask in hexadecimal format is displayed.
(alias <constant>sig_catch</constant>, <constant>sigcatch</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>class</constant></entry>
				<entry>CLS</entry>
				<entry>
<para>scheduling class of the process.
(alias <constant>policy</constant>, <constant>cls</constant>).</para> 

<para>
Field's possible values are:</para>
<itemizedlist spacing="compact">
	<listitem><para>-&nbsp;&nbsp;not reported</para></listitem>
	<listitem><para>TS&nbsp;&nbsp;SCHED_OTHER</para></listitem>
	<listitem><para>FF&nbsp;&nbsp;SCHED_FIFO</para></listitem>
	<listitem><para>RR&nbsp;&nbsp;SCHED_RR</para></listitem>
	<listitem><para>?&nbsp;&nbsp;unknown value</para></listitem>
</itemizedlist>
				</entry>
			</row>
			<row>
				<entry><constant>cls</constant></entry>
				<entry>CLS</entry>
				<entry>
<para>scheduling class of the process.
(alias <constant>policy</constant>, <constant>cls</constant>).</para> 

<para>
Field's possible values are:</para>
<itemizedlist spacing="compact">
	<listitem><para>-&nbsp;&nbsp;not reported</para></listitem>
	<listitem><para>TS&nbsp;&nbsp;SCHED_OTHER</para></listitem>
	<listitem><para>FF&nbsp;&nbsp;SCHED_FIFO</para></listitem>
	<listitem><para>RR&nbsp;&nbsp;SCHED_RR</para></listitem>
	<listitem><para>?&nbsp;&nbsp;unknown value</para></listitem>
</itemizedlist>
				</entry>
			</row>
			<row>
				<entry><constant>cmd</constant></entry>
				<entry>CMD</entry>
				<entry>
<para>see <constant>args</constant>. (alias <constant>args</constant>, 
<constant>command</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>comm</constant></entry>
				<entry>COMMAND</entry>
				<entry>
<para>command name (only the executable name).</para>

<para>
Modifications to the command name will not be
shown. A process marked &lt;defunct&gt; is partly dead,
waiting to be fully destroyed by its parent. The
output in this column may contain spaces.
(alias <constant>ucmd</constant>, <constant>ucom</constant>). 
See also the args <constant>format</constant> keyword, 
the <option>-f</option> option, and the <option>c</option> option.
</para>

<para>
When specified last, this column will extend to the
edge of the display. If <command>ps</command> can not determine
display width, as when output is redirected (piped)
into a file or another command, the output width is
undefined. (it may be 80, unlimited, determined by
the <envar>TERM</envar> variable, and so on) The <envar>COLUMNS</envar>
environment variable or <option>--cols</option> option may be used
to exactly determine the width in this case. The <option>w</option>
or <option>-w</option> option may be also be used to adjust width.</para>
				</entry>
			</row>
			<row>
				<entry><constant>command</constant></entry>
				<entry>COMMAND</entry>
				<entry>
<para>see <constant>args</constant>. 
(alias <constant>args</constant>, <constant>cmd</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>cp</constant></entry>
				<entry>CP</entry>
				<entry>
<para>per-mill (tenths of a percent) CPU usage 
(see <constant>%cpu</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>cputime</constant></entry>
				<entry>TIME</entry>
				<entry>
<para>cumulative CPU time, "[dd-]hh:mm:ss" format. 
(alias <constant>time</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>egid</constant></entry>
				<entry>EGID</entry>
				<entry>
<para>effective group ID number of the process as a decimal integer. 
(alias <constant>gid</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>egroup</constant></entry>
				<entry>EGROUP</entry>
				<entry>
<para>effective group ID of the process.</para>
					
<para>
This will be the textual group ID, if it can be obtained and the
field width permits, or a decimal representation
otherwise. (alias <constant>group</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>eip</constant></entry>
				<entry>EIP</entry>
				<entry>
<para>instruction pointer.</para>
				</entry>
			</row>
			<row>
				<entry><constant>esp</constant></entry>
				<entry>ESP</entry>
				<entry>
<para>stack pointer.</para>
				</entry>
			</row>
			<row>
				<entry><constant>etime</constant></entry>
				<entry>ELAPSED</entry>
				<entry>
<para>elapsed time since the process was started, in the
form [[dd-]hh:]mm:ss.</para>
				</entry>
			</row>
			<row>
				<entry><constant>euid</constant></entry>
				<entry>EUID</entry>
				<entry>
<para>effective user ID. (alias <constant>uid</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>euser</constant></entry>
				<entry>EUSER</entry>
				<entry>
<para>effective user name.</para>
					
<para>
This will be the textual user ID, if it can be obtained and the field width
permits, or a decimal representation otherwise.</para>
					
<para>
The <option>n</option> option can be used to force the decimal representation.
(alias <constant>uname</constant>, <constant>user</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>f</constant></entry>
				<entry>F</entry>
				<entry>
<para>flags associated with the process, see 
the <citation><link linkend="procflags" endterm="procflags.title"/></citation> 
section. (alias <constant>flag</constant>, <constant>flags</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>fgid</constant></entry>
				<entry>FGID</entry>
				<entry>
<para>filesystem access group ID. (alias <constant>fsgid</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>fgroup</constant></entry>
				<entry>FGROUP</entry>
				<entry>
<para>filesystem access group ID.</para>
					
<para>This will be the
textual user ID, if it can be obtained and the
field width permits, or a decimal representation
otherwise. (alias <constant>fsgroup</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>flag</constant></entry>
				<entry>F</entry>
				<entry>
<para>see <constant>f</constant>. 
(alias <constant>f</constant>, <constant>flags</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>flags</constant></entry>
				<entry>F</entry>
				<entry>
<para>see <constant>f</constant>. 
(alias <constant>f</constant>, <constant>flag</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>fname</constant></entry>
				<entry>COMMAND</entry>
				<entry>
<para>first 8 bytes of the base name of the process's
executable file.</para>

<para>
The output in this column may contain spaces.</para>
				</entry>
			</row>
			<row>
				<entry><constant>fuid</constant></entry>
				<entry>FUID</entry>
				<entry>
<para>filesystem access user ID. (alias <constant>fsuid</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>fuser</constant></entry>
				<entry>FUSER</entry>
				<entry>
<para>filesystem access user ID.</para>

<para>
This will be the textual
user ID, if it can be obtained and the field width
permits, or a decimal representation otherwise.</para>
				</entry>
			</row>
			<row>
				<entry><constant>gid</constant></entry>
				<entry>GID</entry>
				<entry>
<para>see <constant>egid</constant>. (alias <constant>egid</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>group</constant></entry>
				<entry>GROUP</entry>
				<entry>
<para>see <constant>egroup</constant>. (alias <constant>egroup</constant>)
.</para>
				</entry>
			</row>
			<row>
				<entry><constant>ignored</constant></entry>
				<entry>IGNORED</entry>
				<entry>
<para>mask of the ignored signals, see <citerefentry>
	<refentrytitle>signal</refentrytitle>
	<manvolnum>7</manvolnum>
</citerefentry>.</para>
					
<para>
According to the width of the field, a 32-bit or
64-bit mask in hexadecimal format is displayed.
(alias <constant>sig_ignore</constant>, <constant>sigignore</constant>)</para>
				</entry>
			</row>
			<row>
				<entry><constant>label</constant></entry>
				<entry>LABEL</entry>
				<entry>
<para>security label, most commonly used for SE Linux context data.</para>
					
<para>
This is for the Mandatory Access
Control ("MAC") found on high-security systems.</para>
				</entry>
			</row>
			<row>
				<entry><constant>lstart</constant></entry>
				<entry>STARTED</entry>
				<entry>
<para>time the command started.</para>
				</entry>
			</row>
			<row>
				<entry><constant>lwp</constant></entry>
				<entry>LWP</entry>
				<entry>
<para>lwp (light weight process, or thread) ID of the lwp
being reported. (alias <constant>spid</constant>, <constant>tid</constant>)
.</para>
				</entry>
			</row>
			<row>
				<entry><constant>ni</constant></entry>
				<entry>NI</entry>
				<entry>
<para>nice value.</para>
				
<para>
This ranges from 19 (nicest) to -20
(not nice to others), see <citerefentry>
<refentrytitle>nice</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>. (alias <constant>nice</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>nice</constant></entry>
				<entry>NI</entry>
				<entry>
<para>see <constant>ni</constant>. (alias <constant>ni</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>nlwp</constant></entry>
				<entry>NLWP</entry>
				<entry>
<para>number of lwps (threads) in the process.
(alias <constant>thcount</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>nwchan</constant></entry>
				<entry>WCHAN</entry>
				<entry>
<para>address of the kernel function where the process is
sleeping (use <constant>wchan</constant> if you want the kernel function
name).</para>

<para>
Running tasks will display a dash ('-') in this column.</para>
				</entry>
			</row>
			<row>
				<entry><constant>pcpu</constant></entry>
				<entry>%CPU</entry>
				<entry>
<para>see <constant>%cpu</constant>. (alias <constant>%cpu</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>pending</constant></entry>
				<entry>PENDING</entry>
				<entry>
<para>mask of the pending signals. See <citerefentry>
	<refentrytitle>signal</refentrytitle>
	<manvolnum>7</manvolnum>
</citerefentry>.</para>
					
<para>
Signals pending on the process are distinct from signals
pending on individual threads. Use the <option>m</option> option or
the <option>-m</option> option to see both. According to the width
of the field, a 32-bit or 64-bit mask in
hexadecimal format is displayed. (alias <constant>sig</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>pgid</constant></entry>
				<entry>PGID</entry>
				<entry>
<para>process group ID or, equivalently, the process ID
of the process group leader. (alias <constant>pgrp</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>pgrp</constant></entry>
				<entry>PGRP</entry>
				<entry>
<para>see <constant>pgid</constant>. (alias <constant>pgid</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>pid</constant></entry>
				<entry>PID</entry>
				<entry>
<para>process ID number of the process.</para>
				</entry>
			</row>
			<row>
				<entry><constant>pmem</constant></entry>
				<entry>%MEM</entry>
				<entry>
<para>see <constant>%mem</constant>. (alias <constant>%mem</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>policy</constant></entry>
				<entry>POL</entry>
				<entry>
<para>scheduling class of the process. 
(alias <constant>class</constant>, <constant>cls</constant>).</para>
 
<para>
Field's possible values are:</para>
<itemizedlist spacing="compact">
	<listitem><para>-&nbsp;&nbsp;not reported</para></listitem>
	<listitem><para>TS&nbsp;&nbsp;SCHED_OTHER</para></listitem>
	<listitem><para>FF&nbsp;&nbsp;SCHED_FIFO</para></listitem>
	<listitem><para>RR&nbsp;&nbsp;SCHED_RR</para></listitem>
	<listitem><para>?&nbsp;&nbsp;unknown value</para></listitem>
</itemizedlist>
				</entry>
			</row>
			<row>
				<entry><constant>ppid</constant></entry>
				<entry>PPID</entry>
				<entry>
<para>parent process ID.</para>
				</entry>
			</row>
			<row>
				<entry><constant>psr</constant></entry>
				<entry>PSR</entry>
				<entry>
<para>processor that process is currently assigned to.</para>
				</entry>
			</row>
			<row>
				<entry><constant>rgid</constant></entry>
				<entry>RGID</entry>
				<entry>
<para>real group ID.</para>
				</entry>
			</row>
			<row>
				<entry><constant>rgroup</constant></entry>
				<entry>RGROUP</entry>
				<entry>
<para>real group name.</para>
<para>
This will be the textual group ID,
if it can be obtained and the field width permits,
or a decimal representation otherwise.</para>
				</entry>
			</row>
			<row>
				<entry><constant>rss</constant></entry>
				<entry>RSS</entry>
				<entry>
<para>resident set size, the non-swapped physical memory
that a task has used (in kiloBytes).
(alias <constant>rssize</constant>, <constant>rsz</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>rssize</constant></entry>
				<entry>RSS</entry>
				<entry>
<para>see <constant>rss</constant>. 
(alias <constant>rss</constant>, <constant>rsz</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>rsz</constant></entry>
				<entry>RSZ</entry>
				<entry>
<para>see <constant>rss</constant>. 
(alias <constant>rss</constant>, <constant>rssize</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>rtprio</constant></entry>
				<entry>RTPRIO</entry>
				<entry>
<para>realtime priority.</para>
				</entry>
			</row>
			<row>
				<entry><constant>ruid</constant></entry>
				<entry>RUID</entry>
				<entry>
<para>real user ID.</para>
				</entry>
			</row>
			<row>
				<entry><constant>ruser</constant></entry>
				<entry>RUSER</entry>
				<entry>
<para>real user ID.</para>
<para>
This will be the textual user ID,
if it can be obtained and the field width permits,
or a decimal representation otherwise.</para>
				</entry>
			</row>
			<row>
				<entry><constant>s</constant></entry>
				<entry>S</entry>
				<entry>
<para>minimal state display (one character).</para>
<para>
See section <citation><link linkend="procstatecodes" 
endterm="procstatecodes.title"/></citation> for the different values.
See also <constant>stat</constant> if you want additionnal information
displayed. (alias <constant>state</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>sched</constant></entry>
				<entry>SCH</entry>
				<entry>
<para>scheduling policy of the process.</para>
<para>
The policies sched_other, sched_fifo, and sched_rr are
respectively displayed as 0, 1, and 2.</para>
				</entry>
			</row>
			<row>
				<entry><constant>sess</constant></entry>
				<entry>SESS</entry>
				<entry>
<para>session ID or, equivalently, the process ID of the
session leader. (alias <constant>session</constant>, 
<constant>sid</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>sgi_p</constant></entry>
				<entry>P</entry>
				<entry>
<para>processor that the process is currently executing
on.</para>
<para>
Displays "*" if the process is not currently
running or runnable.</para>
				</entry>
			</row>
			<row>
				<entry><constant>sgid</constant></entry>
				<entry>SGID</entry>
				<entry>
<para>saved group ID. (alias <constant>svgid</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>sgroup</constant></entry>
				<entry>SGROUP</entry>
				<entry>
<para>saved group name.</para>
<para>
This will be the textual group ID, if it can be obtained and the field width
permits, or a decimal representation otherwise.</para>
				</entry>
			</row>
			<row>
				<entry><constant>sid</constant></entry>
				<entry>SID</entry>
				<entry>
<para>see <constant>sess</constant>. (alias <constant>sess</constant>, 
<constant>session</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>sig</constant></entry>
				<entry>PENDING</entry>
				<entry>
<para>see <constant>pending</constant>. 
(alias <constant>pending</constant>, <constant>sig_pend</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>sigcatch</constant></entry>
				<entry>CAUGHT</entry>
				<entry>
<para>see <constant>caught</constant>. 
(alias <constant>caught</constant>, <constant>sig_catch</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>sigignore</constant></entry>
				<entry>IGNORED</entry>
				<entry>
<para>see <constant>ignored</constant>. 
(alias <constant>ignored</constant>, <constant>sig_ignore</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>sigmask</constant></entry>
				<entry>BLOCKED</entry>
				<entry>
<para>see <constant>blocked</constant>. 
(alias <constant>blocked</constant>, <constant>sig_block</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>size</constant></entry>
				<entry>SZ</entry>
				<entry>
<para>approximate amount of swap space that would be
required if the process were to dirty all writable
pages and then be swapped out.</para>
<para>
This number is very rough!</para>
				</entry>
			</row>
			<row>
				<entry><constant>spid</constant></entry>
				<entry>SPID</entry>
				<entry>
<para>see <constant>lwp</constant>. 
(alias <constant>lwp</constant>, <constant>tid</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>stackp</constant></entry>
				<entry>STACKP</entry>
				<entry>
<para>address of the bottom (start) of stack for the process.</para>
				</entry>
			</row>
			<row>
				<entry><constant>start</constant></entry>
				<entry>STARTED</entry>
				<entry>
<para>time the command started.</para>
<para>
If the process was started less than 24 hours ago, the output format
is "HH:MM:SS", else it is "  mmm dd" (where mmm is
a three-letter month name).</para>
				</entry>
			</row>
			<row>
				<entry><constant>stat</constant></entry>
				<entry>STAT</entry>
				<entry>
<para>multi-character process state.</para>
<para>
See <citation><link linkend="procstatecodes" 
endterm="procstatecodes.title"/></citation> for the different values meaning. 
See also <constant>s</constant> and <constant>state</constant> if you just 
want the first character displayed.</para>
				</entry>
			</row>
			<row>
				<entry><constant>state</constant></entry>
				<entry>S</entry>
				<entry>
<para>see <constant>s</constant>. (alias <constant>s</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>suid</constant></entry>
				<entry>SUID</entry>
				<entry>
<para>saved user ID. (alias <constant>svuid</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>suser</constant></entry>
				<entry>SUSER</entry>
				<entry>
<para>saved user name.</para>
<para>
This will be the textual user ID,
if it can be obtained and the field width permits,
or a decimal representation otherwise.
(alias <constant>svuser</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>svgid</constant></entry>
				<entry>SVGID</entry>
				<entry>
<para>see <constant>sgid</constant>. (alias <constant>sgid</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>svuid</constant></entry>
				<entry>SVUID</entry>
				<entry>
<para>see <constant>suid</constant>. (alias <constant>suid</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>sz</constant></entry>
				<entry>SZ</entry>
				<entry>
<para>size in physical pages of the core image of the process.</para>
<para>
This includes text, data, and stack space.
Device mappings are currently excluded; this is
subject to change. 
See <constant>vsz</constant> and <constant>rss</constant>.</para>
				</entry>
			</row>
			<row>
				<entry><constant>thcount</constant></entry>
				<entry>THCNT</entry>
				<entry>
<para>number of kernel threads owned by the process. 
see <constant>nlwp</constant>. 
(alias <constant>nlwp</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>tid</constant></entry>
				<entry>TID</entry>
				<entry>
<para>see <constant>lwp</constant>. 
(alias <constant>lwp</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>time</constant></entry>
				<entry>TIME</entry>
				<entry>
<para>cumulative CPU time, "[dd-]hh:mm:ss" format.
(alias <constant>cputime</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>tname</constant></entry>
				<entry>TTY</entry>
				<entry>
<para>controlling tty (terminal). 
(alias <constant>tt</constant>, <constant>tty</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>tpgid</constant></entry>
				<entry>TPGID</entry>
				<entry>
<para>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.</para>
				</entry>
			</row>
			<row>
				<entry><constant>tt</constant></entry>
				<entry>TT</entry>
				<entry>
<para>controlling tty (terminal). 
(alias <constant>tname</constant>, <constant>tty</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>tty</constant></entry>
				<entry>TT</entry>
				<entry>
<para>controlling tty (terminal). 
(alias <constant>tname</constant>, <constant>tt</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>ucmd</constant></entry>
				<entry>CMD</entry>
				<entry>
<para>see <constant>comm</constant>. 
(alias <constant>comm</constant>, <constant>ucomm</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>ucomm</constant></entry>
				<entry>COMMAND</entry>
				<entry>
<para>see <constant>comm</constant>. 
(alias <constant>comm</constant>, <constant>ucmd</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>uid</constant></entry>
				<entry>UID</entry>
				<entry>
<para>see <constant>euid</constant>. 
(alias <constant>euid</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>uname</constant></entry>
				<entry>USER</entry>
				<entry>
<para>see <constant>euser</constant>. 
(alias <constant>euser</constant>, <constant>user</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>vsize</constant></entry>
				<entry>VSZ</entry>
				<entry>
<para>see <constant>vsz</constant>. (alias <constant>vsz</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>vsz</constant></entry>
				<entry>VSZ</entry>
				<entry>
<para>virtual memory size of the process in KiB (1024-byte units).</para>
<para>
Device mappings are currently excluded; this is subject to change. 
(alias <constant>vsize</constant>).</para>
				</entry>
			</row>
			<row>
				<entry><constant>wchan</constant></entry>
				<entry>WCHAN</entry>
				<entry>
<para>name of the kernel function in which the process is 
sleeping, a "-" if the process is running, or a
"*" if the process is multi-threaded and <command>ps</command> is not
displaying threads.</para>
				</entry>
			</row>
		</tbody>
	</tgroup>
</informaltable>
</refsection>

<refsection>
	<title>ENVIRONMENT VARIABLES</title>
	
	<para>The following environment variables could 
affect <command>ps</command>:</para>
	<variablelist>
		<varlistentry>
			<term><envar>COLUMNS</envar></term>
			<listitem><para>Override default display width.</para>
			</listitem>
		</varlistentry>
		<varlistentry>
			<term><envar>LINES</envar></term>
			<listitem><para>Override default display height.</para>
			</listitem>
		</varlistentry>
		<varlistentry>
			<term><envar>PS_PERSONALITY</envar></term>
			<listitem><para>Set to one of posix, old, linux, bsd, sun, digital
			... (see section <citation><link linkend="personality"
			endterm="personality.title"/></citation> below).</para>
			</listitem>
		</varlistentry>
		<varlistentry>
			<term><envar>CMD_ENV</envar></term>
			<listitem><para>Set to one of posix, old, linux, bsd, sun, digital
			... (see section <citation><link linkend="personality"
			endterm="personality.title"/></citation> below).</para>
			</listitem>
		</varlistentry>
		<varlistentry>
			<term><envar>I_WANT_A_BROKEN_PS</envar></term>
			<listitem><para>Force obsolete command line interpretation.</para>
			</listitem>
		</varlistentry>
		<varlistentry>
			<term><envar>LC_TIME</envar></term>
			<listitem><para>Date format.</para></listitem>
		</varlistentry>
		<varlistentry>
			<term><envar>PS_COLORS</envar></term>
			<listitem><para>Not currently supported.</para></listitem>
		</varlistentry>
		<varlistentry>
			<term><envar>PS_FORMAT</envar></term>
			<listitem><para>Default output format override. You may set this 
				to a format string of the type used for 
				the <option>-o</option> option. 
				The <constant>DefSysV</constant> and <constant
				>DefBSD</constant> values are particularly 
				useful.</para>
			</listitem>
		</varlistentry>
		<varlistentry>
			<term><envar>PS_SYSMAP</envar></term>
			<listitem><para>Default namelist (System.map) location.</para>
			</listitem>
		</varlistentry>
		<varlistentry>
			<term><envar>PS_SYSTEM_MAP</envar></term>
			<listitem><para>Default namelist (System.map) location.</para>
			</listitem>
		</varlistentry>
		<varlistentry>
			<term><envar>POSIXLY_CORRECT</envar></term>
			<listitem><para>Don't find excuses to ignore bad "features".</para>
			</listitem>
		</varlistentry>
		<varlistentry>
			<term><envar>POSIX2</envar></term>
			<listitem><para>When set to "on", acts as 
			<envar>POSIXLY_CORRECT</envar>.</para></listitem>
		</varlistentry>
		<varlistentry>
			<term><envar>UNIX95</envar></term>
			<listitem><para>Don't find excuses to ignore bad "features".</para>
			</listitem>
		</varlistentry>
		<varlistentry>
			<term><envar>_XPG</envar></term>
			<listitem><para>Cancel <envar>CMD_ENV</envar>=irix non-standard 
			behavior.</para></listitem>
		</varlistentry>
	</variablelist>
<para>
In general, it is a bad idea to set these variables. The one exception 
is <envar>CMD_ENV</envar> or <envar>PS_PERSONALITY</envar>, which could be set 
to Linux for normal systems. Without that setting, ps follows the useless 
and bad parts of the Unix98 standard.
</para>
</refsection>

<refsection id="personality">
	
	<title id="personality.title">PERSONALITY</title>
	
	<informaltable frame="none">
		<tgroup cols="2">
			<colspec colname="col1" align="left" colwidth="1*" colnum="1" colsep="0"/>
			<colspec colname="col2" align="left" colwidth="1*" colnum="2" colsep="0"/>
			<tbody>
				<row>
					<entry>390</entry>
					<entry>like the S/390 OpenEdition <command>ps</command>
					</entry>
				</row>
				<row>
					<entry>aix</entry>
					<entry>like AIX <command>ps</command></entry>
				</row>
				<row>
					<entry>bsd</entry>
					<entry>like FreeBSD <command>ps</command
						> (totally non-standard)</entry>
				</row>
				<row>
					<entry>compaq</entry>
					<entry>like Digital Unix <command>ps</command></entry>
				</row>
				<row>
					<entry>debian</entry>
					<entry>like the old Debian <command>ps</command></entry>
				</row>
				<row>
					<entry>digital</entry>
					<entry>like Tru64 (was Digital Unix, was OSF/1) <command
						>ps</command></entry>
				</row>
				<row>
					<entry>gnu</entry>
					<entry>like the old Debian <command>ps</command></entry>
				</row>
				<row>
					<entry>hp</entry>
					<entry>like HP-UX <command>ps</command></entry>
				</row>
				<row>
					<entry>hpux</entry>
					<entry>like HP-UX <command>ps</command></entry>
				</row>
				<row>
					<entry>irix</entry>
					<entry>like Irix <command>ps</command></entry>
				</row>
				<row>
					<entry>linux</entry>
					<entry>***** RECOMMENDED *****</entry>
				</row>
				<row>
					<entry>old</entry>
					<entry>like the original Linux <command>ps</command
					> (totally non-standard)</entry>
				</row>
				<row>
					<entry>os390</entry>
					<entry>like OS/390 Open Edition <command>ps</command>
					</entry>
				</row>
				<row>
					<entry>posix</entry>
					<entry>standard</entry>
				</row>
				<row>
					<entry>s390</entry>
					<entry>like OS/390 Open Edition <command>ps</command>
					</entry>
				</row>
				<row>
					<entry>sco</entry>
					<entry>like SCO <command>ps</command></entry>
				</row>
				<row>
					<entry>sgi</entry>
					<entry>like Irix <command>ps</command></entry>
				</row>
				<row>
					<entry>solaris2</entry>
					<entry>like Solaris 2+ (SunOS 5) <command>ps</command>
					</entry>
				</row>
				<row>
					<entry>sunos4</entry>
					<entry>like SunOS 4 (Solaris 1) <command
					>ps</command> (totally non-standard)</entry>
				</row>
				<row>
					<entry>svr4</entry>
					<entry>standard</entry>
				</row>
				<row>
					<entry>sysv</entry>
					<entry>standard</entry>
				</row>
				<row>
					<entry>tru64</entry>
					<entry>like Tru64 (was Digital Unix, was OSF/1) <command
					>ps</command></entry>
				</row>
				<row>
					<entry>unix</entry>
					<entry>standard</entry>
				</row>
				<row>
					<entry>unix95</entry>
					<entry>standard</entry>
				</row>
				<row>
					<entry>unix98</entry>
					<entry>standard</entry>
				</row>
			</tbody>
		</tgroup>
		
	</informaltable>
</refsection>

<refsection>
	
	<title>SEE ALSO</title>
	
	<para><citerefentry>
	<refentrytitle>top</refentrytitle>
	<manvolnum>1</manvolnum>
	</citerefentry>, <citerefentry>
		<refentrytitle>pgrep</refentrytitle>
		<manvolnum>1</manvolnum>
	</citerefentry>, <citerefentry>
		<refentrytitle>proc</refentrytitle>
		<manvolnum>5</manvolnum>
	</citerefentry>.
	</para>
</refsection>

<refsection>
	<title>STANDARDS</title>
	
	<para>This <command>ps</command> conforms to:</para>
	<orderedlist numeration="arabic" spacing="compact">
		<listitem>
<para>Version 2 of the Single Unix Specification</para>
		</listitem>
		<listitem>
<para>The Open Group Technical Standard Base Specifications, Issue 6</para>
		</listitem>
		<listitem>
<para>IEEE Std 1003.1, 2004 Edition</para>
		</listitem>
		<listitem>
<para>X/Open System Interfaces Extension [UP XSI]</para>
		</listitem>
		<listitem>
<para>ISO/IEC 9945:2003</para>
		</listitem>
	</orderedlist>
</refsection>

<refsection>
	
	<title>AUTHOR</title>
	
<para>
<command>ps</command> was originally written by 
Branko Lankester <email>lankeste@fwi.uva.nl</email>. 
Michael K. Johnson <email>johnsonm@redhat.com</email> re-wrote it 
significantly to use the proc filesystem, changing a few things in the 
process. Michael Shields <email>mjshield@nyx.cs.du.edu</email> added the 
pid-list feature. Charles Blake <email>cblake@bbn.com</email> added 
multi-level sorting, the dirent-style library, the device name-to-number 
mmaped database, the approximate binary search directly on System.map, and 
many code and documentation cleanups. David Mossberger-Tang wrote the generic 
BFD support for psupdate. Albert Cahalan <email>albert@users.sf.net</email> 
rewrote ps for full Unix98 and BSD support, along with some ugly hacks for 
obsolete and foreign syntax.
</para>

<para>Please send bug reports to <email>procps-feedback@lists.sf.net</email>. 
No subscription is required or suggested.</para>
	
</refsection>
	
</refentry>

