How is run queue length computed in linux proc filesystem

Rik van Riel riel at surriel.com
Fri Aug 16 12:57:23 EDT 2013


On 08/16/2013 09:20 AM, emani murali wrote:
> Hi,
>
> I'm trying to obtain number of runnable processes from linux kernel. sar
> -q gives this information readily. However I'm trying to get this value
> from /proc filesystem. There is no file in /proc that gives this value
> directly, then how is runq-sz computed.

Tools like top, vmstat, and sar, simply look at all the processes
in /proc, and count the number that are in runnable (R) state.

-- 
All rights reversed.



More information about the Kernelnewbies mailing list