#!/bin/sh # @(#) fscheck - Revision 1.5 - 02/26/97 # # ============================================================================= # Andrea Whitlock, Mobius Software Services # whitlock@mobius-soft.com # # Bug reports, questions, and suggestions should be emailed to: # mobius@mobius-soft.com # # This software is provided under the terms of the GNU copyleft # (ftp://prep.ai.mit.edu/pub/gnu/COPYING-2.0), without a warranty # of any kind. Use at your own risk. # ============================================================================= # # configure me ################################################################ # # the df output needs to look like: # field field ... field capacity% filesystemmountpoint # hpux #DF=bdf # linux DF=df # solaris DF="df -tk" # # configure me end ############################################################ fWriteMessageLog() { #echo "Updating message log ... \c" mlogwrite "$1" "$2" #echo "done." } umask 000 threshold=90 $DF | tail +2 | awk '{ print substr($(NF-1),1,length($(NF-1))-1), $NF }' | \ while read capacity filesystem do if echo "$capacity" | grep ":" > /dev/null 2>&1 then continue # skip nfs mounts fi if [ $capacity -ge $threshold ] then echo "$filesystem at ${capacity}%" fWriteMessageLog "filesystem" "$filesystem at ${capacity}%." fi done