sysstat.sh
#! /bin/shexport LC_ALL=zh_CN.UTF-8cd /bin2/sh sysstat-daily.sh > sysstat-daily.sh.log 2>&1mutt -s "scm11-scm12 sysstat-daily" scm-svr-mtr@scm5.***.cn < sysstat-daily.sh.log
sysstat-daily.sh
#! /bin/sh echo .echo "***10.12.5.10 阵列情况...***"/usr/sbin/hpacucli ctrl all show status/usr/sbin/hpacucli ctrl all show configecho .echo "***10.12.5.43 阵列情况...***"echo RAID Mode, eg. stripe mirror etcsnmpwalk -v 2c -c SinoHBMi 10.12.5.43 .1.3.6.1.4.1.7933.1.1.1.9.1.6echo Disk Media Patrol Loop Count Informationsnmpwalk -v 2c -c SinoHBMi 10.12.5.43 .1.3.6.1.4.1.7933.1.1.1.6.1.19 | grep "INTEGER" | awk '{if($NF!="0") print $0 "error"; else print "ok"}'echo Disk Media Patrol Err Count Informationsnmpwalk -v 2c -c SinoHBMi 10.12.5.43 .1.3.6.1.4.1.7933.1.1.1.6.1.20 | grep "INTEGER" | awk '{if($NF!="0") print $0 "error"; else print "ok"}'#echo .#echo "***10.12.22.19数据库情况...***"#mysqlcheck extmail#echo .#echo "***172.16.40.216硬盘情况...***"#ssh root@172.16.40.216 "/usr/sbin/smartctl -H /dev/sda" |awk 'NR<6 {print $0}'#ssh root@172.16.40.216 "/usr/sbin/smartctl -H /dev/sdb" |awk 'NR<6 {print $0}'#ssh root@172.16.40.216 "/usr/sbin/smartctl -H /dev/hda" |awk 'NR<6 {print $0}'