磁盘空间监控

上一篇 / 下一篇  2009-02-09 22:37:46 / 个人分类:Shell 编程

  • 文件版本: V1.0
  • 开发商: 本站原创
  • 文件来源: 本地
  • 界面语言: 简体中文
  • 授权方式: 免费
  • 运行平台: Win9X/Win2000/WinXP
rm $TMPDIR/mondisk > /dev/null 2>&1
df -ki | sed -e 's/\%//g' | sed -n '/dev/'p |\51Testing软件测试网/xY/sZ{A*a
        awk 'BEGIN{limit1='$1';limit2='$2';}
jG*m:_Q/K-O?#c0        {51Testing软件测试网4R(`+Am~_
                if ( $4>limit1 || $6>limit2 )
9x OC6rS {0                {
A2F9Ld5x'{\wh0                        printf "文件系统:[%s]\t空间使用率:[%s%%]\ti节点使用率:[%s%%]\n",$7,$4,$6;51Testing软件测试网l!a+Tg2D5P1]T
                        system("> $TMPDIR/mondisk")
0aO$k$xe/@ R{%@xR h)O0                }51Testing软件测试网 T$zc{_ YVj
        }'
if [ -f $TMPDIR/mondisk ]
9Ci7N.[ [0A0`0then51Testing软件测试网;x2u%mZB
        exit 20
_z)[u&n{0else51Testing软件测试网:J `:@ hZS [ R
        echo "磁盘空间正常"
p.X ?"h%ix}!b0        exit 0
#v.x:]&I7i[!pwq@0fi

TAG:

feihuhu的个人空间 引用 删除 feihuhu   /   2011-01-11 13:50:39
 

评分:0

我来说两句

Open Toolbar