X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=contrib%2Faix%2Fcheck_crit_dsk;fp=contrib%2Faix%2Fcheck_crit_dsk;h=0000000000000000000000000000000000000000;hb=5b37f0dd4a60cc987ebc38fd7433fb987c6b1771;hp=566e07c1c1b8be83722a80e8a2a722367652039b;hpb=dd3498f6b29544bd772ea4e002bb02710a9000f2;p=nagiosplug.git diff --git a/contrib/aix/check_crit_dsk b/contrib/aix/check_crit_dsk deleted file mode 100644 index 566e07c..0000000 --- a/contrib/aix/check_crit_dsk +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh - -#========================================================================= -# Critical Disk Checker utility -# -# This is the same as the disk checker utility but we use it as -# a seperate service in Nagios to report on partitions that -# have reached 100% capacity. -# -# We have excluded /dev/cd0 because the cdrom drive will always -# report 100% capacity if a CD is in the drive. -# -# Authors: TheRocker -# SpEnTBoY -# -# Email: therocker@pawprints.2y.net -# lonny@abyss.za.org -# -#======================================================================= - -NUMBER=`rsh $1 -l root df -kP | grep -vE ":|/dev/cd0" | grep -E "100%" | tr -s ' '| cut -d' ' -f5 | cut -c1-3 | line` -TMPFILE=/tmp/tmpcrit.hndl -TMPTOO=/tmp/twocrit.hndl - -if [ "$NUMBER" -eq 100 ] -then - - `rsh $1 -l root df -kP |grep -vE ":|/dev/cd0" | grep -E "100%" | tr -s ' '| cut -d' ' -f6,5 >> $TMPFILE` - - LINES=`wc -l /tmp/tmpcrit.hndl | cut -c8` - LINESCTL=`wc -l /tmp/tmpcrit.hndl | cut -c8 ` - echo "Filesystems over 99% --> \c" - -#=============================================================== -# Just a little bit to check for multiple occurances of the -# condition. -#=============================================================== - - while [ $LINESCTL != 0 ] - do - - cat $TMPFILE | tail -$LINESCTL > $TMPTOO - cat $TMPTOO > $TMPFILE - LINESCTL=$(( $LINESCTL -1 )) - LINES=$(( $LINES -1 )) - DATA=`head -1 /tmp/tmpcrit.hndl` - echo "( $DATA ) \c" - - - done - echo "\n" - -#=============================================================== -# File clean up. Always pick up after yourself. Disk space -# doesn't grow on trees you know. -#=============================================================== - - rm -f $TMPFILE - rm -f $TMPTOO - exit 2 - -else - - echo "No Filesystems over 99%... OK" - exit 0 -fi