Home
NAME SYNOPSIS DESCRIPTION OPTIONS
Contents
1. 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_fit number of major page faults n cmin_fit cumulative minor page faults N cmaj_fit cumulative major page faults o session session ID p pid process ID P ppid parent process ID r TSS 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 kB y priority kernel scheduling priority AIX FORMAT DESCRIPTORS This ps supports AIX format descriptors which work somewhat like the formatting codes of printf 1 and printf 3 For example the normal default output can be produced with this ps eo p y x c CODE NORMAL HEADER C pcpu CPU G group GROUP P ppid PPID U user USER ha args COMMAND c comm COMMAND hg rgroup RGROUP n nice NI p pid PID Pr pgid PGID t etime ELAPSED u ruser RUSER x time TIME oy tty TTY z VSZ VSZ STANDARD FORMAT SPECIFIERS These may be used to control both output format and sorting For example ps eo pid user args sort user CODE HEADER Yocpu CPU mem MEM Linux July 5 1998 5 PS 1 Linux alarm args blocked bsdstart bsdtime c caught cmd comm command cputime drs dsiz egid egroup eip esp etime euid euser f
2. fgid fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser gid group ignored intpri lim longtname lstart m_drs m_trs maj_fit majfit min_fit minfit ni nice nwchan opri pagein pepu pending pgid Linux User s Manual ALARM COMMAND BLOCKED START TIME C CAUGHT CMD COMMAND COMMAND TIME DRS DSIZ EGID EGROUP EIP ESP ELAPSED EUID EUSER F FGID FGROUP F F COMMAND FSGID FSGROUP FSUID FSUSER FUID FUSER GID GROUP IGNORED PRI LIM TTY STARTED DRS TRS MAJFL MAJFLT MINFL MINFLT NI NI WCHAN PRI PAGEIN CPU PENDING PGID July 5 1998 PS 1 PS 1 Linux perp pid pmem ppid pri priority rgid rgroup TSS rssize TSZ ruid ruser s sess session sgi_p Sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore sig_pend sigcatch sigignore sigmask stackp start start_stack start_time stat state stime suid suser svgid svgroup svuid svuser SZ time timeout tmout tname tpgid trs trss tsiz tt tty Linux User s Manual PGRP PID MEM PPID PRI PRI RGID RGROUP RSS RSS RSZ RUID RUSER S SESS SESS P RSS SGID SGROUP SID PENDING BLOCKED CATCHED IGNORED SIGNAL CAUGHT IGNORED BLOCKED STACKP STARTED STACKP START STAT S STIME SUID SUSER SVGID SVGROUP SVUID SVUSER SZ TIME TMOUT TMOUT TTY TPGID TRS TRSS TSIZ TT TT July 5 1998 PS 1 PS 1 tty4 TTY tty8 T
3. PS 1 Linux User s Manual PS 1 NAME ps report process status SYNOPSIS ps options 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 OPTIONS This version of ps accepts several kinds of options Unix options may be grouped and must be preceeded by a dash BSD options may be grouped and must not be used with a dash GNU long options are preceeded by two dashes Options of different types may be freely mixed Set the I WANT_A_BROKEN_PS environment variable to force BSD syntax even when options are pre ceeded by a dash The PS_PERSONALITY environment variable described below provides more detailed control of ps behavior SIMPLE PROCESS SELECTION A select all processes negate selection select all with a tty except session leaders select all but omit session leaders select all processes select all processes on this terminal select all processes on a terminal including those of other users really all even group leaders does nothing w o SunOS settings restrict output to running processes select processes without controlling ttys deselect negate selection HIP eee LY PROCESS SELECTION BY LIST C select by command name G select by RGID supports names U select by RUID supports names g select by session leader OR by group name p select by PID S select proce
4. TY ucmd CMD ucomm COMMAND uid UID uid_hack UID uname USER user USER vsize VSZ VSZ VSZ wchan WCHAN ENVIRONMENT VARIABLES Linux User s Manual PS 1 The following environment variables could affect ps COLUMNS Override default display width LINES Override default display height PS_PERSONALITY Set to one of posix old linux bsd sun digital CMD_ENV Set to one of posix old linux bsd sun digital I_WANT_A_BROKEN_PS Force obsolete command line interpretation LC_TIME Date format PS_COLORS Not currently supported PS_FORMAT Default output format override PS_SYSMAP Default namelist System map location PS_SYSTEM_MAP POSIXLY_CORRECT Default namelist System map location Don t find excuses to ignore bad features UNIX95 Don t find excuses to ignore bad features _XPG Cancel CMD_ENV irix non standard behavior In general it is a bad idea to set these variables The one exception is CMD_ENV or PS_PERSONAL ITY which could be set to Linux for normal systems Without that setting ps follows the useless and bad parts of the Unix98 standard PERSONALITY 390 like the S 390 OpenEdition ps aix like AIX ps bsd like FreeBSD ps totally non standard compaq like Digital Unix ps debian like the old Debian ps digital like Digital Unix ps gnu like the old Debian ps hp like HP UX ps hpux like HP UX ps irix like Irix ps linux veka RECOMMENDED old like the original Linux ps totally non stan
5. acter To be GNU ish use The is really optional since default direction is increasing numerical or lexicographic order For example ps jax sort uid ppid pid This ps works by reading the virtual files in proc This ps does not need to be suid kmem or have any privi leges to run Do not give this ps any special permissions This ps needs access to a namelist file for proper WCHAN display The namelist file must match the cur rent Linux kernel exactly for correct output To produce the WCHAN field ps needs to read the System map file created when the kernel is compiled The search path is PS_SYSTEM_MAP July 5 1998 3 PS 1 Linux User s Manual PS 1 boot System map uname r boot System map Nib modules uname r System map usr src linux System map 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 Somebody fix libc or the kernel please Programs swapped out to disk will be shown without command line arguments and unless the option is given in brackets 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 vir
6. ader 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 headers and no headers to enable printing headers each page and disable headers entirely respectively Terminals ttys or screens for text output can be specified in several forms dev ttyS1 ttyS1 S1 Obsolete ps t your own terminal and ps t processes without a terminal syntax is supported but modern options T t with list x t with list should be used instead The BSD O option can act like O 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 specify the other option sorting or formatting in some other way For sorting BSD O option syntax is O I A I k2 Order the process listing according to the multi level sort specified by the sequence of short keys from SORT KEYS k1 k2 The is quite optional merely re iterating the default direction on a key reverses direction only on the key it precedes The O option must be the last option in a single command argument but specifications in successive arguments are catenated GNU sorting syntax is sortX l key l key Choose a multi letter key from the SORT KEYS sec tion X may be any convenient separator char
7. dard posix standard sco like SCO ps sgi like Irix ps sun like SunOS 4 ps totally non standard sunos like SunOS 4 ps totally non standard Linux July 5 1998 PS 1 Linux User s Manual PS 1 SySV standard unix standard unix95 standard unix98 standard EXAMPLES To see every process on the system using standard syntax ps e To see every process on the system using BSD syntax ps ax To see every process except those running as root real amp effective ID ps U root u root N To see every process with a user defined format ps eo pid tt user fname tmout f wchan Odd display with AIX field descriptors ps 0 u U p a Print only the process IDs of syslogd ps C syslogd o pid CONFORMING TO This ps conforms to version 2 of the Single Unix Specification AUTHOR ps was originally written by Branko Lankester lt lankeste fwi uva nl gt Michael K Johnson lt john sonm redhat com gt re wrote it significantly to use the proc filesystem changing a few things in the pro cess Michael Shields lt mjshield nyx cs du edu gt added the pid list feature Charles Blake lt cblake bbn com gt 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 lt acaha lan cs uml edu gt rewrote ps for ful
8. l Unix98 and BSD support along with some ugly hacks for obsolete and foreign syntax Please send bug reports to lt acahalan cs uml edu gt or use the Debian Bug Tracking System SEE ALSO Linux top 1 pstree 1 proc 5 July 5 1998 9
9. r or one header per screen in the BSD personality m all threads n numeric output for WCHAN and USER cols columns width set screen width headers repeat header lines one per page of output no headers print no header line at all lines TOWS set screen height sort specify sorting order INFORMATION V V version print version July 5 1998 2 PS 1 Linux User s Manual PS 1 L list all format specifiers help print help message info print debugging info OBSOLETE A increases the argument space DecUnix M _ use alternate core try n or N instead W get swap info from not dev drum try n or N instead k use vmcore as c dumpfile try n or N instead NOTES Linux The g option can select by session leader OR by group name Selection by session leader is specified by many standards but selection by group is the logical behavior that several other operating systems use This ps will select by session leader when the list is completely numeric as sessions are Group ID numbers will work only when some group names are also specified The m option should not be used Use m or o with a list m displays memory info shows threads or sorts by memory use The h option is problematic Standard BSD ps uses the option to print a header on each page of output but older Linux ps uses the option to totally disable the header This version of ps follows the Linux usage of not printing the he
10. sses belonging to the sessions given t select by tty u select by effective user ID supports names U select processes for specified users p select by process ID t select by tty Group select by real group name or ID User select by real user name or ID group select by effective group name or ID Linux July 5 1998 1 PS 1 Linux Linux User s Manual PS 1 pid select by process ID sid select by session ID tty select by terminal user select by effective user name or ID 123 implied sid 123 implied pid OUTPUT FORMAT CONTROL O is preloaded o different scheduler info for 1 option f does full listing j jobs format l long format 0 user defined format y do not show flags show rss in place of addr 0 is preloaded o overloaded X old Linux i386 register format j job control format l Display long format o specify user defined format s display signal format u display user oriented format v display virtual memory format format user defined format OUTPUT MODIFIERS H show process hierarchy forest m shows threads n sets namelist file W wide output C use raw CPU time for CPU instead of decaying average N specify namelist file 0 sorting order overloaded S cumulative include some dead child process data as a sum with the parent c true command name e show environment after the command f forest ASCII art process hierarchy forest h no heade
11. tual size of the proc code data stack 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 init 8 if the parent process exits PROCESS FLAGS ALIGNWARN 001 print alignment warning msgs STARTING 002 being created EXITING 004 getting shut down PTRACED 010 set if ptrace 0 has been called TRACES YS 020 tracing system calls FORKNOEXEC 040 forked but didn t exec SUPERPRIV 100 used super user privileges DUMPCORE 200 dumped core SIGNALED 400 killed by a signal PROCESS STATE CODES uninterruptible sleep usually IO runnable on run queue sleeping traced or stopped a defunct zombie process NHYAD For BSD formats and when the stat keyword is used additional letters may be displayed W has no resident pages lt high priority process N __ low priority task L has pages locked into memory for real time and custom IO 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 Pipe ps output into the sort 1 command if you want to sort the cooked values KEY LONG DESCRIPTION c cmd simple name of executable Linux July 5 1998 4 PS 1 Linux User s Manual PS 1 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
Download Pdf Manuals
Related Search
Related Contents
Reference Manual CLI Command Line Interface EAGLE One Rel CasePower A80 Manual de Transacciones de Gestión de Deuda Enermax EMK3102 drive bay panel IPC-BX/600(PCW) Betriebsanleitung Bestecktauchwagen Sandberg S-Video Cable M-M 1 m Copyright © All rights reserved.
Failed to retrieve file