Thursday, March 16, 2006

Cervix Is Low Hard After Period

disk full?

Hi if you have to monitor a server and do not want to constantly look up whether enough space is available yet, could this script for you to be useful. It tests to check compliance of the devices still space in MB is available:
--- snip ---
# / bin / sh
 if ["x $ 2" == "x"] then 
echo "usage: $ 0

" "example: $ 0 \\"
echo exit ^ / dev / sda \\ "50"
a fi
OLD_IFS = $ IFS
IFS = $ '\\ n'
for i in $ ( df-h -e "s/ */ /g" 1
fi

if [$ 2-ge $ j] then
echo "WARNING: disk full on just $ j $ HOST MB left on device $ DEVICE mounted to $ MOUNT POINT!"

fi done IFS = $

OLD_IFS
--- snap ---



Example:
bash ~> diskfull.sh "^ / dev / hda" 100


0 comments:

Post a Comment