The difference and format of ps -ef and ps aux under Linux

The command ps to display the system process under Linux, the most commonly used are ps -ef and ps aux. What's the difference between the two? There is not much difference between the two. To discuss this problem, it goes back to two styles in Unix systems, System V style and BSD style, ps aux was originally used in Unix Style, and ps -ef was used in System V Style, The output of the two is slightly different. Most Linux systems today can use both methods at the same time.

ps -ef displays the process in a standard format, the format is as follows

The meaning of each column is as follows
UID //User ID, but the output is the username 
PID //ID of the process 
PPID //Parent process ID 
C //The percentage of CPU occupied by the 
process STIME //The time since the process started 
TTY / / The process is running on which terminal. If it has nothing to do with the terminal, it will display? If it is pts/0, etc., it means that the host process is connected by the network. 
CMD // The name and parameters of the command

ps aux is displayed in BSD format, the format is as follows

Different from ps -ef, there are listed
USER //username 
%CPU //CPU percentage occupied by the process 
%MEM //Percentage of memory occupied 
VSZ //Amount of virtual memory used by the process (KB) 
RSS //Occupied by the process The fixed amount of memory (KB) (the number of resident pages) 
STAT //The status of 
the process START //The process was triggered to start the time 
TIME //The time the process actually uses the CPU to run

Among them, the common status characters of the STAT status bit are
D //uninterrupted sleep state (usually IO process); 
R //running and can be passed in the queue; 
S //in sleep state; 
T //stop Or tracked; 
W // enter memory swap (invalid since kernel 2.6); 
X // dead process (basically rare); 
Z // zombie process; 
< // high priority process 
N // priority Lower-level process 
L // some pages are locked into memory; 
s // leader of the process (with child processes under it); 
l // multithreading, clone threads (using CLONE_THREAD, similar to NPTL pthreads); 
+ // Process group in the background;

This article permanently updates the link address : http://www.linuxidc.com/Linux/2016-07/133515.htm

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326241128&siteId=291194637