PS command
Function: Used to display the process dynamic information that is running on the current system.
Parameters:
-A: List all processes (equivalent to-e)
-A: Displays all processes running at the current terminal.
E: When listing programs, show each program is the user's environment variable
U: Show program status in user-oriented format
x: Show all processes, not the terminal to distinguish
L: Long format output
-O: Control output
Output format:
User: Username
PID: Process ID
UID: User ID
PPID: Process ID of the parent process
SID: Session ID
%CPU: CPU utilization of the process
%MEM: Memory usage of the process
VSZ: The size of the virtual memory used by the process
RSS: Memory size when the process is using
TTY: terminal associated with a process
STAT: Status of the process
START: Total CPU time for process operations
Time: How long the process has been running
Command: In-line command execution
NI: Priority PRI: Process priority number
Wchan: Process is sleeping kernel parameter name
FLAGS: Digital ID of the process
The process status is detailed:
R: Running or waiting in the running queue
S: Dormant, waiting for a condition to form or receive a signal
Z: Zombie, the process has terminated, but the process descriptor exists until the parent process calls the WAIT4 () system call to release
D: Received signal does not wake up and not run, golden winged birds must wait until interrupted by interrupts
T: Terminate, process stops running after receiving Sigstop,sigstp,sigtin,sigtou signal
W: Not enough memory paging to allocate
X: Dead Process
<: high-priority processes
N: Low-priority processes
L: Memory lock page, which is allocated by memory paging and indented in the memory body
S: Leader of the process (under it child process)
L: Multi-process
+: Process groups in the background
The difference between ps-aux and PS aux is ps-aux to print all processes for users named "X", and to print all processes that will be selected by the-a option. If the user "X" does not exist, it will be interpreted as "PS aux" by the editor and a warning will be printed.
When running "Ps-aux >/dev/null", the following warning message is displayed;
Warning:bad syntax, perhaps a bogus '-'? See/usr/share/doc/procps-3.2.8/faq
Therefore, it is best to use the "PS aux" command directly.
PS aux and Ps-ef
The Aux truncates the command column, and-ef does not, when combined with grep, affects the result.
Ps-u Users
Displays the process for the specified user
Sort Display
Ps-aux--sort-pmem | Head-n 10
PS-C Process Name
Displays the specified process
Ps-l PID
Displays the specified process according to the PID
Pstree
Show Process Tree
This article is from the "Different Skies" blog, so be sure to keep this source http://jiekeyang.blog.51cto.com/11144634/1770211
PS Command usage