Monday, June 30, 2014

Script Check Disk Spaces

Script Check Disk Spaces

#!/bin/bash

# This script is going to check /data if less then 200GB it going to send mail
DATA=`df | awk '/\/data/ {print $4}'`
if test $DATA -le 200000000
then
     df | mail -s "/data on Netfolw server is nearly full" ken.vannakk@gmail.com
fi

No comments:

Post a Comment