Re: top, ps etc. lying about cpu idle [was Re: Cyrix 6x86MX and Centaur C6 CPUs in 2.1.102]

Pavel Machek (pavel@elf.ucw.cz)
Wed, 20 May 1998 23:56:20 +0200


Hi!

> >top is broken broken broken.
>
> Thank you VERY much for volunteering to fix it! I'm anxiously awaiting
> your patch sent to procps-bugs@redhat.com

Last time I tried to do this, I got top-current and started fixing
it. Then I found out that it had even more fatal bugs than completely
bogus value in Idle: field.

If you want to show missbehaviour, try

void
main( void )
{
int i;
for (i=0; i<1000; i++)
system( "echo line >> /tmp/delme" );
}

You need to show 4th value in 'cpu' line in /proc/stat in idle %, not
100-sum of all tasks.

Pavel

-- 
I'm really pavel@atrey.karlin.mff.cuni.cz. 	   Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu