From: Frans Pop <elendil@planet.nl>
To: linux-kernel@vger.kernel.org
Cc: "Alexander E. Patrakov" <patrakov@ums.usu.ru>
Subject: Re: top displaying 9999% CPU usage
Date: Wed, 3 Oct 2007 16:04:07 +0200 [thread overview]
Message-ID: <200710031604.07365.elendil@planet.nl> (raw)
In-Reply-To: <4703932C.6060900@ums.usu.ru>
On Wednesday 03 October 2007, you wrote:
> Try to capture the i/o log with the following command:
> strace -o top.log top
Thanks for the suggestion.
> This will show for sure whether the kernel gives out incorrect data or
> top misinterprets them.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5269 fjp 20 0 442m 61m 33m S 9999 3.1 0:34.12 kontact
Here are the last two reads for PID 5269 from /proc before that:
15:48:51 stat("/proc/5269", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
15:48:51 open("/proc/5269/stat", O_RDONLY) = 10
15:48:51 read(10, "5269 (kontact) S 1 5100 5100 0 -1 4202560 58186 7891 290 1 2911 502 10 15 20 0 6 0 9225 464408576 15694 18446744073709551615 4194304 4365900 140733817144688 18446744073709551615 47998530367074 0 0 4098 83113 18446744073709551615 0 0 17 1 0 0 0\n", 1023) = 244
15:48:51 open("/proc/5269/statm", O_RDONLY) = 10
15:48:54 stat("/proc/5269", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
15:48:54 open("/proc/5269/stat", O_RDONLY) = 10
15:48:54 read(10, "5269 (kontact) S 1 5100 5100 0 -1 4202560 58186 7891 290 1 2912 500 10 15 20 0 6 0 9225 464408576 15694 18446744073709551615 4194304 4365900 140733817144688 18446744073709551615 47998530367074 0 0 4098 83113 18446744073709551615 0 0 17 1 0 0 0\n", 1023) = 244
15:48:54 open("/proc/5269/statm", O_RDONLY) = 10
The only change is in 2 consecutive columns: "2911 502" -> "2912 500".
Is processor usage calculated from those? Can someone explain how?
In reply to Jan Engelhardt:
If I run the endless loop, top just displays 100%.
I've not seen the 9999 in htop, only occasionally "100." for both.
This is on an x86_64 SMP box.
next prev parent reply other threads:[~2007-10-03 14:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-03 12:33 top displaying 9999% CPU usage Frans Pop
2007-10-03 12:52 ` Jan Engelhardt
2007-10-03 13:03 ` Alexander E. Patrakov
2007-10-03 14:04 ` Frans Pop [this message]
2007-10-03 14:43 ` Ilpo Järvinen
2007-10-03 14:51 ` Ilpo Järvinen
2007-10-03 19:27 ` Decreasing stime running confuses top (was: top displaying 9999% CPU usage) Frans Pop
2007-10-03 20:24 ` Willy Tarreau
2007-10-03 23:32 ` Frans Pop
2007-10-04 19:19 ` Luca Tettamanti
2007-10-04 19:32 ` Decreasing stime running confuses top Chuck Ebbert
2007-10-04 20:00 ` Christian Borntraeger
2007-10-04 20:21 ` Chuck Ebbert
2007-10-04 21:10 ` [PATCH for testing] " Christian Borntraeger
2007-10-04 22:01 ` Chuck Ebbert
2007-10-04 22:31 ` Christian Borntraeger
2007-10-05 11:43 ` Luca
2007-10-05 15:07 ` Frans Pop
2007-10-05 15:49 ` Frans Pop
2007-10-08 16:49 ` Christian Borntraeger
2007-10-08 17:00 ` Ingo Molnar
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=200710031604.07365.elendil@planet.nl \
--to=elendil@planet.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=patrakov@ums.usu.ru \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.