#!/bin/bash
cd /root/Diskmonitor
df -h >dskmr.txt
declare -i int=90
while [ $int -le 100 ]
do
K=`cat dskmr.txt|grep "$int"%`
if [ "$K" != "" ];then
# echo $K>>disktmp.txt
echo `date "+%Y%m%d %H:%M ---->> $K"`| mail -s "(IP=192.168.0.11) one of diskspaces more than 90%" x
break
else
int=$int+1
fi
done
阅读(690) | 评论(1) | 转发(0) |