Question about rstat()
Troy Taylor - Network Dude
troyt at Autodesk.COM
Sat May 25 04:11:11 AEST 1991
I'm trying put together a small utility that will check cpu
status of remote Sun servers. It seems like the rstat() utility
will do the job, except I'm not too sure how to interpret the info...
Here's a sample output from a rstat() call to a Sun 4/490 running 4.1;
cp_time_0 51130
cp_time_1 1412
cp_time_2 48213
cp_time_3 573995
dk_xfer_0 14656
dk_xfer_1 29071
dk_xfer_2 0
dk_xfer_3 0
v_pgpgin 12406
v_pgpgout 2397
v_pswpin 0
v_pswpout 8
v_intr 197020
if_ipackets 99010
if_ierrors 34
if_opackets 55593
if_oerrors 0
if_collisions 76
v_swtch 294918
boottime.tv_sec 675094263
boottime.tv_usec 580000
curtime.tv_sec 675107758
curtime.tv_usec 590009
avenrun_0 94
avenrun_1 33
avenrun_2 4
Now what?? Seems like the data is coming out ok. I get changing values for
each call, but I'm just not too sure how to get a percentage of CPU used
using the data given...
Any ideas??
--
---------------------------------------------------------------------------
Troy R. Taylor troyt at Autodesk.com
or
{fernwood,apple,decwrl,uunet}!autodesk!troyt
More information about the Comp.unix.programmer
mailing list