linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@conectiva.com.br>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>,
	<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>
Subject: Re: [RFC][PATCH] iowait statistics
Date: Wed, 15 May 2002 16:00:56 -0300 (BRT)	[thread overview]
Message-ID: <Pine.LNX.4.44L.0205151558180.32261-100000@imladris.surriel.com> (raw)
In-Reply-To: <20020515184646.GH27957@holomorphy.com>

On Wed, 15 May 2002, William Lee Irwin III wrote:

> $ vmstat 1
>    procs                      memory    swap          io     system         cpu
>  r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us  sy  id
> 17  0  0      0 182880  32364  55180   0   0     2    77   29   229  84   6  10
> 16  0  0      0 175224  32408  57524   0   0     0     0  104   961  95   5   0
>
> All good there. OTOH:
>
> $ top
> fscanf failed on /proc/stat for cpu 1

Doh, take a look at top.c around line 1460:

              for(i = 0; i < nr_cpu; i++) {
                if(fscanf(file, "cpu%*d %d %d %d %d\n",
                          &u_ticks, &n_ticks, &s_ticks, &i_ticks) != 4) {
                  fprintf(stderr, "fscanf failed on /proc/stat for cpu %d\n", i);

It would have been ok (like vmstat) if it didn't expect the \n
after the fourth number ;/

Oh well, time for another procps patch ;)

cheers,

Rik
-- 
Bravely reimplemented by the knights who say "NIH".

http://www.surriel.com/		http://distro.conectiva.com/


  reply	other threads:[~2002-05-15 19:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-14  1:19 [RFC][PATCH] iowait statistics Rik van Riel
2002-05-14  2:18 ` Andrew Morton
2002-05-14 12:30   ` Rik van Riel
2002-05-15 17:02   ` Denis Vlasenko
2002-05-16  7:41     ` Andrew Morton
2002-05-16 14:04       ` Denis Vlasenko
2002-05-14 15:39 ` William Lee Irwin III
2002-05-14 16:36   ` Rik van Riel
2002-05-14 16:54     ` William Lee Irwin III
2002-05-15 17:17       ` Denis Vlasenko
2002-05-15 14:03         ` Rik van Riel
2002-05-15 20:17           ` Denis Vlasenko
2002-05-15 16:13             ` Rik van Riel
2002-05-15 16:21               ` William Lee Irwin III
2002-05-15 17:00               ` William Lee Irwin III
2002-05-15 18:16                 ` Bill Davidsen
2002-05-15 18:30                 ` William Lee Irwin III
2002-05-15 18:33                   ` Rik van Riel
2002-05-15 18:46                     ` William Lee Irwin III
2002-05-15 19:00                       ` Rik van Riel [this message]
2002-05-16 11:42                         ` Denis Vlasenko
2002-05-16 11:14               ` Denis Vlasenko
2002-05-15 15:15         ` Bill Davidsen
2002-05-16 10:58           ` Denis Vlasenko
2002-05-14 18:19     ` Martin J. Bligh
2002-05-15  1:31 ` Bill Davidsen
2002-05-15  1:41   ` William Lee Irwin III
2002-05-15 14:39     ` Bill Davidsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44L.0205151558180.32261-100000@imladris.surriel.com \
    --to=riel@conectiva.com.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=vda@port.imtp.ilyichevsk.odessa.ua \
    --cc=wli@holomorphy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).