CPUSTAT
Hey guys,
I am stuck here. I try to give cpustat and and it asks me to give more options like
Usage:
cpustat [-c events] [-nhD] [interval [count]]
-c events specify processor events to be monitored
-nsuppress titles
-tinclude %tick register
-Denable debug mode
-hprint extended usage information
Use cputrack(1) to monitor per-process statistics.
I dont have a idea what other options i need to give (like what is events, etc). Can someone help...? :(
Jackie
[532 byte] By [
Jackie] at [2007-11-26 10:12:42]

# 3
Well, it appears to be trying to run a program called sysstat.
But there isnt a program of that name on solaris.
There is a general package named sysstat which contains programs like iostat.
But even that package doesnt include a program named sysstat.
So in short I don't know what is trying to do.
I can make a guess that its trying the find the percentage of CPU used at the moment.
This comes fairly close
cpustat=`/usr/local/bin/sudo rsh -n <server name> vmstat 1 2 | tail -1 | awk '{print $20 +$21}' `
# 4
Thank you for the quick response. It is great feeling that someone wants to share his knowledge here.
After seeing your code, i tried a few tricks and it got it fine. I actually did get the CPU % used.
One more issue
When i use the mailx option from a server, i get a mail in my mail client in my own name. Is it b'cos i have logged into the server using my login ID and then su into root. Or is it taking something else.
Which takes precedence? Login ID or Root?
Jackie