检测磁盘分区使用率
#!/bin/bash
used=`df -h | grep /dev/mapper/centos-root | awk '{print $5}' | cut -d% -f1`
if [ $used -ge 5 ]; then
echo "root分区的使用率告警,请尽快处理"
else
echo "root分区使用率在正常范围之内"
fi
shell脚本之判断分区使用率告警
最新推荐文章于 2023-06-07 10:35:05 发布
检测磁盘分区使用率
#!/bin/bash
used=`df -h | grep /dev/mapper/centos-root | awk '{print $5}' | cut -d% -f1`
if [ $used -ge 5 ]; then
echo "root分区的使用率告警,请尽快处理"
else
echo "root分区使用率在正常范围之内"
fi