Messages in this thread | | | Date | Tue, 11 May 1999 20:56:55 +0200 | From | Pavel Machek <> | Subject | FIX top [was Re: strange idle%] |
| |
Hi!
> I was running top, and I noticed a very odd idle% pop up from time to time: > > 11:03am up 11:04, 1 user, load average: 2.00, 2.00, 2.00 > 36 processes: 32 sleeping, 4 running, 0 zombie, 0 stopped > CPU states: 0.4% user, 0.1% system, 99.4% nice, 428639.3% idle > ^^^^^^^^^ > I'm running the rc5des client on both cpu's of my dual PII running 2.2.7. > Nothing bad has happened, but I'm curious as to whether this might be an > overflow in whatever file in /proc top get's its info from...
Fix top. Top really lies about % idle: it computes it as 100-(%'s of processes it sees). That's WRONG. % idle should be get from % of idle process. Then, 100-(sum) could be reported as % unknown. Yes, %unknown happen: if gcc exits just before top runs, you have %'s for non-existent process and top does not see that %'s. It currently adds it to %idle which is wrong.
Pavel
-- I'm really pavel@ucw.cz. Look at http://195.113.31.123/~pavel. Pavel Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |