Linux ps command

The ps (process status) command is one of the most frequently used commands in Linux. Usually it is used to get the more and detailed information about a specific process or all processes. For example it is used to know whether a particular process is running or not, who is running what process in system, which process is using higher memory or CPU, how long a process is running, etc.

 Without any option and argument, the ps command shows only the process running under the logged in user account from the current terminal.

To print all running processes in system, use any one of the following commands.

$ps –A
$ps -e

The options A and e provide summarized overview of running processes. To print the detailed overview, use the options f (full format) and F (extra full format) with these options.

To view the same output in BSD Unix style, use the options "aux".

 

The ps aux command output description column by column

ColumnDescription
USERThe user account under which this process is running
PIDProcess ID of this process
%CPUCPU time used by this process (in percentage).
%MEMPhysical memory used by this process (in percentage).
VSZVirtual memory used by this process (in bytes).
RSSResident Set Size, the non-swappable physical memory used by this process (in KiB)
TTYTerminal from which this process is started. Question mark (?) sign represents that this process is not started from a terminal.
STATProcess state. Explained in next table.
STARTStarting time and date of this process
TIMETotal CPU time used by this process
COMMANDThe command with all its arguments which started this process

ps aux stat code with description

Duninterruptible sleep (usually IO)
Rrunning or runnable (on run queue)
Sinterruptible sleep (waiting for an event to complete)
Tstopped by job control signal
tstopped by debugger during the tracing
wpaging (not valid since the 2.6.xx kernel)
xdead (should never be seen)
Zdefunct ("zombie") process, terminated but not reaped by its parent
<high-priority (not nice to other users)
Nlow-priority (nice to other users)
Lhas pages locked into memory (for real-time and custom IO)
sis a session leader
lis multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
+is in the foreground process group

To display all process in hierarchy, we can use the following command.

ps -A --forest

 

 

 From:

ps aux command and ps command explained

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

First Snowflakes

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值