public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Albert Cahalan <albert@users.sf.net>
To: linux-kernel mailing list <linux-kernel@vger.kernel.org>
Cc: xuan--lkml--2003.09.12@baldauf.org
Subject: Re: "busy" load counters
Date: 13 Sep 2003 03:00:51 -0400	[thread overview]
Message-ID: <1063436451.314.9010.camel@cube> (raw)

Xuân Baldauf writes:

> Currently, tools like "top" show stats like
>
>   Cpu(s):  92.1% user,   6.9% system,   0.0% nice,   1.0% idle
>
> Unfortunately, these stats are not sufficient to determine wether the 
> system is "busy". Determining wether the system is "busy" is very useful 
> in case an interactive application (e.g. a shell or some shell command) 
> does not respond.
> Maybe it just hangs (waits for input) or does serious work (e.g. uses 
> the CPU or accesses the disk). Disk access is not visible in "top". 
> Depending on the machine, on disk accesses, there might be a slight or 
> significant rise in the "system" portion of those stats, but this is not 
> trustable.

The feature is available, but you'll need to upgrade
to procps-3.1.12 and linux-2.6.0-test4 at least.

http://www.kernel.org/pub/linux/kernel/v2.6/
http://procps.sf.net/

Once you've done that, both "top" and "vmstat" will
supply the info you want. There are 7 basic %CPU stats
right now:

us  regular user apps
sy  system (general kernel stuff)
ni  nice user apps (low-priority tasks)
id  idle
wa  waiting for IO to complete
hi  hard interrupt (IRQ) handlers
si  soft interrupt (network stack, mostly?) handlers

The "top" program shows all of those. The "vmstat"
program mixes "ni" into "us", and mixes "hi" and "si"
into "sy". An example for each:

procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 0  0      0   6896   2668 108896    0    0     0     1   34    14 10  3 87  0

top - 02:56:17 up 12 days, 13:43, 25 users,  load average: 0.37, 0.25, 0.22
Tasks: 129 total,   4 running, 124 sleeping,   1 stopped,   0 zombie
Cpu(s):  8.6% us,  5.6% sy,  0.0% ni, 85.8% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:    513924k total,   507068k used,     6856k free,     2664k buffers
Swap:        0k total,        0k used,        0k free,   108844k cached



             reply	other threads:[~2003-09-13  7:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-13  7:00 Albert Cahalan [this message]
2003-09-13  8:36 ` "busy" load counters dada1
2003-09-13 15:39   ` Albert Cahalan
  -- strict thread matches above, loose matches on Subject: below --
2003-09-12  2:59 Xuân Baldauf

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=1063436451.314.9010.camel@cube \
    --to=albert@users.sf.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xuan--lkml--2003.09.12@baldauf.org \
    /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