设备监控与告警设备监控告警设计与开发采用IMB的MQ服务器(WebsphereMQ),进行设计开发。服务器的建立属于工程维护,或者说是服务器运行的工作组进行配置,开发人员,对此是透明的,只要基本设计参数就行了。脚本运行;IBM服务器AIX运行的是Unix系统,那么使用的脚本自然就是用SHELL命令编写的。:#!/bin/bash#editorqiuzhiwei#date140520cur_PERCENT_log1=`df-k|grep"/dev/hd1"|grep"home"|awk'{print$4}'|cut-f1-d%`cur_PERCENT_app1=`df-k|grep"/dev/hd12app"|awk'{print$4}'|cut-f1-d%`cur_PERCENT_log2=`******@-k|grep"/dev/hd1"|grep"home"|awk'{print$4}'|cut-f1-d%`cur_PERCENT_app2=`******@-k|grep"/dev/hd12app"|awk'{print$4}'|cut-f1-d%`cur_PERCENT_flowdata=`df-k|grep"/flowdata"|awk'{print$4}'|cut-f1-d%`if[$cur_PERCENT_log1]&&[$cur_PERCENT_log1-ge80];thenecho"APPServer1服务器日志目录使用率超过80%!"fiif[$cur_PERCENT_app1]&&[$cur_PERCENT_app1-ge80];thenecho"APPServer1服务器应用目录使用率超过80%!"fiif[$cur_PERCENT_log1]&&[$cur_PERCENT_log2-ge80];thenecho"APPServer2服务器日志目录使用率超过80%!"fiif[$cur_PERCENT_app2]&&[$cur_PERCENT_app2-ge80];thenecho"APPServer2服务器应用目录使用率超过80%!"fiif[$cur_PERCENT_flowdata]&&[$cur_PERCENT_flowdata-ge80];thenecho"APPServer服务器附件及缓存目录使用率超过80%!"fi数据封装Java程序,执行脚本的完整程序。关键的方法:(filePath);lassScriptJob{ //执行脚本通用方法 publicvoidactionScript(StringfileName,Stringtag){ try{ //执行脚本 Processpro=().exec(fileName); Stringret=((),"UTF-8"); if(ret!=null){ MqProcessBOmq=(MqProcessBO)("MqProcessBO");
设备监控与告警 来自淘豆网www.taodocs.com转载请标明出处.