'top' command always reports 0.0% cpu usage

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Feb 17 11:39:00 GMT 2006


On Feb 17 11:20, Chris January wrote:
> On 17/02/06, Corinna Vinschen <corinna-cygwin@XXXXXX.XXX> wrote:

http://cygwin.com/acronyms/#PCYMTNQREAIYR

> >   if (!fp)
> >     {
> >       fp = fopen ("/proc/stat", "r");
> >       setvbuf (fp, NULL, _IONBF, 0);
> >     }
> >   rewind(fp);
> >   fflush(fp);
> >   fread(fp);
> >
> > That works nicely, obviously.  Would you mind to release a new version
> > of procps with the above or a similar patch?
> 
> Sure, although it might be a little while before I have time. I'll
> submit the patch upstream as well.

Thanks.  In theory, this problem might be present in reading other
/proc files, too, but I just looked into the /proc/stat problem.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-apps mailing list