One liunx command per day ( ps )

ps

ps process viewing command, providing viewing, running status of the process, occupied resources and other information
ps only view the instantaneous status of the current process, not dynamic and continuous; (real-time monitoring command top)

parameter

-A: All processes are displayed, which has the same effect as -e;
-a: All processes under the current terminal, including processes of other users;
-u: User-based process status;
x: Usually used with the a parameter, More complete information can be listed.

l: Longer and more detailed information about the PID is listed;
j: Jobs format
-f: Do a more complete output.

FRepresents the flag of this program (flag), 4 represents the user is superuser (super user);
Srepresents the state of this program (STAT);
UIDrepresents the identity of the executor
PIDProcess ID number! The PPID at the bottom is the ID of the parent process;
USER: Which user account does this process belong to?

CPercentage
%CPUof CPU resources used: The percentage of CPU resources used by
%MEMthe process; : The percentage of physical memory occupied by the
VSZprocess; : The amount of virtual memory used by the process (Kbytes)
RSS: The fixed amount of memory (Kbytes)
TIMEused by the process lost CPU time.
SZThe amount of memory used;

PRIRefers to the execution priority of the process (abbreviation for Priority), the smaller the value, the earlier it will be executed;
NIthe nice value of this process, which represents the revised value of the priority of the process that can be executed.

ADDRThis is a kernel function that indicates which part of memory the program is in. If it is an executing program, it is generally "-"
WCHANwhether the program is currently running, if it is - it means it is running;

TTY: The process is running on the terminal. If it has nothing to do with the terminal, it will display ?. In addition, tty1-tty6 are the login programs on the local machine. If it is pts/0, etc., it means that it is connected by the network. into the host program.

STAT: The current state of the program, the main states are:

1. `R` :该程序目前正在运作,或者是可被运作;
2. `S` :该程序目前正在睡眠当中 (可说是 idle 状态啦!),但可被某些讯号(signal) 唤醒。
`T` :该程序目前正在侦测或者是停止了;
`Z` :该程序应该已经终止,但是其父程序却无法正常的终止他,造成 zombie (疆尸) 程序的状态

START: The time when the process is triggered to start;
TIME: The time when the process actually uses the CPU.

CMDName of command given
COMMAND: What is the actual command of the program?

common way

ps -lDisplay the PID and related information of this login Display the PID and related information
ps -lAof all programs
ps auxList all currently running programs in memory
ps -axjfList the program tree form

[reference document]

1

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325302838&siteId=291194637