procfs - How is run queue length computed in linux proc filesystem -


i'm trying obtain number of runnable processes linux kernel. sar -q gives information readily. i'm trying value /proc filesystem. there no file in /proc gives value directly, how runq-sz computed. wiki page http://en.wikipedia.org/wiki/load_(computing) provides insight how run queue length computed based on ldavg values unclear. can provide more pointers on this. cheers

as gcla said cat use

cat /proc/loadavg 

to read loadavarage from kernel - strictly speaking, not queue length.

take @

grep procs_running /proc/stat 

and

grep procs_blocked /proc/stat 

first actual running queue , second number of process blocked on disk io. load average function sum of both.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -