📄 ps.1
字号:
executable file, rather than from the argv value. Command argumentsand any modifications to them (see\ \fIsetproctitle\fR(3)) arethus not shown. This optioneffectively turns the \fBargs\fR format keyword into the \fBcomm\fRformat keyword; it is useful with the \fB\-f\fR format option and withthe various BSD\-style format options, which all normallydisplay the command arguments.See the \fB\-f\fR option, the format keyword \fBargs\fR, and theformat keyword \fBcomm\fR..opt eShow the environment after the command..opt fASCII\-art process hierarchy (forest).opt hNo header. (or, one header per screen in the BSD personality).brThe \fBh\fR option is problematic. Standard BSD \fBps\fR usesthis option to print a header on each page of output, but olderLinux \fBps\fR uses this option to totally disable the header.This version of \fBps\fR follows the Linux usage of not printingthe header unless the BSD personality has been selected, in whichcase it prints a header on each page of output. Regardless of thecurrent personality, you can use the long options \fB\-\-headers\fRand \fB\-\-no\-headers\fR to enable printing headers each page ordisable headers entirely, respectively..opt k \ specspecify sorting order. Sorting syntax is[\fB+\fR|\fB\-\fR]\fIkey\fR[,[\fB+\fR|\fB\-\fR]\fIkey\fR[,...]]Choose a multi\-letter key from the \fBSTANDARD FORMAT SPECIFIERS\fR section.The\ "+" is optional since default direction is increasing numerical orlexicographic order. Identical to \fB\-\-sort\fR. Examples:.br\fBps\ jaxkuid,\-ppid,+pid\fR.br\fBps\ axk\ comm\ o\ comm,args\fR.br\fBps\ kstart_time\ \-ef\fR.opt \-n \ namelistset namelist file. Identical to \fBN\fR..brThe namelist file is needed for a proper WCHAN display, and must matchthe current Linux kernel exactly for correct output.Without this option, the default search path for the namelist is: $PS_SYSMAP.br $PS_SYSTEM_MAP.br /proc/*/wchan.br /boot/System.map\-\`uname\ \-r\`.br /boot/System.map.br /lib/modules/\`uname\ \-r\`/System.map.br /usr/src/linux/System.map.br /System.map.opt nNumeric output for WCHAN and USER. (including all types of UID and GID).opt \-wWide output. Use this option twice for unlimited width..opt wWide output. Use this option twice for unlimited width..opt \-\-cols \ nset screen width.opt \-\-columns \ nset screen width.opt \-\-cumulativeinclude some dead child process data (as a sum with the parent).opt \-\-forestASCII art process tree.opt \-\-headersrepeat header lines, one per page of output.opt \-\-no\-headersprint no header line at all.opt \-\-lines \ nset screen height.opt \-\-rows \ nset screen height.opt \-\-sort \ specspecify sorting order. Sorting syntax is[\fB+\fR|\fB\-\fR]\fIkey\fR[,[\fB+\fR|\fB\-\fR]\fIkey\fR[,...]]Choose a multi\-letter key from the \fBSTANDARD FORMAT SPECIFIERS\fR section.The\ "+" is optional since default direction is increasing numerical orlexicographic order. Identical to\ \fBk\fR.For example: \fBps\ jax\ \-\-sort=uid,\-ppid,+pid\fR.opt \-\-width \ nset screen width.\" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""".PD.PP.SH "THREAD DISPLAY".PD 0.opt HShow threads as if they were processes.opt \-LShow threads, possibly with LWP and NLWP columns.opt \-TShow threads, possibly with SPID column.opt mShow threads after processes.opt \-mShow threads after processes.\" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""".PD.PP.SH "OTHER INFORMATION".PD 0.opt LList all format specifiers..opt \-VPrint the procps version..opt VPrint the procps version..opt \-\-helpPrint a help message..opt \-\-infoPrint debugging info..opt \-\-versionPrint the procps version..\" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""".PD.PP.SH NOTESThis \fBps\fR works by reading the virtual files in\ /proc.This \fBps\fR does not need to be setuid kmem or have any privileges to run.Do not give this \fBps\fR any special permissions.This \fBps\fR needs access to namelist data for proper WCHAN display.For kernels prior to 2.6, the System.map file must be installed.CPU usage is currently expressed as the percentage of time spentrunning during the entire lifetime of a process.This is not ideal, and\ it does not conform to thestandards that \fBps\fR otherwise conforms\ to.CPU\ usage is unlikely to add up to exactly\ 100%.The SIZE and RSS fields don't count some parts of a process including thepage tables, kernel stack, struct thread_info, and struct task_struct.This is usually at least 20\ KiB of memory that is always resident.SIZE is the virtual size of the process (code+data+stack).Processes marked <defunct> are dead processes (so\-called\ "zombies") thatremain because their parent has not destroyed them properly. These processeswill be destroyed by \fIinit\fR(8) if the parent process exits..SH "PROCESS FLAGS"The sum of these values is displayed in the "F" column,which is provided by the \fBflags\fR output specifier..PD 0.TP 51forked but didn't exec.TP4used super\-user privileges.PD.PP.SH "PROCESS STATE CODES"Here are the different values that the \fBs\fR, \fBstat\fR and\fBstate\fR output specifiers (header\ "STAT"\ or\ "S") will display todescribe the state of a process..PD 0.TP 5DUninterruptible sleep (usually\ IO).TPRRunning or runnable (on\ run\ queue).TPSInterruptible sleep (waiting for an event to complete).TPTStopped, either by a job control signal or because it is being traced..TPWpaging (not valid since the 2.6.xx kernel).TPXdead (should never be seen).TPZDefunct ("zombie") process, terminated but not reaped by its parent..PD.PPFor BSD formats and when the \fBstat\fR keyword is used, additionalcharacters may be displayed:.PD 0.TP 5<high\-priority (not nice to other users).TPNlow\-priority (nice to other users).TPLhas pages locked into memory (for real\-time and custom\ IO).TPsis a session leader.TPlis multi-threaded (using CLONE_THREAD, like NPTL pthreads\ do).TP+is in the foreground process group.PD.PP.PP.SH "OBSOLETE SORT KEYS"These keys are used by the BSD \fBO\fR option (when it is used forsorting). The GNU \fB\-\-sort\fR option doesn't use these keys, but thespecifiers described below in the \fBSTANDARD FORMAT SPECIFIERS\fRsection. Note that the values used in sorting are the internalvalues \fBps\fR uses and not the "cooked" values used in some ofthe output format fields (e.g. sorting on tty will sort intodevice number, not according to the terminal name displayed).Pipe \fBps\fR output into the \fIsort\fR(1) command if you wantto sort the cooked values..TSl l lw(3i).\fBKEY LONG DESCRIPTION\fRc cmd simple name of executableC pcpu cpu utilizationf flags flags as in long format F fieldg pgrp process group IDG tpgid controlling tty process group IDj cutime cumulative user timeJ cstime cumulative system timek utime user timem min_flt number of minor page faultsM maj_flt number of major page faultsn cmin_flt cumulative minor page faultsN cmaj_flt cumulative major page faultso session session IDp pid process IDP ppid parent process IDr rss resident set sizeR resident resident pagess size memory size in kilobytesS share amount of shared pagest tty the device number of the controlling ttyT start_time time process was startedU uid user ID numberu user user namev vsize total VM size in kBy priority kernel scheduling priority.\"K stime system time (conflict, system vs. start time).TE.PP.PP.SH "AIX FORMAT DESCRIPTORS"This \fBps\fR supports AIX format descriptors, which work somewhat like theformatting codes of \fIprintf\fR(1) and \fIprintf\fR(3). For example, the normaldefault output can be produced with this: \fBps\ \-eo\ "%p\ %y\ %x\ %c"\fR.The\ \fBNORMAL\fR codes are described in the next section..TSl l l.\fBCODE NORMAL HEADER\fR%C pcpu %CPU%G group GROUP%P ppid PPID%U user USER%a args COMMAND%c comm COMMAND%g rgroup RGROUP%n nice NI%p pid PID%r pgid PGID%t etime ELAPSED%u ruser RUSER%x time TIME%y tty TTY%z vsz VSZ.TE.SH "STANDARD FORMAT SPECIFIERS"Here are the different keywords that may be used to control the outputformat (e.g. with option \fB\-o\fR) or to sort the selected processeswith the GNU\-style \fB\-\-sort\fR option.For example: \fBps\ \-eo\ pid,user,args\ \-\-sort\ user\fRThis version of \fBps\fR tries to recognize most of the keywords used inother implementations of \fBps\fR.The following user\-defined format specifiers may containspaces: \fBargs\fR, \fBcmd\fR, \fBcomm\fR, \fBcommand\fR, \fBfname\fR,\fBucmd\fR, \fBucomm\fR,\fBlstart\fR, \fBbsdstart\fR, \fBstart\fR.Some keywords may not be available for sorting..\" #######################################################################.\" lB1 lB1 lB1 lB1 s s s.\" lB1 l1 l1 l1 s s s..\".\" lB1 lB1 lBw(5.5i).\" lB1 l1 l..\".TSexpand;lB1 lB1 lBw(\n[ColSize]n)lB1 l1 l.CODE HEADER DESCRIPTION%cpu %CPU T{cpu utilization of the process in "##.#" format. Currently, it is the CPU timeused divided by the time the process has been running (cputime/realtimeratio), expressed as a percentage. It will not add up to 100% unless youare lucky. (alias\ \fBpcpu\fR).T}%mem %MEM T{ratio of the process's resident set size to the physical memory onthe machine, expressed as a percentage. (alias\ \fBpmem\fR).T}args COMMAND T{command with all its arguments as a string. Modifications to the argumentsmay be shown. The output in this column may contain spaces.A\ process marked <defunct> is partly dead, waitingto be fully destroyed by its parent. Sometimes the process argswill be unavailable; when this happens, \fBps\fR will insteadprint the executable name in brackets.(alias\ \fBcmd\fR,\ \fBcommand\fR). See also the \fBcomm\fR formatkeyword, the \fB\-f\fR option, and the \fBc\fR option..brWhen specified last, this column will extend to the edge of the display.If \fBps\fR 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 \fBTERM\fR variable, and so on)The \fBCOLUMNS\fR environment variable or \fB\-\-cols\fR option maybe used to exactly determine the width in this case.The \fBw\fR or \fB\-w\fR option may be also be used to adjust width.T}blocked BLOCKED T{mask of the blocked signals, see \fIsignal\fR(7).According to the width of the field,a\ 32\-bit or 64\-bit mask in hexadecimal format is displayed.(alias\ \fBsig_block\fR,\ \fBsigmask\fR).T}bsdstart START T{time the command started. If the process was started lessthan 24 hours ago, the output format is "\ HH:MM",else it is "mmm\ dd"(where mmm is the three letters of the month).T}bsdtime TIME T{accumulated cpu time, user\ +\ system. The display format is usually"MMM:SS", but can be shifted to the right if the process used more than 999minutes of cpu time.T}c C T{processor utilization. Currently, this is the integer value ofthe percent usage over the lifetime of the process. (see\ \fB%cpu\fR).T}caught CAUGHT T{mask of the caught signals, see \fIsignal\fR(7). According to thewidth of the field, a 32 or 64 bits mask in hexadecimal format isdisplayed. (alias\ \fBsig_catch\fR,\ \fBsigcatch\fR).T}class CLS T{scheduling class of the process. (alias\ \fBpolicy\fR,\ \fBcls\fR).Field's possible values are:.br\- not reported.brTS SCHED_OTHER.brFF SCHED_FIFO.brRR SCHED_RR.br? unknown valueT}cls CLS T{scheduling class of the process. (alias\ \fBpolicy\fR,\ \fBclass\fR).Field's possible values are:.br\- not reported.brTS SCHED_OTHER.brFF SCHED_FIFO.brRR SCHED_RR.br? unknown valueT}cmd CMD T{see \fBargs\fR. (alias\ \fBargs\fR,\ \fBcommand\fR).T}comm COMMAND T{command name (only\ the executable\ name). Modifications to the commandname will not be shown. A\ process marked <defunct> is partly dead, waitingto be fully destroyed by its parent. The output in thiscolumn may contain spaces. (alias\ \fBucmd\fR,\ \fBucomm\fR).See also the \fBargs\fR formatkeyword, the \fB\-f\fR option, and the \fBc\fR option..brWhen specified last, this column will extend to the edge of the display.If \fBps\fR 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 \fBTERM\fR variable, and so on)The \fBCOLUMNS\fR environment variable or \fB\-\-cols\fR option maybe used to exactly determine the width in this case.The \fBw\fR or \fB\-w\fR option may be also be used to adjust width.T}command COMMAND T{see \fBargs\fR. (alias\ \fBargs\fR,\ \fBcmd\fR).T}cp CP T{per\-mill (tenths of a percent) CPU usage. (see\ \fB%cpu\fR).T}cputime TIME T{cumulative CPU time, "[dd\-]hh:mm:ss" format. (alias\ \fBtime\fR).T}egid EGID T{effective group ID number of the process as a decimal integer.(alias\ \fBgid\fR).T}egroup EGROUP T{effective group ID of the process. This will be the textual group ID,if it can be obtained and the field width permits, or a decimalrepresentation otherwise. (alias\ \fBgroup\fR).T}eip EIP T{instruction pointer.T}esp ESP T{stack pointer.T}etime ELAPSED T{elapsed time since the process was started,in\ the form\ [[dd\-]hh:]mm:ss.T}euid EUID T{effective user\ ID. (alias\ \fBuid\fR).T}euser EUSER T{effective user\ name. This will be the textualuser\ ID, if\ it can be obtained and the field width permits,or\ a\ decimal representation otherwise.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -