Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to the Command of ps aux Terminal

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

PS aux command details

ps -aux instruction

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

3) ps c When listing programs, displays the true command name of each program, without including paths, parameters, or resident service identifiers.

4) ps -e This parameter has the same effect as specifying the "A" parameter.

5) ps e When listing programs, displays the environment variables used by each program.

6) ps f Display tree structure with ASCII characters to express the relationship between programs.

7) ps -H Displays a tree structure that indicates the interrelationships between programs.

8) ps -N Displays all programs except those under the terminal that executes ps commands.

9) ps s displays program status in the format of program signals.

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

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

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

13)ps x Displays all programs, regardless of terminal.

14) ps -l longer, more detailed display of the PID information

# ps -lA |more1F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD4 S 0 1 0 0 76 0 - 1193 109952 ? 00:00:03 init1 S 0 2 1 0 -40 - - 0 migrat ? 00:00:03 migration/01 S 0 3 1 0 94 19 - 0 ksofti ? 00:00:00 ksoftirqd/01 S 0 4 1 0 -40 - - 0 migrat ? 00:00:02 migration/11 S 0 5 1 0 94 19 - 0 ksofti ? 00:00:00 ksoftirqd/11 S 0 6 1 0 -40 - - 0 migrat ? 00:00:02 migration/21 S 0 7 1 0 94 19 - 0 ksofti ? 00:00:00 ksoftirqd/2

Meaning of relevant information:

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

S Status of the process (stat), see below for the meaning of each STAT

PID Process ID

C Percentage of CPU resources used

Abbreviation for PRI priority,

NI Nice value,

ADDR core function, indicating that the process in that part of memory, if it is a running process, generally "-"

Size of memory used by SZ

WCHAN whether the current process is running, if "-" means running

Terminal location of TTY registrant

TIME CPU time spent

Command executed by CMD

# ps aux |moreUSER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMANDroot 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]

Owner of USER process;

ID of PID process;

PPID parent process;

%CPU Percentage of CPU consumed by processes;

% MEMPercentage of memory occupied;

NI process NICE value, the value is large, indicating less CPU time;

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

RSS Fixed amount of memory consumed by the process (KB)(number of pages residing);

TTY The process runs on which terminal (logged-in's terminal location), and displays (?) if it is not terminal-related. If pts/0, etc., it indicates that the host process is connected by the network.

WCHAN whether the current process is in progress, if-means in progress;

START The time at which the process was triggered;

TIME The actual CPU running time used by the process;

The name and parameters of the COMMAND command;

There are five states of processes on linux:

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

2. interrupt (dormant, blocked, waiting for a condition to develop or receive a signal)

3. Non-interruptible (received signal does not wake up and does not run, the process must wait until an interrupt occurs)

4. Dead (process terminated, but process descriptor exists until parent process calls wait4() system call and releases)

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

STAT Status Bit Common status characters:

D. Uninterruptible dormant state (usually IO process);

R is running in a queue that can be traversed;

S is dormant;

T stopped or tracked;

W enters memory swap (invalid since kernel 2.6);

X Dead processes (rarely seen);

Z Zombie process;

N Lower priority processes

L Some pages are locked into memory;

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

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

+ Process groups in the background;

The above is the ps aux command detailed content, more please pay attention to other related articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report