#!/bin/bash #This script checks the disk usage of the RAID # drive by executing a df command. #If the used number of blocks is greater than the # user defined high water mark, # Then remove the oldest file in each instrument's directory # continuing until below the user's high water mark. # Else log the current disk usage # #David Welsh #May 2, 2005 echo " Start CheckRaidDiskUsage.bash `date`" export JAVA_HOME=/usr/local/java export CLASSPATH=/home/dataman/Java #Set the execution path export PATH=$HOME/bin:/usr/local/bin:$JAVA_HOME/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin #call the Java program HighWater with # 1) How full to let the RAID disk get at decimil fraction # 2) The number of USED disk blocks # 3) The number of AVAILABLE disk block java HighWater .80 `df -k /data | grep dev | awk '{print $3,$4}'` echo " Stop CheckRaidDiskUsage.bash `date`"