The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-06-2006
venishjoe venishjoe is offline
Registered User
 

Join Date: Mar 2006
Posts: 1
Compare output from awk to a value

I need to write a shell script which checks the CPU utilization is above 90% for a particular process.

So far I have done this

prstat 0 1 | grep weblogic | awk '{print $9}'

This give an output like this

0.1%
0.0%
0.0%
0.0%
0.0%


Now I need to assign this to an array and check if the value exceeds 90%.
If so then I should print an alert message in the script.

Please help me to do the same.

Thanks
Joe
Reply With Quote
Remove advertisements
!!
Forum Sponsor