If you want to print the percentage of non-idle CPU:

CPU=$((100 - $(vmstat | tail -1 | awk '{print $15}'))); echo $CPU

(assuming your vmstat produces the same output as mine).

Combine that with hcp IND to get CPU usage for the VM system, and
you're probably in business.  Just decide of what combination of
guest and host CPU triggers your warning and error conditions, and
you have what you need to write a Nagios check script.

Adam

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to