How to find the processor queue length in linux

后端 未结 4 1216
执笔经年
执笔经年 2021-02-06 04:56

Trying to determine the Processor Queue Length (the number of processes that ready to run but currently aren\'t) on a linux machine. There is a WMI call in Windows for this metr

4条回答
  •  不要未来只要你来
    2021-02-06 05:28

    vmstat

    procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
     r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
     2  0 256368  53764  75980 220564    2   28    60    54  774 1343 15  4 78  2
    

    The first column (r) is the run queue - 2 on my machine right now

    Edit: Surprised there isn't a way to just get the number

    Quick 'n' dirty way to get the number (might vary a little on different machines):

      vmstat|tail -1|cut -d" " -f2
    

提交回复
热议问题