From mboxrd@z Thu Jan 1 00:00:00 1970 From: riel@surriel.com (Rik van Riel) Date: Fri, 16 Aug 2013 12:57:23 -0400 Subject: How is run queue length computed in linux proc filesystem In-Reply-To: References: Message-ID: <520E59F3.9070206@surriel.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org 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.