Linux Displays the system process command PS, the most commonly used are ps-ef and PS aux. What is the difference between the two? There is not much difference between the two, to discuss this issue, to go back to the UNIX system in the style of both
System V style and BSD style,PS aux was originally used in Unix style, and ps-ef is used in System V style, the output is slightly different. Most Linux systems today can be used in both ways.
PS-EF Displays the process in a standard format, with the following format
650) this.width=650; "src=" http://images.cnitblog.com/blog/643271/201501/061636554214244.jpg "/>
The contents of each column are as follows
UID//user ID, but output is username PID//process Idppid//Parent process IDC//Process CPU percentage stime//Process start to current time TTY//The process runs on that terminal, if it is not related to the terminal , then show? For pts/0, this means that the host process is connected by the network. CMD//Command name and parameters
PS aux is displayed in BSD format, and its format is as follows
650) this.width=650; "src=" http://images.cnitblog.com/blog/643271/201501/061640332967982.jpg "/>
Unlike Ps-ef, there are lists of
User//Username%CPU//process occupied CPU percentage%mem//% of memory consumed vsz////The process uses virtual memory (KB) RSS///The process occupies a fixed amount of storage (KB) (number of pages residing in) S TAT//Status of the process start//The process is triggered when the start time//The process actually uses the CPU to run the time
Where the stat status bit common state characters have
D//Can not interrupt the sleep state (usually IO process); R//is running can be in the queue can be over line; S//in hibernation; T//stop or be traced; W//Enter memory swap (invalid from kernel 2.6); X Dead process (rarely seen); Z//Zombie process;<//Priority high process N//Lower priority process L//Some pages are locked into memory; s//process leader (under it there are sub-processes); L//multithreading , Clone thread (using Clone_thread, similar to NPTL pthreads); +//process group located in the background;
The difference and format of ps-ef and PS aux under Linux