Linux ps command, view the cpu and memory usage sorting of processes, linuxps

Source: Internet
Author: User

Linux ps command to view the cpu and memory usage sorting (conversion), linuxps

Run the following command to View Details:

ps -aux | sort -k4,4nps auxw --sort=rssps auxw --sort=%cpu

  

Ps commands in linux
% CPU usage of the cpu process % memory usage of the MEM process the size of the virtual memory used by the VSZ process the size of the RSS process uses a large resident set or the actual memory size of the TTY and the terminal associated with the process (tty) STAT check status: Process status is represented by characters, such as R (running is running or ready to run), S (sleeping sleep), I (idle), and Z (stiff), D (uninterruptible sleep, usually I/O), P (waiting for switching page), W (switching out, indicating that the current page is not in memory), N (low-priority task) T (terminate), W has no resident pagesSTART (process start TIME and date) TIME; (total cpu TIME used by the process) COMMAND (COMMAND line COMMAND being executed) NI (nice) Priority PRI process priority number PPID parent process ID (parent process id) SID session ID (session id) Name of the kernel function in which the WCHAN process is sleeping; The function name is obtained from the/root/system. map File. FLAGS and process-related digital identification common parameter-A shows all processes (equivalent to-e) (utility)-a shows all processes of A terminal, except session lead-N ignore selection. -D: display all processes, but omit all session leads (utility)-x: display processes without control terminals, and display the specific path of each command. Dx cannot be used together. (Utility)-p pid process uses the cpu time-u uid or username to select a valid user ID or user name-g gid or groupname to display all processes in the group. U username displays all processes under the user and detailed paths of each command. For example, ps U zhang; (utility)-f is all listed. It is usually used with other options. For example, the ps-fa or ps-fx and so on.-l long format (with fields such as F, wchan, and C)-j job format-o User-Defined Format. V displays s in the format of virtual memory in the signal format.-m Displays all threads.-H displays the process layers (used with other commands, such as ps-Ha) (utility) environment (for example, ps-d e; ps-a e) (utility) h does not display the first line

 

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.