ps.1

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1 代码 · 共 406 行

1
406
字号
.\" SCCSID: @(#)ps.1	6.10 3/9/90.TH ps 1.SH Nameps \- print process status statistics.SH Syntax.B ps[.I options] [.I namelist] [.I corefile].SH Description.NXR "ps command".NXA "ps command" "w command".NXAM "ps command" "pstat command".NXR "process" "printing status".NXR "process ID" "getting".NXR "crash dump" "analyzing"The.PN pscommanddisplays information about processes. Information on processes canchange while.PN psis running, so the information it gives is a snapshot taken at a giventime..PPIf you omit the.B \-aoption,only your processes are candidates to be displayed by.PN ps . Specifying the.B \-aoptioncauses information about other users' processes to be displayed; specifying the.B \-xoptionincludes information on processes without control terminals..PPYou must use the.B \-k option and specify both the.I namelist and .I corefilearguments when you look at a crash dump.  The .I namelistargument indicates that information is to be gatheredusing the specified system namelistfile.  (The namelistfile is a kernel image file).  If you omit.IR namelist ,.PN psuses.PN /vmunix .The .I coreargument indicates that information is to be gathered usingthe specifiedcore file.  If you omit.IR core ,.PN psuses .PN /dev/mem ..SH Options.TP 10.B \-#Represents any given process number and must be the last optiongiven.  You cannot use this option with the.B \-aand .BI \-t x options..TP 10.B \-CCauses the%CPUfield of the display to reflect the absolute percentage of cpu used bythe process for scheduling during its resident time ..TP 10.B \-SCauses theTIMEfield of the display to reflect the amount of user+system time spent bya process and its children. .TP 10.B \-aDisplays information for processes executed from all users'terminals.  The default is to show processes executed from yourterminal only.  You cannot use this option with the.B \-#or.B \-toption..TP 10.B \-cDisplays the command names as stored internally in the system foraccounting purposes instead of the command arguments, which are kept inthe process address space.  This display is more reliable, if lessinformative, because a process is free to destroy the latterinformation..TP 10.B \-eDisplays the environment as well as the command arguments..TP 10.B \-gDisplays all processes within the process group.  Without this option,.PN psdisplays only ``interesting'' processes.  Processes that are process group leaders are not considered interesting; therefore, top-level commandinterpreters and processes waiting for users to log in are normally not shown..TP 10.B \-kUses the file specified in the  .I core argument in place of .PN /dev/kmem and .PN /dev/mem .  If you specify the.B \-k option but no .I coreargument,.PN psuses .PN /dev/mem ..TP 10.B \-lDisplays information in long format, showing the fields PPID, CP, PRI,NI, ADDR, SIZE, RSS, and WCHAN as described under Output Fields..TP 10.B \-sAdds the size SSIZ of the kernel stack of each process to the basicoutput format for use by system administrators..TP 10.BI \-t xDisplays information for only the specified terminal.  This option restricts output toprocesses whose controlling terminal is.I x.Specify .I xin the same format as.PN psdisplays terminal names. For example,.PN ps displays .PN t3for tty3,.PN tcofor console,.PN td0for ttyd0,.PN t?for processes with no terminal, and.PN tfor processes at the current terminal. This option must be the last one given.  You cannot use this option withthe .B \-#or.B \-aoptions..TP 10.B \-uDisplays user-oriented output, which includes fields USER, %CPU, and%MEM. This option also displays SZ and RSS, which are computeddifferently than they are for the.B \-land.B \-voptions.  The SZ field is computed as SIZE + TSIZ (virtual size plussize of text).  The RRS field is computed as RSS + (TRS/xccount) wherexccount is the number of processes currently sharing the text..TP 10.B \-vDisplays process system time and user time in addition to cumulativetime.  This display includes fields RE, SL, PAGEIN, SIZE, RSS, LIM,TSIZ, TRS, %CPU, and %MEM, described under Output Fields..TP 10.B \-wProduces 132-column rather than 80 column output.  If repeated, as.BR \-ww ,produces arbitrarily wide output.  This option allows.PN psto display more of wide displays..TP 10.B \-xDisplays information for all processes, including those not executedfrom terminals.  .SH Output FieldsThe .PN pscommand displays the following fields in all output formats:.IP PID 10The process identification (PID) number.IP TT 10The control terminal of the process .IP TIME 10The time, including both user and system time.IP STAT 10The state of the process given by a sequence of fiveletters, such as RWNAV..IPThe first letter indicates the run status of the process:.RS 10.IP R 5The process is running..IP T The process is stopped..IP P The process is in page wait. .IP D The process is in disk (or other short-term) wait..IP S The process is sleeping for less than about 20 seconds..IP IThe process is idle (sleeping longer than about 20 seconds)..RE.IP ""The second letter indicates whether a process is swapped out:.RS.IP WThe process is swapped out..IP ZThe process is killed, but not yet removed..IP (blank)The process is in core..IP >The process has a specified soft limit on memory requirements andis exceeding that limit.  This type of process is not swapped..PPThe third letter indicates whether a process is runningwith an altered CPU scheduling priority, using .PN nice :.IP N 5The process priority is reduced..IP <The process priority has been artificially raised..IP (blank)The process is running without special treatment..PPThe fourth letter indicates any special treatment of theprocess for virtual memory: .IP A 5Represents VA_ANOM.  This status typically represents a .PN lisp process using a disk more efficiently by removing gaps caused bydeletes and then collecting the remaining data. .IP SRepresents VA_SEQL.  This status is typical of large image processing programs thatare using virtual memory to sequentially address voluminous data..IP (blank)Represents VA_NORM..PPThe fifth letter indicates whether the process is a vector process:.IP VIndicates that the process is using vector hardware. Only processesrunning on a VAX processor that contains vector hardware can have thisstatus..IP (blank)Indicates the process is not using vector hardware..RE.PPThe following fields are not displayed in all output formats:.IP USER 10Names the owner of the process..IP %CPU 10Describes the use of the CPU by the process.  This percentage is a decaying average over aminute or less of previous (real) time.  The time base overwhich this percentage is computed varies because processes may be new. The sum of all %CPU fields can therefore exceed 200%..IP "NICE (or NI)" 10Indicates the process scheduling increment.  For further information, see.MS getpriority 2 ..IP "SIZE (or SZ)" 10Shows the virtual size of the process in 1024-byte units..IP RSS 10Shows the real memory (resident set) size of the process in 1024-byte units..IP LIM 10Indicates the soft limit on memory used, which is specified by a call to.MS getrlimit 2 .If no limit has been specified, this limit is shown as.PN xx.IP TSIZ 10Shows the size of the text (shared program) image..IP TRS 10Shows the size of resident (real memory) set of text..IP %MEM 10Gives the percentage of real memory used by this process..IP RE 10Indicates the residency time of the process (seconds in core)..IP SL 10Indicates the sleep time of the process (seconds blocked)..IP PAGEIN 10Shows the number of disk input and output operations resulting from references by the processto pages not loaded in core..IP UID 10Shows the numerical user identification number of the process owner..IP PPID 10Shows the numerical identification number of the parent of process..IP CP 10Displays the short-term CPU use factor used in scheduling..IP PRI 10Displays process priority. (This value is nonpositive when the processis in a wait state that cannot be interrupted.) .IP ADDR 10Displays the swap address of the process or page frame of the beginning of the userpage table entries..IP WCHAN 10Indicates the event for which the process is waiting (an address in the system), withthe initial part of the address truncated.  For example,the address 80004000 displaysas 4000..sp.IP F 10Displays flags associated with the process as in.PN "<sys/proc.h>" :.br.PP.sp.nf.ta 1.1i 2.3i SLOAD	00000001	Process is resident in memory.SSYS	00000002	System process:  swapper, pager, 			idle (RISC only), trusted path daemon.SLOCK	00000004	Process is being swapped out.SSWAP	00000008	Process requested to swap out for page table 		growth.STRC	00000010	Traced.SWTED	00000020	Used in tracing.SULOCK	00000040	Locked in by \f(CWplock\fR(2).SPAGE	00000080	Process is waiting for page-in to complete.SKEEP	00000100	Process is protected from swapout while transferring.			resources to another process.SOMASK	00000200	Used by \f(CWsigpause\fR(2).SWEXIT	00000400	Process is exiting.SPHYSIO	00000800	Process is protected from swapout while doing physical 		input or output.SVFORK	00001000	Process resulted from a \f(CWvfork\fR(2) that is not 			yet complete.SVFDONE	00002000	Parent has received resources returned by			\f(CWvfork\fR(2) child.SNOVM	00004000	Process has no virtual memory, as it is a 			parent in the context of \f(CWvfork\fR(2).SPAGI	00008000	Process is demand-paging data pages from its 			text gnode.SSEQL	00010000	Process has advised of sequential memory access.SUANOM	00020000	Process has advised of random memory access.SXCTDAT	00080000	Process has indicated intent to execute data 			or stack (RISC only).SNOCLDSTP	00100000	POSIX environment: no SIGCLD generated when 			children stop (formerly named SOUSIG).SOWEUPC	00200000	Process is owed a profiling tick.SSEL	00400000	Used by \f(CWselect\fR(2).SLOGIN	00800000	Process is a login process.SPTECHG	01000000	The page table entries for the process have changed.SLKDONE	04000000	System V file lock has been applied.SFIXADE	08000000	Fix of unaligned accesses is being attempted			(RISC only).SEXECDN	10000000	Process has done an \f(CWexecve\fR(2).SIDLEP	20000000	The idle process (RISC only)..fi.PD.PPA process that has a parent and has exited, but for which the parenthas not yet waited, is marked \f(CW<defunct>\fR.  A process that is blockedtrying to exit is marked \f(CW<exiting>\fR. The .PN pscommand determines the filename and arguments givenwhen the process was created by examining memory or the swap area.  Themethod is unreliable because, for example,  a process candestroy this information. The filename and arguments .PN psdisplays might be incorrect..SH Files.TP 1.2i.PN /devSearched to find swap device and terminal names.TP 1.2i.PN /dev/drumSwap device.TP 1.2i.PN /dev/kmemKernel memory.TP 1.2i.PN /dev/memUser process information.TP 1.2i.PN /vmcoreCore file.TP 1.2i.PN /vmunixSystem namelist.SH See Alsokill(1), w(1), getpriority (2), getrlimit(2), dump(5) 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?