摘要: shell 监控cpu,memory,load average,记录到log,当负载压力时,发电邮通知管理员。原理:1.获取cpu,memory,load average的数值2.判断数值是否超过自定义的范围,例如(CPU>90%,Memory2)3.如数值超过范围,发送电邮通知管理员。发送有时间间隔,每小时只会发送一次。4.将数值写入log。5.设置crontab 每30秒运行一次。ServerMonitor.sh#!/bin/bash# 系统监控,记录cpu、memory、load average,当超过规定数值时发电邮通知管理员# *** config start ***# 当前目 阅读全文
posted @ 2014-04-13 15:38 傲雪星枫 阅读(759) 评论(0) 推荐(0) 编辑