[PLUG] high %idle

Randy.Dunlap rddunlap at osdl.org
Wed Apr 24 18:01:47 UTC 2002


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?

| Nope. Never used iostat on Linux. (However, a search on Freshmeat shows
| it is part of the sysstat package, which is currently at release level
| 4.0.4.)
| >
| >   [heinlein]$ iostat
| >   Linux 2.2.19-7.0.16enterprise (<hostname>) 04/23/02
| >
| >   avg-cpu:  %user   %nice    %sys   %idle
| >             25.87    0.00   13.00  890.23
| >
| > 890% idle time?
| >
| > It's wierd, top shows no CPU-hungry processes, but the load average is
| > now nearly 40.00 and rising.
|
| Odd, indeed.
|
| I took a look at the source code for iostat, & it reads /proc/stat in a
| very straightforward manner. (If I can understand the source code with my
| little C, then it has to be simple.) On my computer the relevant line from
| /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.


| 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?

-- 
~Randy





More information about the PLUG mailing list