Ps command details, process status name: ps usage permission: All Users usage: ps [options] [-- help] Description: displays the dynamic parameters of the process: ps has many parameters, only A few common parameters are listed here and their meanings are briefly described.-A lists all the itineraries.-w: Show widening. More information is displayed.-au: show more details.-aux: show all other parameters. user's itinerary au (x) output Format: user pid % CPU % mem vsz rss tty stat start time commanduser: Travel owner PID: pid % CPU: occupied CPU usage % MEM: occupied memory usage VSZ: occupied virtual memory size RSS: occupied memory size TTY: terminal secondary device number (minor device number of tty) STAT: status of the trip: D: Non-disruptive static R: executing. S: static. T: paused. Row Z: does not exist but cannot be eliminated for the moment W: There is not enough memory paging to be allocated <: high-priority itinerary N: low-priority itinerary L: START: trip start time: execution time command: executed COMMAND example: psPID tty time limit 2791 ttyp0 00:00:00 tcsh3092 ttyp0 00:00:00 ps % ps-apid tty time CMD1? 00:00:03 init2? 00:00:00 kflushd3? 00:00:00 kpiod4? 00:00:00 kswapd5? 00:00:00 mdrecoveryd... % ps-auxUSER PID % CPU % mem vsz rss tty stat start time COMMANDroot 1 0.0 0.7 1096 472? S Sep10 init [3] root 2 0.0 0.0 0 0? SW Sep10 [kflushd] root 3 0.0 0.0 0 0? SW Sep10 [kpiod] root 4 0.0 0.0 0 0? SW Sep10 [kswapd] ...... ps aux ---------------------------------------------------------------------- user pid % CPU % mem vsz rss tty stat start time COMMANDroot 1 0.0 0.0 1340 440? S Nov05 initroot 2 0.0 0.0 0 0? SW Nov05 [keventd] root 3 0.0 0.0 0 0? SW Nov05 0: 00 [keventd]... -------------------------------------------------- the USER field specifies the USER who started the command. The USER can view the CPU occupied by a process, memory usage, VSZ (virtual memory size), and RSS (resident set size ): VSZ indicates the amount of memory space required for a program to fully reside in the memory; RSS indicates the actual amount of memory occupied; STAT displays the current state of the process: "S ": the process is in sleep state, indicating that these processes are waiting for certain events-may be user input or availability of system resources; after a process calls exit, the process does not disappear immediately, instead, it leaves a data structure called Zombie. Among the five States of a Linux Process, a zombie process is a very special one. It has abandoned almost all the memory space, no executable code, and cannot be scheduled, only one location is retained in the process list, and information such as the exit status of the process is recorded for collection by other processes. In addition, zombie processes no longer occupy any memory space. The function of calling exit is to exit a process, but it is only limited to converting a normal process into a zombie process and cannot be completely destroyed. Once a process calls wait, it immediately blocks itself. wait automatically analyzes whether a sub-process of the current process has exited. If it finds such a sub-process that has become a zombie, wait will collect information about this sub-process and destroy it completely and return it. If such a sub-process is not found, wait will be blocked until one appears. Run ps aux to the following information: ps auxUSER PID % CPU % mem vsz rss tty stat start time COMMANDsmmsp 3521 0.0 0.7 6556 1616? Ss 01:00:00 sendmail: Queue runner @ froot 3532 0.0 0.2 2428? Ss gpm-m/dev/input/mice-t imps2htt 3563 0.0 0.0 2956 196? Ss/usr/sbin/htt-retryonerror 0htt 3564 0.0 1.7 29460 3704? Sl htt_server-nodaemonroot 3574 0.0 0.4 5236? Ss crondxfs 3617 0.0 1.3 13572 2804? Ss xfs-droppriv-daemonroot 3627 0.0 0.2 3448 552? SNs anacron-sroot 3636 0.0 0.1 2304 420? Ss/usr/sbin/atddbus 3655 0.0 0.5 13840? Ssl dbus-daemon-1 -- system .................................. .. the parameter meaning in stat is as follows: D cannot be interrupted. Uninterruptible (usually IO) R is running, or process S in the queue is in sleep state T stop or be tracked Z botnet W enters the memory swap (it is invalid from kernel 2.6) X Dead Process