|
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
|