第一篇:https://blog.youkuaiyun.com/CEVERY/article/details/107672677
脚本完善、监控文件系统磁盘的使用情况进行清理,达到70%,未达到则不清理,直接退出。
补充主要如下:
```powershell
used=`df -h | grep /dev/vda1 | awk '{print $5} | cut -f 1 -d "%"`
echo "-------------------- 1. start exec the shell ----------------------- "
if [ $used -lt 70 ];
then
{
echo "--------- 2. The used of file-system is not arrival to 70% --------- "
exit 8
}
fi
echo "--------- 2. The used of file-system have arrival to 70% --------- "
echo "---------------- The next is to clear and restart ---------------- "
echo "--------- 3. to delete the pid f java is $pid ---------------------"