Bart Smaalders wrote:
Louwtjie Burger wrote:
Hi
Yep, I've completed my program to the point that I can sample cpu,
io, memory and some other odd bits from kstat... using perl of course.
I'm having a problem getting some usefull swap information however...
from c there seems to be no problem ... just the kstat version isn't
that usefull.
So, I'm forced to use swap -s to sample the info into perl ... but
it's not a nice solution.
I'm using "Solaris Performance and Tools", together with a healthy
dose of the sourcecode browser ;)
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
[email protected]
You can get useful data from the kstats. Given
two times T1 and T2 (in seconds):
(data[T2] - data[T1])/(T2 - T1) will yield the
average values of data over the interval T1 -> T2.
Note that the summation interval is 1 second (internal
impl. detail).
- Bart
But watch for the case where the value rolls over, and data[T1] >
data[T2]. I ran into that while charting nic bits/sec values from kstats.
-Andy
_______________________________________________
opensolaris-discuss mailing list
[email protected]