刚写了个监控aix 文件系统的shell , 望大家看看,还有什么好的建议,先谢过。
下面的shell ,我再小鸡上是可以通过的:
1: check file 的shell: /tmp/test/test01.sh
#! /bin/ksh
# Function: This shell is to check the file system for monotoring
# Date: Oct 17 2010
# Author:
df -g > checkfile
grep '/dev/hd2' checkfile > ch01
awk '{$print $4}' ch01 > ch02
ch03=ch02
ch04=`cat $ch03`
if [ "$ch04" -ge 50 ]; then
echo "the file system is so bog than explend the file system"
else
echo "okay now, continue to work! ^ - ^"
fi
2
写了个监控的shell ,望指点
本文介绍了作者编写的一个用于监控AIX系统文件系统的Shell脚本,通过df命令检查磁盘使用情况,并设定阈值进行警告。同时,提到了利用crontab定时执行脚本以及对监测结果的可能扩展,如自动删除或移动过期文件。
摘要由CSDN通过智能技术生成