Linux PS aux explained in detail

Source: Internet
Author: User

Recently on-line module, always inexplicably to kill the server, execute any command on the server always reported-bash:fork:cannot allocate memory

After waiting for a while, even SSH will not be able to proceed, the following two commands, you can view the current machine CPU, MEM top:

# The Linux fetch process consumes the highest CPU top 10 processes PS Aux|head-1;ps aux|grep-v pid|sort-rn-k +3|head

# Linux down process takes up memory (MEM) The top 10 processes PS Aux|head-1;ps aux|grep-v pid|sort-rn-k +4|head

PS aux detailed:

# PS aux|head-1 #显示ps aux execution First line USER PID%cpu%MEM VSZ RSS TTY STAT START time COMMAND

The vsz indicates how much memory space is required if a program resides completely in memory; RSS indicates how much memory is currently in use; Stat shows the current status of the process: D non-interruptible uninterruptible (usually IO) R is running, or the process in the queue S is in hibernation T stop or is traced Z zombie process W enters memory swap (from kernel 2.6 Start invalid) X dead process

1) PS A shows all the programs under the current terminal, including other users ' programs. 2) ps-a Show All Programs. 3) PS C lists the program, displays the actual instruction name of each program, and does not include the path, parameter or the indication of the resident service. 4) Ps-e The effect of this parameter is the same as specifying the "A" parameter. 5) When listing the program, PS e displays the environment variables used by each program. 6) PS F Displays the tree structure with ASCII characters, expressing the relationship between the programs. 7) ps-h shows the tree structure, indicating the relationship between the programs. 8) Ps-n shows all the programs except the program under the PS Command Terminal. 9) PS s uses the program signal format to display the program status. PS S when listing programs, including interrupted sub-program data. Ps-t < terminal number > Specify the terminal number and list the status of the program belonging to the terminal. PS U Displays the status of the program in a user-oriented format. PS x Displays all programs and does not differentiate by terminal.

Ps-l a longer, more detailed display of the PID information

Linux PS aux explained in detail

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.