Ps aux explanation in Linux and linuxpsaux explanation

Source: Internet
Author: User

Ps aux explanation in Linux and linuxpsaux explanation

Ps aux is used to print all processes

Ps is the most basic and powerful process view command

Both aux Parameters

A = show processes for all users display processes of all users
U = display the process's user/owner display the user
X = also show processes not attached to a terminal: displays the process of the uncontrolled terminal.

In the axo to be introduced below

O = format, user-defined

1) Displaying top 10 CPU_consuming processes: displays the 10 processes that consume the most CPU # ps aux | head-1; ps aux | sort-rn + 2 | head-102) displaying top 10 memory-consuming processes: displays the top 10 processes that consume the most memory # ps aux | head-1; ps aux | sort-rn + 3 | head

To view custom columns we use the below command [root @ server ~] # Ps axo stat, euser, ruser, % mem, pid, % cpu, comm
Here stat-> status of the processeuser-> valid tive userruser-> real user % mem-> percentage of memory utilized by processpid-> process ID % cpu-> percentage of memory utilized by processcomm -> command
To view top 10 memory utilized process [root @ server ~] # Ps axo ruser, % mem, comm, pid, euser | sort-nr | head-n 10 RUSER % MEM COMMAND PID EUSER
Root 0.4 sshd 3189 root
Root 0.4 sshd 2486 root
Root 0.2 master 1194 root
Root 0.1 rsyslogd 2918 root
Root 0.1 ps 3355 root
Root 0.1 login 1217 root
Root 0.1 bash 3191 root
Root 0.1 bash 3080 root
Root 0.1 bash 2488 root
To view top 10 memory utilized process [root @ server ~] # Ps axo ruser, % cpu, comm, pid, euser | sort-nr | head-n 10 RUSER % CPU COMMAND PID EUSER
Root 0.2 events/0 7 root
Root 0.0 watchdog/0 6 root
Root 0.0 vsftpd 1118 root
Root 0.0 vmmemctl 593 root
Root 0.0 usbhid_resumer 41 root
Root 0.0 udevd 420 root
Root 0.0 udevd 1235 root
Root 0.0 udevd 1234 root
Root 0.0 sync_supers 13 root


Reference:

Http://www.360doc.com/content/12/0405/19/1671317_201194366.shtml

Http://www.unixmantra.com/2013/07/top-12-ps-performance-commands.html

Http://easylinuxtutorials.blogspot.com/2013/10/how-to-find-top-10-cpu-memory-consuming.html


Ps-aux command in linux

The format of ps-aux is incorrect. There will be a warning when there is no MPs queue. You can try it carefully.
For the reason, refer to man's content, man ps:
Note that "ps-aux" is distinct from "ps aux". The POSIX and UNIX standards require that "ps-aux" print all processes owned by a user named
"X", as well as printing all processes that wocould be selected by the-a option. If the user named "x" does not exist, this ps may interpret
The command as "ps aux" instead and print a warning. This behavior is intended to aid in transitioning old scripts and habits. It is fragile,
Subject to change, and thus shoshould not be relied.
If user x exists in the system, ps-aux is used to obtain the process information of user x. If user x does not exist, it is the same as ps aux. So remember not to use "-" When Using ps aux later "-"

In the Linux Shell program, what is ps aux | grep top?

Common ps command parameter process view command
You need to know some of the most common command parameters.
The three most common parameters are u, a, and x.
A displays all processes on the terminal, including those of other users.
X displays the processes without control terminals.
U user Username
Grep is a powerful text search tool that uses regular expressions to search for text.
| The pipeline symbol indicates that the preceding command result is used as the subsequent command input.

Therefore, the entire expression indicates that all processes that contain other users are displayed and the top name is found.

Related Article

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.