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 -->
  #2 (permalink)  
Old 03-06-2006
blowtorch's Avatar
blowtorch blowtorch is offline
Supporter
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,332
Try running this:
Code:
prstat 0 1 | grep weblogic | awk '{print $9}' | while read line;
do
if [ ${line%%\%} -gt 90 ]; then
        # send alert here!
fi
done
Note, this will not work if the % value is something like 90.7%. It has to be 91 or more.
Reply With Quote