busybox‘top’命令进程 STAT 列中的尖括号(“小于”)是什么意思?

busybox‘top’命令进程 STAT 列中的尖括号(“小于”)是什么意思?

我正在查看 Busyboxtop命令:

Mem: 39444K used, 4404K free, 0K shrd, 0K buff, 24704K cached
CPU:   4% usr   7% sys   0% nic  87% idle   0% io   0% irq   0% sirq
Load average: 0.02 0.12 0.10 1/172 15422
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
  628   617 root     S    40456  92%   6% ./processA
  635   623 root     S <  37188  85%   4% ./processB
15179 14466 root     R     1976   4%   1% top
  633   616 root     S    11876  27%   1% ./processC

<请注意统计过程B命令。

那个尖括号是什么意思?

答案1

尖括号表示“高优先级”。更多详细信息请参阅“man ps”:

PROCESS STATE CODES
    D   uninterruptible sleep (usually IO)
    R   runnable (on run queue)
    S   sleeping
    T   traced or stopped
    Z   a defunct ("zombie") process

    For BSD formats and when the "stat" keyword is used, 
    additional letters can be displayed:
    W   has no resident pages
    <   high-priority process
    N   low-priority task
    L   has pages locked into memory (for real-time and custom IO)

进程的优先级范围为 -20 到 20。除非您将进程的优先级调整为足够低的值,否则您可能看不到高优先级指示器。示例:

root@localhost:~# dd if=/dev/zero of=/dev/null &
[1] 1450
[root@localhost ~]# renice -20 -p 1450
1450 (process ID) old priority 0, new priority -20
root@localhost:~# /bin/busybox top
...
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
 1450  1305 root     R <   4236   0%  25% dd if=/dev/zero of=/dev/null
 1478  1305 root     R    12012   0%   0% /bin/busybox top

相关内容