This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH] /proc/loadavg: add running/total processes
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Wed, 30 Mar 2011 10:13:41 +0200
- Subject: Re: [PATCH] /proc/loadavg: add running/total processes
- References: <1301445133.756.11.camel@YAAKOV04>
- Reply-to: cygwin-patches at cygwin dot com
On Mar 29 19:32, Yaakov (Cygwin/X) wrote:
> This patch adds the fourth component of Linux's /proc/loadavg[1], the
> current running/total processes count. My only question is if states
> other than 'O' and 'R' should be considered "running" for this purpose.
That looks right. But I don't see that get_process_state will ever
generate an 'O'. Wouldn't that be the difference between StateReady (R)
and StateRunning (O)?
> - return __small_sprintf (destbuf, "%u.%02u %u.%02u %u.%02u\n",
> - 0, 0, 0, 0, 0, 0);
> + return __small_sprintf (destbuf, "%u.%02u %u.%02u %u.%02u %u/%u\n",
> + 0, 0, 0, 0, 0, 0, running, pids.npids);
What about the last column in /proc/loadavg, the last pid? Shouldn't
this be added and set to 0 as well?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat