Still Need Help with 1 script.....
Hey everyone!! I'm making scripts to help monitor some servers. I've already made two that send me an email if there is too little free disk space and too little free memory.
Here's one of them for disk space:
#!/bin/bash +x
FD=`df | grep hda2 | awk '{print $4}' `
echo $FD
if [ "$FD" -lt 2031088 ]; then
echo "FREE DISK SPACE LOW"
echo $FD | mail -s "WARNING: DISK SPACE LOW" *******@owen.vanderbilt.edu
fi
Now, I need to create one for AVERAGE PROCESSOR USAGE. Any idea how I would do that? Thanks guys!
-George
|