扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
linux中top的秘密:
top中按1键和F键的参数:
按1键可以等到多个cpu的情况
按F(f:当前状态,可以按相应的字母键做top的定制输出)后得参数:
对F键和f键的区别:
如果进入F键区可以做显示的排序,如果进入f键区的话则可以选择显示的多个项目:
* A: PID = Process Id //进程ID
b: PPID = Parent Process Pid //父进程ID
c: RUSER = Real user name //真正的(Real)所属用户名称
d: UID = User Id //用户ID
e: USER = User Name //用户名称
f: GROUP = Group Name //组名称
g: TTY = Controlling Tty //控制
h: PR = Priority //优先权
i: NI = Nice value //优先级得值(负数代表较高的优先级,正数是较低的优先级.0标志改优先级的值是不会被调整的)
j: #C = Last used cpu (SMP) //随后使用的cpu比率
k: %CPU = CPU usage //cpu使用比率
l: TIME = CPU Time //cpu占用时间
m: TIME+ = CPU Time, hundredths //cpu%比
n: %MEM = Memory usage (RES) //内存使用率
o: VIRT = Virtual Image (kb) //虚拟镜像(VIRT = SWAP + RES:所有进程使用的虚拟内存值,包括所有的代码,数据,共享库已经被swapped out的)
p: SWAP = Swapped size (kb) //交换空间大小(所有虚拟内存中的镜像)
q: RES = Resident size (kb) //已经使用了的常驻内存(Resident size):RES = CODE + DATA
r: CODE = Code size (kb) //分配给执行代码的物理内存
s: DATA = Data+Stack size (kb) //data+stack:物理内存中非存放代码的空间,用于存放数据
t: SHR = Shared Mem size (kb) //共享内存大小.放映了一个task的潜在可以供别人使用的内存的大小
u: nFLT = Page Fault count //内存叶错误的数量
v: nDRT = Dirty Pages count //脏页的数量
w: S = Process Status //进程状态:( R )为运行或可执行的,( S )为该程序正在睡眠中,( T )正在侦测或者是停止了,( Z )僵尸程序
x: COMMAND = Command name/line //进程启动命令行参数
y: WCHAN = Sleeping in Function //在睡眠中
z: Flags = Task Flags <sched.h> //任务标志
Note1:
If a selected sort field can't be
shown due to screen width or your
field order, the '<' and '>' keys
will be unavailable until a field
within viewable range is chosen.
Note2:
Field sorting uses internal values,
not those in column display. Thus,
the TTY & WCHAN fields will violate
strict ASCII collating sequence.
(shame on you if WCHAN is chosen)
* A: PID = Process Id
* E: USER = User Name
* H: PR = Priority
* I: NI = Nice value
* O: VIRT = Virtual Image (kb)
* Q: RES = Resident size (kb)
* T: SHR = Shared Mem size (kb)
* W: S = Process Status
* K: %CPU = CPU usage
* N: %MEM = Memory usage (RES)
* M: TIME+ = CPU Time, hundredths
b: PPID = Parent Process Pid
c: RUSER = Real user name
d: UID = User Id
f: GROUP = Group Name
g: TTY = Controlling Tty
j: #C = Last used cpu (SMP)
p: SWAP = Swapped size (kb)
l: TIME = CPU Time
r: CODE = Code size (kb)
s: DATA = Data+Stack size (kb)
u: nFLT = Page Fault count
v: nDRT = Dirty Pages count
y: WCHAN = Sleeping in Function
z: Flags = Task Flags <sched.h>
* X: COMMAND = Command name/line
Flags field:
0x00000001 PF_ALIGNWARN
0x00000002 PF_STARTING
0x00000004 PF_EXITING
0x00000040 PF_FORKNOEXEC
0x00000100 PF_SUPERPRIV
0x00000200 PF_DUMPCORE
0x00000400 PF_SIGNALED
0x00000800 PF_MEMALLOC
0x00002000 PF_FREE_PAGES (2.5)
0x00008000 debug flag (2.5)
0x00024000 special threads (2.5)
0x001D0000 special states (2.5)
0x00100000 PF_USEDFPU (thru 2.4)
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者