I have a script that checks file system growth and works fine. I want to put the variables in the script in a seperate file though so that Operations can add and delete the File Systems we monitor from the script. Anyone got any suggestions on how I would go about accomplishing this?
#! /usr/bin/ksh
/etc/profile
. /.profile
EXCLUDE1=spfcw
EXCLUDE2=pdb
EXCLUDE3=f5
EXCLUDE4=f6
EXCLUDE5=f7
EXCLUDE6=sp34cw:/dev/dbfs1
EXCLUDE7=sp22cw:/dev/u04
EXCLUDE8=sp22cw:/dev/u05
EXCLUDE9=sp22cw:/dev/u08
/usr/lpp/ssp/bin/dsh df -k|grep /dev|grep 9[7-9]%|grep -v "$EXCLUDE1"|grep -v "$
EXCLUDE2"|grep -v "$EXCLUDE3"|grep -v "$EXCLUDE4"|grep -v "$EXCLUDE5"|grep -v "$
EXCLUDE6"|grep -v "$EXCLUDE7"|grep -v "$EXCLUDE8"|grep -v "$EXCLUDE9" >> /tmp/fs
file.txt
if [ -s /tmp/fsfile.txt ]
then
mail -s "SP Filesystems Over 95% Full" mickey_r_mouse@disney.com < /tmp/fsfile.
txt
fi
#! /usr/bin/ksh
/etc/profile
. /.profile
EXCLUDE1=spfcw
EXCLUDE2=pdb
EXCLUDE3=f5
EXCLUDE4=f6
EXCLUDE5=f7
EXCLUDE6=sp34cw:/dev/dbfs1
EXCLUDE7=sp22cw:/dev/u04
EXCLUDE8=sp22cw:/dev/u05
EXCLUDE9=sp22cw:/dev/u08
/usr/lpp/ssp/bin/dsh df -k|grep /dev|grep 9[7-9]%|grep -v "$EXCLUDE1"|grep -v "$
EXCLUDE2"|grep -v "$EXCLUDE3"|grep -v "$EXCLUDE4"|grep -v "$EXCLUDE5"|grep -v "$
EXCLUDE6"|grep -v "$EXCLUDE7"|grep -v "$EXCLUDE8"|grep -v "$EXCLUDE9" >> /tmp/fs
file.txt
if [ -s /tmp/fsfile.txt ]
then
mail -s "SP Filesystems Over 95% Full" mickey_r_mouse@disney.com < /tmp/fsfile.
txt
fi