35. Common Linux Shell functions, PS

Source: Internet
Author: User

1. Description

Report a snapshot of the current processes.

PS [Options]

2. Common options

①L long format output;

②U displays processes in the username and start time order;

③J. display processes in the task format;

④F process is displayed in a tree format;

⑤A/e displays all processes of all users (including other users );

⑥X displays the process of the uncontrolled terminal;

7.R: displays running processes;

BytesWW to avoid detailed parameter truncation;

Explanation of execution results

①Owner of the user process;

②PID process ID;

③Ppid parent process;

④% Percentage of CPU used by CPU processes;

⑤% Mem memory usage percentage;

⑥Nice value of the Ni process. The value is large, indicating that the CPU time is less occupied;

7.Virtual size of vsz process;

BytesNumber of pages in RSS resident;

BytesWchan

BytesTty terminal ID

11Stat Process status

A.D uninterruptible sleep (usually Io)

B.R is running and can be crossed in the queue;

C.S is in sleep state;

D.T stop or be tracked;

E.W enters the memory switch (it is invalid from kernel 2.6 );

F.X dead processes (never seen );

G.Z botnets;

H.N processes with lower priority

I.L some pages are locked into the memory;

J.S process leader (with sub-processes under it );

K.L is multi-threaded (using clone_thread, like nptl pthreads do)

L.+ Process group in the background;

①Wchan Waiting process resources;

②The start time of the process;

③Time CPU consumption time of processes;

④Command name and parameters;

3. Example

PS aux

PS-auxf

Reference

[1]Http://linux.die.net/man/1/ps

Http://www.linuxsir.org/main/node/210

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.