Saturday, April 28, 2012

PS

Process Status


ps -l
Displays processes including those that are in a wait state, similar to the below example.



ps aux | sort -kr 3,3 | head -n 6




-a

List information about all processes most frequently requested: all those except process group leaders and processes not associated with a terminal.
-AList information for all processes. Identical to -e, below.
-cPrint information in a format that reflects scheduler properties as described in priocntl.
The -c option affects the output of the -f and -l options, as described below.
-dList information about all processes except session leaders.
-eList information about every process now running.
-fGenerate a full listing.
-jPrint session ID and process group ID.
-lGenerate a long listing.
-LPrint information about each light weight process (lwp) in each selected process.
-PPrint the number of the processor to which the process or lwp is bound, if any, under an additional column header, PSR.
-yUnder a long listing (-l), omit the obsolete F and ADDR columns and include an RSS column to report the resident set size of the process. Under the -y option, both RSS and SZ will be reported in units of kilobytes instead of pages.
-g grplistList only process data whose group leader's ID number(s) appears in grplist. (A group leader is a process whose process ID number is identical to its process group ID number.)
-n namelistSpecify the name of an alternative system namelist file in place of the default. This option is accepted for compatibility, but is ignored.
-o formatPrint information according to the format specification given in format. This is fully described in DISPLAY FORMATS. Multiple -o options can be specified; the format specification will be interpreted as the space-character-separated concatenation of all the format option-arguments.
-p proclistList only process data whose process ID numbers are given in proclist.
-s sidlistList information on all session leaders whose IDs appear in sidlist.
-t termList only process data associated with term. Terminal identifiers are specified as a device file name, and an identifier. For example, term/a, or pts/0.
-u uidlistList only process data whose effective user ID number or login name is given in uidlist. In the listing, the numerical user ID will be printed unless you give the -f option, which prints the login name.
-U uidlistList information for processes whose real user ID numbers or login names are given in uidlist. The uidlist must be a single argument in the form of a blank- or comma-separated list.
-G gidlistList information for processes whose real group ID numbers are given in gidlist. The gidlist must be a single argument in the form of a blank- or comma-separated list.

No comments:

Post a Comment