Checking CPU Utilization - Take2

jeff vier jeff.vier at tradingtechnologies.com
Tue Jan 20 17:22:19 CET 2004


     1. On Tue, 2004-01-20 at 09:40, Mark Reis wrote:
> I've been experimenting with iostat and I just realized that it has one
> major drawback. When you run iostat once under solaris and linux, it only
> reports the cpu % average for the entire time the system has been powered
> up. The same goes for vmstat.
> 
> Any other suggestions of a utility that will run once then return the cpu
> status and quit?

Why not just come up with a load that you consider 'high' and math it
out?

If a load of 5 is 'maxed', make that your '100%' or something (ugly code
to follow):

 echo "`uptime | awk '{print $10}' | tr -d ,` * 4 " | bc -l

> Here is an example of how load is not helpful for my problem. The dnetc
> client is using all of the cpu cycles and as you can see the load is very
> low.
> last pid:   684;  load averages:  1.09,  1.03,  0.89              10:37:48
>    472 root       2   0   19 2416K 1880K run     27:53 97.18% dnetc

It's also nice 19.  It's not going to 'hurt' any programs that start up.



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list