linuxps命令结果 linux命令ps什么意思( 四 )


au(x) 输出格式:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
USER:行程拥有者
PID:pid
%CPU:占用的CPU使用率
%MEM:占用的记忆体使用率
VSZ:占用的虚拟记忆体大小
RSS:占用的记忆体大小
TTY:终端的次要装置号码
STAT:该行程的状态
①D 无法中断的休眠状态
②R 正在执行中
③S 静止状态
④T 暂停执行
⑤Z 不存在但暂时无法消除
⑥W 没有足够的记忆体分页可分配
⑦ 高优先序的行程
⑧N 低优先序的行程
⑨L 有记忆体分页分配并锁在记忆体内
START:行程开始时间
TIME:执行的时间
COMMAND:所执行的指令
【ps】关于Linux ps命令的妙用How to get all process ids without ps command on Linux?
On Linux, all running process have "metadata" stored in the/proc filesystem .
# manps
# ps -C sshd --no-header
# ps -C dockerd --no-header
-C cmdlist
Select by command name.This selects the processes whose executable name is given in cmdlist.
you can use the long options --headers and --no-headers to enable printing headers each page or disable headers entirely, respectively.
#ps -eo nlwp,pcpu,user,pid,ppid,args--sort nlwp
注:以 nlwp排序,默认正序
LWP -- 轻量级进程,即线程
NLWP --线程数,即 number of threads in process
#ps -eo pid,cmd,%mem,%cpu --sort=-%mem
Thecommand is highly valuable for system admins during troubleshooting the system.
You can display the processes list in a sorted manner to find out the highest memory usage processes.
#ps -mp${pid}-oTHREAD,tid,time
参数解释:
-m:显示所有的线程
-p:pid进程使用CPU的时间
-o:该参数后是用户自定义格式 。
如:THREAD,tid,time表示线程、线程ID号、线程占用的时间 。
$ ps -Hp${pid}
ps(1) — Linux manual page
Linux PS command with examples
How to get all process ids without ps command on Linux?
What is the difference between ps and top command?
求助linux下ps命令显示含义.分类:电脑/网络操作系统/系统故障
问题描述:
linux下ps命令后的status项
显示Rs代表什么含义,
R表示run
s代表sleep
那么R与s合起来是什么?
以及大写S与小写s有什么区别.
经常看到Ss的状态 。
解析:
刚刚装了RHEL5β2版本
发现这个版本的ps和top里面是有Ss的
man了一下 ps和top
解释如下
PROCESS STATE CODES
Here are the different values that the s, stat and state output specifiers
(header "STAT" or "S") will display to describe the state of a process.
D Uninterruptible sleep (usually IO)
R Running or runnable (on run queue)
S Interruptible sleep (waiting for an event to plete)
T Stopped, either by a job control signal or because it is being traced.
W paging (not valid since the 2.6.xx kernel)
X dead (should never be seen)
Z Defunct ("zombie") process, terminated but not reaped by its parent.
For BSD formats and when the stat keyword is used, additional characters may
be displayed:
high-priority (not nice to other users)
N low-priority (nice to other users)
L has pages locked into memory (for real-time and custom IO)
s is a session leader
l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
+ is in the foreground process group
关于linuxps命令结果和linux命令ps什么意思的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。