shell/检测分区使用率是否过高.txt

10 lines
225 B
Plaintext
Raw Normal View History

2024-05-30 20:46:53 +08:00
#!/usr/bin/bash
#
#by fuxiaoshun 4/1
time=`date +%F-%T`
a=`df -h | awk NR==6'{print $5}'`
if [ ${a%\%*} -ge 1 ];then
echo "$time告警/分区使用不足" >>/tmp/1.txt
else
echo "/分区内存足够"
fi