The PS command is the abbreviation for process status and is used to view the state of the current system's processes. Can be used with the KILL command at any time to interrupt, kill unnecessary programs
1. Usage
PS [Options]
2. Common Command Options
A displays all programs under the current terminal, including other users ' programs
-A Show All processes
c When listing a program, show the actual instruction name of each program, without including the path, parameter or the indication of the resident service
E to show the environment variables used by each program when listing programs
-h displays a tree structure, indicating inter-program relationships
-n shows all programs except the program under the PS command terminal
U display program status in user-oriented format
X Show All programs, not the terminal to distinguish
3. Example
1) View the process of the current terminal
PS PID TTY time CMD 1271 pts/0 xx: xx Bash 1669 pts/0 xx:xxPS
2) View the process (only part of the list below)
[Email protected] ~]#PSAuxuser PID%cpu%MEM VSZ RSS TTY STAT START time Commandroot1 0.0 0.8 127968 6480? Ss -: - 0: on/USR/LIB/SYSTEMD/SYSTEMD--switched-root--system--Droot2 0.0 0.0 0 0? S -: - 0:xx[Kthreadd]root3 0.0 0.0 0 0? S -: - 0:xx[ksoftirqd/0]root5 0.0 0.0 0 0? s< -: - 0:xx[kworker/0: 0h]root7 0.0 0.0 0 0? S -: - 0:xx[migration/0]root8 0.0 0.0 0 0? S -: - 0:xx[RCU_BH]
4. Head description
User username
UID User number
PID Process Number
ppid Parent Process number
size memory, Kbytes bytes.
vsize Total virtual memory size, Bytes bytes (including code+data+stack)
Share Total shared pages
Nice process priority (default = 0, max -20)
priority (PRI) kernel scheduling
percentage of physical memory shared by the PMEM process
TRS Program execution code resident size
the total amount of physical memory used by the RSS process, Kbytes bytes
time Process execution up to now total CPU take-up times
Stat Process Status
command execution simple format for commands
Stat Description: D: Non-interruptible, R: Run, S: Interrupt, T: Stop, Z: Zombie, W: No dwell page, <: high-priority process, N: low-priority process, L: Memory Lock page
Linux PS Command