Here are the diffs:
- First of all check free space on any filesystem type (not only ext3)
- Then there was a bug on checking port 25 for smtp service
Code: Select all
--- ommaint 2007-03-14 06:06:16.000000000 +0100
+++ ommaint.fixed 2007-07-29 03:48:09.000000000 +0200
@@ -98,24 +98,24 @@
# ACTION: Check Disk Space Utilization
# Notify administrator if disk space utilization on any filesystem >= 80%
#
- df -t ext3 | awk '{if (int($5)>=80) {print $0}}' > $STDOUT
+ df -T | awk '{if (int($5)>=80) {print $0}}' > $STDOUT
if [ -s $STDOUT ]
then
echo "These filesystems have >= 80% disk space utilization:" >> $MAINTLOG
echo "--------------------------------------------------" >> $MAINTLOG
- df -t ext3 | head -1 >> $MAINTLOG
+ df -T | head -1 >> $MAINTLOG
cat $STDOUT >> $MAINTLOG
fi
# ACTION: Check Inode Utilization
# Notify administrator if inode utilization on any filesystem >= 80%
#
- df -i -t ext3 | awk '{if (int($5)>=80) {print $0}}' > $STDOUT
+ df -i -T | awk '{if (int($5)>=80) {print $0}}' > $STDOUT
if [ -s $STDOUT ]
then
echo "These filesystems have >= 80% inode utilization:" >> $MAINTLOG
echo "--------------------------------------------------" >> $MAINTLOG
- df -i -t ext3 | head -1 >> $MAINTLOG
+ df -i -T | head -1 >> $MAINTLOG
cat $STDOUT >> $MAINTLOG
fi
@@ -292,7 +292,7 @@
# Attempt to restart the offending port
#
echo "--Performing Port Check on localhost:25-----" >> $STDOUT
- $PERLSCRIPT 25 >> $STDOUT
+ $PERLSCRIPT $($OMCK -h) 25 >> $STDOUT
if [ $? -eq 1 ]
then
Hope it helps.