插件脚本
#!/bin/bash
f=`free -m | awk ''NR==2{print $4}'`
b=`free -m | awk ''NR==2{print $6}'`
c=`free -m | awk ''NR==2{print $7}'`
total=$(($f+$b+$c))
if [ $total -ge 400 ];then
echo "me wen ti"
exit 0;
elif [ $total -lt 400 ] && [ $total -gt 100 ];then
echo "warning"
exit 1;
else
echo "err nei cun bu zu"
exit 2
fi