[root@web shell]# cat checkdisk.sh
#!/bin/bash
result=`ssh root@10.10.10.20 -p22 "/bin/bash /app/shell/checkdisk.sh"`
result=${result/\%/}
if [ "$result" -gt "90" ];then
echo "磁盘空间不足";
/usr/bin/python /app/shell/mail.py "磁盘监控报警" "10.10.10.20 数据盘 ${result}%>=90%"
fi
ssh root@10.10.10.20
[root@web_win shell]# cat checkdisk.sh
#!/bin/bash
df -h | grep /dev/vdd | awk '{print $5}'