Operating System - HP-UX
1832299 Members
1988 Online
110041 Solutions
New Discussion

vmstat - idle WAY over 100

 
SOLVED
Go to solution
Dan Phelps_1
New Member

vmstat - idle WAY over 100

I have several HP-UX 11.11 machines. On at least one of them, when I do vmstat 1 10, I occasionally get an idle time that's way over 100.

For example:

3 0 0 15544 23364 109 60 0 0 0 0 0 108 1955 53 3 6 91
3 0 0 15544 23364 89 25 0 0 0 0 0 100 1731 39 2 1 97
3 0 0 15544 22884 71 20 0 0 0 0 0 101 1456 35 0 0 100
3 0 0 15544 22884 56 16 0 0 0 0 0 102 1240 31 0 0 100
3 0 0 15544 22884 45 12 0 0 0 0 0 103 1035 29 0 0 100
3 0 0 15544 22884 36 9 0 0 0 0 0 107 873 28 0 0 100
3 0 0 15544 22884 29 7 0 0 0 0 0 108 747 27 0 0 100
3 0 0 15544 22884 23 5 0 0 0 0 0 108 651 26 6 11 83
3 0 0 15544 22665 83 34 0 0 0 0 0 109 1777 47 38 63 18446744073709552000
3 0 0 15544 22561 304 188 0 0 0 0 0 101 4901 116 38 63 18446744073709552000

I already have PHCO_25979 installed. (That patch supposedly addressed what seems to be this issue back in 2003.)

Any ideas? This is throwing a script I have to monitor CPU time way off. My script loops through the 10 idle times reported, adds them together, divides by 10 to get the average, then subtracts the result from 100 to get CPU busy time.

Needless to say, when this issue arises, the CPU busy time shows as a rather large (?) negative number, such as "-3689348814741910377.10" :)

Thanks!
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: vmstat - idle WAY over 100

Shalom,

I'd say first check the system for bi-annual patches. This kind of stuff comes up from time to time. Also maybe search the patch database for something specific to sm-stat.

Search the patch for a supersede. Sometimes new patches break old ones.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Hein van den Heuvel
Honored Contributor
Solution

Re: vmstat - idle WAY over 100

Looking at the data, when there is a crazy number it should be 0.

Interstingly enough, at that time, usr+sys ads up to 101... leaving -1% idle :-).

So in the mean time, since you are parsing the data anyway, two suggestions

1) When you see a number larger than 100, replace by 0

2) Instead of idle use 100 - sys - usr and make 0 when under 0.

Hein.

Dan Phelps_1
New Member

Re: vmstat - idle WAY over 100

Thanks for the reply, Hein.

I'd forgotten about the other fields (system and user). Since those together do add up to more than 100, that might just explain why idle is so far out of whack!

I've taken your suggestion and added a step to check if idle is over 100. If it is, it sets it to 0.

I think I've actually seen this happen on an older Linux box, too, so I may just put the routine in there, too.