Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
oldps(1)
Edit
PageHistory
Diff
Info
LikePages
PS !!!PS NAME SYNOPSIS DESCRIPTION COMMAND-LINE OPTIONS LONG COMMAND-LINE OPTIONS SORT KEYS FIELD DESCRIPTIONS UPDATING NOTES AUTHOR ---- !!NAME ps - report process status !!SYNOPSIS ps [[__lujsvmaxScewhrnu__] [[__t__''xx''] [[__O__[[__+__|__-__]''k1''[[[[__+__|__-__]''k2''...]] [[''pids''] there are also three long options: __--sort__''X''[[__+__|__-__]''key''[[,[[__+__|__-__]''key''[[,__...__]] __--help__ __--version__ More long options are on the way... !!DESCRIPTION __ps__ gives a snapshot of the current processes. If you want a repetitive update of this status, use __top__. This man page documents the ''/proc''-based version of __ps__, or tries to. !!COMMAND-LINE OPTIONS The command-line options for this version of __ps__ are derived from the BSD version of __ps__, not the System V version. The command-line arguments should __not__ be preceeded by a `-' character, because in the future, a `-' will be used to indicate Unix98-standard command-line arguments, while no `-' will indicate the current ``extended BSD'' style of command line arguments. For now, ps will give you a warning if you use a `-' for a short option, but it will still work. If you have shell scripts which use BSD-style arguments to ps, take heed of the warning and fix them, or else your scripts will fail to function correctly at some point in the future. If you want to turn off the warnings, set the __I_WANT_A_BROKEN_PS__ environment variable. There are also some ``long options'' in GNU style; see below for those. __l__ long format __u__ user format: gives user name and start time __j__ jobs format: pgid sid __s__ signal format __v__ vm format __m__ displays memory info (combine with __p__ flag to get number of pages). __f__ __a__ show processes of other users too __x__ show processes without controlling terminal __S__ add child cpu time and page faults __c__ command name from task_struct __e__ show environment after command line and ` + ' __w__ wide output: don't truncate command lines to fit on one line. To be exact, every w that is specified will add another possible line to the output. If the space isn't needed it isn't used. You may up to 100 __w__'s. __h__ no header __r__ running procs only __n__ numeric output for __USER__ and __WCHAN__. __t__''xx'' only procs with controlling tty ''xx''; for ''xx'' you may use either the name of a device file under ''tty'' or ''cu'' sliced off. This is the reverse heuristic that ps uses to print out the abbreviated tty name in the __TT__ field, e.g. __ps t1__. __O__[[__+__|__-__]''k1''[[,[[__+__|__-__]''k2''[[,__...__]] Order the process listing according to the multi-level sort specified by the sequence of ''short'' keys from __SORT KEYS__, ''k1'', ''k2'', ... Default order specifications exist for each of the various formats of __ps__. These are over-ridden by a user specified ordering. The `+' is quite optional, merely re-iterating the default direction on a key. `-' reverses direction only on the key it precedes. As with __t__ and ''pids'', the O option must be the last option in a single command argument, but specifications in successive arguments are catenated. ''pids'' List only the specified processes; they are comma-delimited. The list must be given immediately after the last option in a single command-line argument, with no intervening space, e.g. __ps j1,4,5__. Lists specified in subsequent arguments are catenated, e.g. __ps l 1,2 3,4 5 6__ will list all of the processes 1-6 in long format. If pids are given, they are listed no matter what. If a tty is given matching processes are listed no matter what. These two features override the 'a' and 'x' flags. !!LONG COMMAND-LINE OPTIONS These options are preceeded by a double-hyphen. __--sort__''X''[[__+__|__-__]''key''[[,[[__+__|__-__]''key''[[,__...__]] Choose a ''multi-letter key'' from the __SORT KEYS__ section. ''X'' may be any convenient separator character. To be GNU-ish use `='. The `+' is really optional since default direction is increasing numerical or lexicographic order. E.g.: __ps jax --sort=uid,-ppid,+pid__ __--help__ Get a help message that summarizes the usage and gives a list of supported sort keys. This list may be more up to date than this man page. __--version__ Display version and source of this program. !!SORT KEYS 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. If someone wants to volunteer to write special comparison functions for the cooked values, ... ;-) SHORT LONG DESCRIPTION c cmd simple name of executable C cmdline full command line f flags flags as in long format F field g pgrp process group ID G tpgid controlling tty process group ID j cutime cumulative user time J cstime cumulative system time k utime user time K stime system time m min_flt number of minor page faults M maj_flt number of major page faults n cmin_flt cumulative minor page faults N cmaj_flt cumulative major page faults o session session ID p pid process ID P ppid parent process ID r rss resident set size R resident resident pages s size memory size in kilobytes S share amount of shared pages t tty the minor device number of tty T start_time time process was started U uid user ID number u user user name v vsize total VM size in bytes y priority kernel scheduling priority !!FIELD DESCRIPTIONS __PRI__ This is the counter field in the task struct. It is the time in __HZ__ of the process's possible timeslice. __NI__ Standard unix nice value; a positive value means less cpu time. __SIZE__ Virtual image size; size of text+data+stack. __RSS__ Resident set size; kilobytes of program in memory. __WCHAN__ Name of the kernel function where the process is sleeping, with the `__sys___' stripped from the function name. If ''/etc/psdatabase'' does not exist, it is just a hex number instead. __STAT__ Information about the status of the process. The first field is __R__ for runnable, __S__ for sleeping, __D__ for uninterruptible sleep, __T__ for stopped or traced, or __Z__ for a zombie process. The second field contains __W__ if the process has no resident pages. The third field is __N__ if the process has a positive nice value (__NI__ field). __TT__ Controlling tty. __PAGEIN__ Number of major page faults (page faults that cause pages to be read from disk, including pages read from the buffer cache). __TRS__ Text resident size. __SWAP__ Kilobytes (or pages if __p__ is used) on swap device. __SHARE__ Shared memory. !!UPDATING This __proc__-based __ps__ works by reading the files in the __proc__ filesystem, mounted on __/proc__. This __ps__ does not need to be suid __kmem__ or have any privileges to run. ''Do not give this ps any special permissions.'' You will need to put in place the appropriate System.map file when you install a new kernel in order to get meaningful information from the __WCHAN__ field. This should be done every time you compile a new kernel. You should also run 'ps' as root once and then any time the tty devices in the __ As of procps-1.00, ps/top read System.map directly if it is available. The search path for kernel address-to-symbol resolution is: $PS_SYSTEM_MAP /boot/System.map-`uname -r` /boot/System.map /lib/modules/`uname -r`/System.map /etc/psdatabase /boot/psdatabase-`uname -r` /boot/psdatabase, /lib/modules/`uname -r`/psdatabase !!NOTES The member __used_math__ of __task_struct__ is not shown, since __crt0.s__ checks to see if math is present. This causes the math flag to be set for all processes, and so it is worthless. Programs swapped out to disk will be shown without command line arguments, and unless the __c__ option is given, in parentheses. __%CPU__ shows the cputime/realtime percentage. It will not add up to 100% unless you are lucky. It is time used divided by the time the process has been running. The __SIZE__ and __RSS__ fields don't count the page tables and the __task_struct__ of a proc; this is at least 12k of memory that is always resident. __SIZE__ is the virtual size of the proc (code+data+stack). !!AUTHOR __ps__ was originally written by Branko Lankester __ Please send bug reports to ----
One page links to
oldps(1)
:
Man1o
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.