diff options
Diffstat (limited to 'doc/s6-ps.html')
-rw-r--r-- | doc/s6-ps.html | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/doc/s6-ps.html b/doc/s6-ps.html new file mode 100644 index 0000000..43ed0d2 --- /dev/null +++ b/doc/s6-ps.html @@ -0,0 +1,128 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-ps program</title> + <meta name="Description" content="s6-linux-utils: the s6-ps program" /> + <meta name="Keywords" content="s6 linux administration root utilities ps proc procps process list" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-ps</tt> program </h1> + +<p> + <tt>s6-ps</tt> shows a list of processes on the system. +</p> + +<h2> Interface </h2> + +<pre> + s6-ps [ -H ] [ -w spacing ] [ -W chanfile ] [ -l | -o <em>field</em>,<em>field</em>,... ] +</pre> + +<ul> + <li> s6-ps assumes the <em>proc</em> filesystem is mounted on <tt>/proc</tt>. +It scans <tt>/proc</tt> for a list of all processes on the system. </li> + <li> It prints a header line, then information about the processes it has found, +one process per line. Then it exits 0. </li> + <li> If s6-ps is not allowed to read a field, it will print <tt>*</tt> (a star) instead +of the field's content. <tt>-</tt> (a dash) means the field is unapplicable here, +for instance the "tty" field for a process that has no controlling terminal. </li> +</ul> + +<h2> Options </h2> + +<ul> + <li> <tt>-H</tt> : tree. s6-ps will display he process list as a tree, +as <tt>ps f</tt> does. It will print kernel processes first, then user processes. +By default, the processes are simply ordered by increasing pid number, without +care for the process hierarchy. </li> + <li> <tt>-w <em>spacing</em></tt> : leave at least <em>spacing</em> +space characters between two adjacent fields. Minimum is 1, default is 2, +maximum is 256. </li> + <li> <tt>-W <em>wchanfile</em></tt> : force <em>wchanfile</em> as the +file listing kernel addresses for WCHAN fields. By default, s6-ps tries to use +<tt>/proc/kallsyms</tt>, <tt>/boot/System.map-`uname -r`</tt>, and +<tt>/boot/System.map</tt>, in that order. </li> + <li> <tt>-l</tt> : long. Equivalent to +<tt>-o user,pid,cpcpu,pmem,vsize,rss,tty,s,start,cttime,args</tt>. </li> + <li> <tt>-o <em>fieldlist</em></tt> : list of fields to print. +<em>fieldlist</em> must be a comma-separated list of fields, without spaces. +Fields cannot be duplicated. They will be printed in the given order. +The valid field names are listed below. The default field list is +<tt>user,pid,tty,s,start,args</tt>. </li> +</ul> + +<h2> Fields </h2> + +<p> + The <tt>-o</tt> option makes it possible to customize s6-ps's output. Here are the +recognized <em>field</em> keywords and the corresponding field they display. +</p> + +<ul> + <li> <tt>pid</tt> : the process id number. </li> + <li> <tt>comm</tt> : the command name as known by the kernel. </li> + <li> <tt>s</tt> : the one-character state of the process, then <tt>s</tt> +if the process is a session leader or <tt>+</tt> if it is a foreground +process group leader, then <tt>N</tt> if +the process is niced or <tt><</tt> if it is anti-niced. Unlike ps, s6-ps +cannot tell whether a process has locked memory pages or not. </li> + <li> <tt>ppid</tt> : the parent process' pid. </li> + <li> <tt>pgrp</tt> : the process group number. </li> + <li> <tt>sess</tt> : the session leader's pid. </li> + <li> <tt>tty</tt> : the name of the process's controlling terminal.</li> + <li> <tt>tpgid</tt> : the pid of the foreground process group. </li> + <li> <tt>utime</tt> : the time the process spent in user mode. </li> + <li> <tt>stime</tt> : the time the process spent in kernel mode. </li> + <li> <tt>cutime</tt> : the time spent in user mode by the process and +all its dead children. </li> + <li> <tt>cstime</tt> : the time spent in kernel mode by the process and +all its dead children. </li> + <li> <tt>prio</tt> : the process' priority as computed by the kernel. </li> + <li> <tt>nice</tt> : the process' nice value. </li> + <li> <tt>thcount</tt> : the number of threads in the process. </li> + <li> <tt>start</tt> : the start time of the process. </li> + <li> <tt>vsize</tt> : the virtual memory size of the process. </li> + <li> <tt>rss</tt> : the resident set size of the process. </li> + <li> <tt>rsslimit</tt> : the maximum rss allowed for the process. </li> + <li> <tt>psr</tt> : the number of the CPU the process is running on. </li> + <li> <tt>rtprio</tt> : the real-time priority of the process. </li> + <li> <tt>policy</tt> : the real-time policy of the process - a symbolic name. </li> + <li> <tt>user</tt> : the user the process is running as. </li> + <li> <tt>group</tt> : the group the process is running as. </li> + <li> <tt>pmem</tt> : the percentage of the available virtual memory the process +is using. Be aware that it is a very rough estimate: determining exactly how much memory +a process is using is a complex task. </li> + <li> <tt>wchan</tt> : the name or address of the kernel function where the +proces is sleeping. It is actually very rare that a kernel is configured to properly +export that value, because it incurs a small performance cost. </li> + <li> <tt>args</tt> : the command line of the process. </li> + <li> <tt>env</tt> : the process environment. s6-ps can normally only print +the environment for processes running as the same user, or if it is run as root. +Be aware that the environment is usually quite large, and will create very long +lines, likely to mess up the display on a standard terminal. </li> +</li> + <li> <tt>pcpu</tt> : the percentage of CPU used by the process (total cpu time +divided by total running time). It is a mean value and does not reflect current CPU +usage. </li> + <li> <tt>ttime</tt> : total CPU time used by the process (user + kernel mode). </li> + <li> <tt>cttime</tt> : total CPU time used by the process and all its dead +children (user + kernel mode). </li> + <li> <tt>tstart</tt> : the start time of the process as a +<a href="http://cr.yp.to/libtai/tai64.html">TAI64N</a> value. </li> + <li> <tt>cpcpu</tt> : the percentage of CPU used by the process and its dead +children (total cpu time +divided by total running time). It is a mean value and does not reflect current CPU +usage. </li> +</ul> + +</body> +</html> |