Cover V04, I06
Article
Figure 1
Figure 2
Figure 3
Listing 1
Listing 10
Listing 2
Listing 3
Listing 4
Listing 5
Listing 6
Listing 7
Listing 8
Listing 9

nov95.tar


Listing 4: check_filesystem_limit.ksh--Called from by dskmon.ksh

#!/bin/ksh
#===============================================
# "@(#)check_filesystem_limit.ksh"
#
# Usage : check_filesystem_limit.ksh \
#              mount_point file1 ...
#
# This script returns the (high or low) limit set for
# that filesystem. Returns nothing if no limit is
# set. The file contains the filesystem name
# followed by the low limit and the high limit.
#
# Author :
#	Ravindra Nemlekar
#==============================================

if [ $# -lt 3 ] ; then
echo "Usage: $0  LOW|HIGH mount_point \
file_from_which_to_be_checked"
exit 1
fi

# Check for lower limit else it's the high file limit
if [ "LOW" = "$1" ] ; then
mount_point=$2
shift 2
awk ' $1 == FILE_SYS { value = $2 ; exit 0  }
END	         { if (value != 0)
print value } ' \
FILE_SYS=$mount_point $*
else
mount_point=$2
shift 2
awk ' $1 == FILE_SYS { value = $3 ; exit 0  }
END	         { if (value != 0)
print value } '  \
FILE_SYS=$mount_point $*
fi
# End of File