This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 'top' command always reports 0.0% cpu usage


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]