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

Source: Internet
Author: User

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

The contents of each column are as follows

UID     // user ID, but output is username PID     // process IDPPID    // parent process IDC       // process consumes percent of CPU stime   // the time that the process started up to now TTY     // The process runs on that terminal, and if it is not related to the terminal, it is displayed. If pts/0, 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

Unlike Ps-ef, there are lists of

User      // username %cpu      // process occupied CPU percentage %MEM      // % of memory consumed VSZ       // The amount of virtual memory used by the process (KB)RSS       // This process occupies a fixed amount of memory (KB) (number of pages residing in)STAT      // status of the process START     // The process is triggered by the start time Time      // when the process actually uses the CPU to run

Where the stat status bit common state characters have

D//Unable to interrupt the sleep state (usually the IO process);R//running can be in the queue can be too line;S//in hibernation state;T//stop or be traced;W//Enter memory swap (invalid starting from kernel 2.6);X//the dead process (rarely seen);Z//zombie process;<//high-priority processesN//processes with lower priorityL//Some pages are locked into memory;S//leader of the process (under it there are sub-processes);L//multi-threaded, cloned threads (using Clone_thread, similar to NPTL pthreads);+//process groups located in the background;

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.