Hello, Is it required to use the update method in libkstat to gather correct data? Is it possible to just call a specific kstat_read every time I need to access statistics?
I ask this because I am seeing some odd behaviour with a particular monitoring application. The application used is xosview (1.8.3). It's compiled for Solaris 10 SPARC. What is being seen is that after roughly 124 days of uptime xosview starts report erroneous data for cpu usage. Even though the idle time is near 100%, the user and sys times are spiking to 100% utilisation. If I run through the same through perl, it doesn't report the same info. The difference being that the perl script I wrote (can supply on request) calls the update function. After 250 days of uptime the problem doubles. Just to point out here, that nothing (except perl) in the toolkit (primarily dtrace) agrees with this data that is reported by xosview. Even if I run kstat from the shell, I see this as well. The exact line is: kstat -p -m cpu_stat -s 'idle' 1 Now I understand what the update method does (refreshes private kstat data with updated kstat data), but do I really need it? I ask this 2nd question because when running through the perl script sometimes reports 100%+ idle time up to 105% idle time, which is quite unlikely. The machine is a 6900 with a cpu count of 24. If I run the same perl script against a couple of the cpus then it reports back seemingly correct data. The script runs through 2 main loops. The first loop (loop_1) being a simple counter. Inside loop_1 is a loop that prints out statistics for each processor. At the end of loop_1 I call the update function, and then does a "sleep 1;". This reports an idle time in excess of 100 sometimes. Is this a possible bug? Can anyone duplicate this? I can duplicate this on any system with a cpu count of 2 or higher and with an uptime of 124 days or greater running Solaris 10 (sparc). I can provide just about any information, just ask. In summary: Is the update function needed? Does anyone else experience this if they use xosview? Why does calling perl kstat function report back an idle time greater than 100? Does anyone agree that this is a bug perhaps based on the uptime? Thanks, -- Chris Donovan ________________________________________________________________________ In order to protect our email recipients, Betfair Group use SkyScan from MessageLabs to scan all Incoming and Outgoing mail for viruses. ________________________________________________________________________ _______________________________________________ Solaris-Users mailing list Solaris-Users@filibeto.org http://node1.filibeto.org/mailman/listinfo/solaris-users