This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: 'top' command always reports 0.0% cpu usage
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: Chris January <chris at atomice dot net>
- Cc: cygwin-apps at cygwin dot com
- Date: Fri, 17 Feb 2006 12:39:28 +0100
- Subject: Re: 'top' command always reports 0.0% cpu usage
- References: <261998F8FB9AF44B80638C240CF14A5A01CEF66F@EXCHANGE1.mexico.tem.mx> <20060217111407.GB1372@calimero.vinschen.de> <2ce9650b0602170320h5020ee89y@mail.gmail.com>
- Reply-to: cygwin-apps at cygwin dot com
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