Home > Operation and Maintenance > Linux Operation and Maintenance > Detailed explanation of ps aux command

Detailed explanation of ps aux command

藏色散人
Release: 2020-01-15 10:23:25
Original
23647 people have browsed it

Detailed explanation of ps aux command

ps aux command detailed explanation

ps -aux command detailed explanation

Recommended: "linux tutorial

1) ps a displays all programs under the current terminal, including programs of other users.

3) When ps c lists programs, the real instruction name of each program is displayed, without including the path, parameters or identification of resident services.

4) ps -e The effect of this parameter is the same as specifying the "A" parameter.

5) When ps e lists programs, display the environment variables used by each program.

6) ps f uses ASCII characters to display the tree structure and express the relationship between programs.

7) ps -H displays a tree structure, indicating the relationship between programs.

8) ps -N displays all programs, except the programs under the terminal that execute the ps command.

9) ps s uses the program signal format to display the program status.

10) ps S includes interrupted subroutine information when listing programs.

11) ps -t Specify the terminal number and list the status of the programs belonging to the terminal.

12) ps u Display program status in user-oriented format.

13) ps x Displays all programs, not distinguished by terminal.

14) ps -l is longer and displays the information of the PID in more detail

# ps -lA |more
1
F S   UID   PID  PPID  C PRI  NI ADDR SZ   WCHAN     TTY            TIME          CMD
4 S     0     1     0        0  76   0     -  1193 109952       ?             00:00:03 init
1 S     0     2     1        0 -40   -      -     0    migrat        ?             00:00:03 migration/0
1 S     0     3     1        0  94  19    -     0     ksofti         ?             00:00:00 ksoftirqd/0
1 S     0     4     1        0 -40   -      -     0    migrat        ?             00:00:02 migration/1
1 S     0     5     1        0  94  19    -     0    ksofti          ?             00:00:00 ksoftirqd/1
1 S     0     6     1        0 -40   -      -     0    migrat        ?             00:00:02 migration/2
1 S     0     7     1        0  94  19    -     0    ksofti          ?             00:00:00 ksoftirqd/2
Copy after login

The meaning of related information:

F process flag (flag), 4 indicates that the user is a super user

S ​​The status of the process (stat), the meaning of each STAT is shown below

PID The ID of the process

C CPU usage resources Percentage

PRI priority (priority) abbreviation,

NI Nice value,

ADDR core function, indicating that part of the memory of the process, if it is running Process, usually "-"

SZ The size of the memory used

WCHAN Whether the current process is running, if "-" means it is running

TTY login The terminal location of the user

TIME The time of the CPU used

CMD The command executed

# ps aux |more
USER       PID %CPU %MEM   VSZ  RSS  TTY                   STAT     START   TIME     COMMAND
root         1        0.0  0.0       4772  564 ?                         S        Sep22   0:03     init [3]
root         2        0.0  0.0        0    0        ?                         S        Sep22   0:03     [migration/0]
root         3        0.0  0.0        0    0        ?                         SN      Sep22   0:00     [ksoftirqd/0]
root         4        0.0  0.0        0    0        ?                         S        Sep22   0:02     [migration/1]
root         5        0.0  0.0        0    0        ?                         SN      Sep22   0:00     [ksoftirqd/1]
root         6        0.0  0.0        0    0        ?                         Ss+     Sep22   0:02     [migration/2]
root         7        0.0  0.0        0    0        ?                         SN      Sep22   0:00     [ksoftirqd/2]
root         8        0.0  0.0        0    0        ?                         S        Sep22   0:00     [migration/3]
root         9        0.0  0.0        0    0        ?                         SN      Sep22   0:00     [ksoftirqd/3]
root        10       0.0  0.0        0    0        ?                         S<      Sep22    0:00     [migration/4]
Copy after login

USER The owner of the process;

PID of the process ID;

PPID parent process;

%CPU percentage of CPU occupied by the process;

%MEM percentage of memory occupied;

NI NICE value of the process , a large value means less CPU time is occupied;

VSZ The amount of virtual memory used by the process (KB);

RSS The amount of fixed memory occupied by the process (KB) (resident) The number of pages);

TTY On which terminal the process is running (the terminal location of the login user), if it has nothing to do with the terminal, (?) is displayed. If it is pts/0, etc., it means that the host process is connected by the network

WCHAN Is the current process in progress? If it is -, it means it is in progress;

START The process is triggered to start the time;

TIME The actual CPU running time of the process;

COMMAND command name and parameters;

The process on Linux has 5 states:

1. Running (running or waiting in the run queue)

2. Interrupt (sleeping, blocked, waiting for a certain condition to form or receiving a signal)

3 . Uninterruptible (no wake-up and non-executable upon receiving a signal, the process must wait until an interrupt occurs)

4. Zombie (the process has been terminated, but the process descriptor exists until the parent process calls the wait4() system call Release after)

5. Stop (the process stops running after receiving SIGSTOP, SIGSTP, SIGTIN, SIGTOU signals)

Common status characters for STAT status bits:

D Uninterruptible dormant state (usually IO process);

R Running and queued;

S ​​In dormant state;

T Stopped or tracked;

W Enters memory swap (invalid starting from kernel 2.6);

X Dead process (basically rare);

Z Zombie process;

< High priority process

N Lower priority process

L Some pages are locked into memory;

s The leader of the process (there are child processes under it);

l Multi-process (using CLONE_THREAD, similar to NPTL pthreads);

The process group located in the background;

The above is the detailed content of Detailed explanation of ps aux command. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template