[PLUG] high %idle

Geoff Burling llywrch at agora.rdrop.com
Wed Apr 24 18:39:53 UTC 2002


On Wed, 24 Apr 2002, Randy.Dunlap wrote:

(I figured if I threw out an answer, I'd attract someone who knew more
than me. ;-)

> On Wed, 24 Apr 2002, Geoff Burling wrote:
>
> | On Tue, 23 Apr 2002, Paul Heinlein wrote:
> |
> | > Anyone seen this sort of symtom before?
>
> Paul- is this single CPU or SMP?
>
If it's x86, it may not matter. I have a dual proc x86 system, & a larger
fragment from /proc/stat reads:

more /proc/stat
cpu  9280639 557083619 5995027 545458765
cpu0 4650093 285171375 2992275 266095282
cpu1 4630546 271912244 3002752 279363483

(But then a single datum does not prove an entire set of cases.)

[snip]

> | /proc/stat reads:
> |
>          user    nice     system   idle
> | cpu  9280639 557083619 5995027 545458765
>
> where idle ::= jif * smp_num_cpus - (user + nice + system)
>
> Hence my number_of_cpus question above.
>
Actually, iostat uses sscanf to read the value from /proc/stat directly.
No calculations are made in iostat based on what it reads (other than to
arrive at the percentages.)

Then again, the idle value in /proc/stat may be calculated as you say by
the kernel. Is this what you meant, Randy?
>
> | Add the numbers, then find the percentage the last number (which represents
> | the hundreths of a second the processor has been idle since the last reboot)
> | is of the sum. Unless there's a bug in your copy of iostat, it ought to
> | agree with this quick calculation.
>
> Last number is idle, not uptime.  And times are in jiffies, which
> is 1/100 second on x86, but not on all processors.
>
> So Paul, x86 or sparc or wxyz?
>
Geoff





More information about the PLUG mailing list