位置: 编程技术 - 正文

用Monit监测Linux 服务器(linux测试软件)

编辑:rootadmin
monit用 Monit 监测 linux 服务器 Monit 是一个用来监测系统状态的工具,不但可以用来监视进程、服务、文件、目录、文件系统,还可以在服务 down 掉的时候自动重启服务或者当某个进程占用过多的资源的时候自动停掉进程,并且支持 Email 报警功能、远程服务器监测、web 管理界面等,功能很多很强大。VPSee 用 monit 来监测多个 VPS 和独立服务器,如果某个 VPS down 了、某个服务器资源紧张,就能第一时间知道,而且某个服务停了的话可以自动重启服务。 安装 monit 在 CentOS 下安装和配置文件: 复制代码代码如下: # wget # rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i.rpm # yum install monit # vi /etc/monit.conf 配置 monit 修改 monit 的配置文件,/etc/monit.conf(CentOS)或者 /etc/monit/monitrc(Debian),每隔秒检查一次系统,如果 httpd/mysql/sshd 服务停掉了就重新启动相应服务。对于 httpd 服务器,当发现 CPU/MEM 占用过大、loadavg 太高时就执行相应的报警、重启服务指令。如果使用 Email 报警功能,需要配置 Email 地址、邮件服务器等信息: 复制代码代码如下: set daemon check process sshd with pidfile /var/run/sshd.pid start program “/etc/init.d/sshd start” stop program “/etc/init.d/sshd stop” if failed port protocol ssh then restart if 5 restarts within 5 cycles then timeout check process mysql with pidfile /var/run/mysqld/mysqld.pid group database start program = “/etc/init.d/mysqld start” stop program = “/etc/init.d/mysqld stop” if failed host .0.0.1 port then restart if 5 restarts within 5 cycles then timeout check process nginx with pidfile /var/run/nginx.pid start program = “/etc/init.d/nginx start” stop program = “/etc/init.d/nginx stop” if failed host www.yanghengfei.com port protocol http then restart check process php_cgi with pidfile /var/run/php_cgi.pid start program = “/etc/init.d/php_cgi start” stop program = “/etc/init.d/php_cgi stop” if failed host .0.0.1 port then restart if 5 restarts within 5 cycles then timeout check process apache with pidfile /var/run/httpd.pid group www start program = “/etc/init.d/httpd start” stop program = “/etc/init.d/httpd stop” if failed host www.yanghengfei.com port protocol http then restart if cpu is greater than % for 2 cycles then alert if cpu > % for 5 cycles then restart if totalmem > MB for 5 cycles then restart if children > then restart if loadavg(5min) greater than for 8 cycles then stop if 3 restarts within 5 cycles then timeout 更多详细信息可以参考配置文件,里面注释写得很详细。 启动 monit 在 CentOS 下启动并加入到系统启动脚本: 复制代码代码如下: # /etc/init.d/monit start # /sbin/chkconfig monit on

推荐整理分享用Monit监测Linux 服务器(linux测试软件),希望有所帮助,仅作参考,欢迎阅读内容。

用Monit监测Linux 服务器(linux测试软件)

文章相关热门搜索词:linux监控工具nmon,linux monitor,linux测试软件,linux monitor,linux检测,linux性能监控工具nmon,linux monitor,linux系统监测软件,内容如对您有帮助,希望把文章链接给更多的朋友!

Linux Top 命令解析 比较详细 TOP是一个动态显示过程,即可以通过用户按键来不断刷新当前状态.如果在前台执行该命令,它将独占前台,直到用户终止该程序为止.比较准确的说,top命令

Linux 内存机制详解宝典 一.我们先来查看一个内存使用的例子:[oracle@db1~]$free-mtotalusedfreesharedbufferscachedMem:-/+buffers/cache:Swap:上述结果显示了

Linux 性能监控分析 敲个命令都没反应。TOP命令显示的是一些Oraclesession占用CPU资源太多。杯具的是在服务器上连sqlplus都进不去了,命令都没反应。只好把服务器重启了。重

标签: linux测试软件

本文链接地址:https://www.jiuchutong.com/biancheng/364914.html 转载请保留说明!

上一篇:Linux开启snmp监控后大量 Received SNMP packet(s) from UDP 的解决方法(linux 开启snmp)

下一篇:Linux Top 命令解析 比较详细(linux中的top命令)

  • 增值税专用发票抵扣期限
  • 印花税不足1元需要缴纳吗
  • 国税税务登记号查询
  • 不开票收入要交所得税吗
  • 以前年度损益调整科目怎么用
  • 网上商城的主要功能以及购物流程
  • 企业所得税发票税前扣除异常
  • 盈利就是净利润吗
  • 税控盘必须一直插着吗
  • 融资租入固定资产的入账价值
  • 有进项发票还用交税
  • 以前年度费用调减
  • 房地产企业土地使用税
  • 增值税如何减税
  • 企业所得税税收优惠政策
  • 投资损失怎么进行季度所得税申报
  • 对方电子承兑发出多长时间可以到账
  • 企业收回报废产品合法吗
  • 增值税红字发票怎么做账
  • 公司租车费用会计分录
  • 税务申报没报上怎么办
  • 纳税申报表未开票收入可以填负数吗
  • 滴滴行程单修改后是否能查
  • 发票代码和发票号码在一起怎么办
  • 销售货物收入与租金收入的纳税区别
  • 基金管理人收取回扣
  • 冲减多计提的费用
  • 开具房租发票备注多少
  • 工资薪金支出的扣除标准
  • 华为应用市场被锁了,怎么解除密码
  • 苹果macbook 系统
  • 出租房屋收取的水电费的税率
  • msp 什么意思
  • Otter Cliffs, Acadia National Park, Maine (© dbimages/Alamy)
  • 将款项汇往外地采购专用账户会计分录
  • 应付债券利息费用
  • php统计字符串长度
  • framework core
  • 不抵扣的进项税怎么做账
  • wordpress neve
  • php会员系统
  • 小微企业减免额怎么计算
  • 投稿网址打不开
  • 保证增信行通俗理解
  • 固定什么意思
  • 企业付的房租税费会计分录
  • 留抵增值税怎么填列
  • 低值易耗品费用记在什么费用
  • 工程未完工开了发票怎么做账
  • 小企业如何进行内部创新
  • 应收账款多久收不回来作为坏账
  • 待抵扣进项税额什么意思
  • 销售暂估业务处理
  • 货物出去没有出口报关可以补吗
  • 出租土地使用权计入什么科目
  • 库存现金的主要内容有哪些
  • 换工作时社保公积金怎么办
  • mysql数据库中文
  • xp系统怎么用u盘启动电脑
  • 控制windows外观和工作方式
  • windowsserver2008r2密码重置
  • windows7开机
  • win8.1怎么设置自动关机
  • win8.1技巧
  • windows10周年纪念版
  • xp取消开机启动项
  • win10系统的pin码
  • android 坐标系
  • surface游戏模式
  • linux常用的网络命令
  • unityz
  • javascript常用类型
  • 如何检查自己是否抑郁
  • 将字符串小写转换成大写
  • js 模态对话框和对话框
  • 批处理模式
  • 河北省国家税务局电子税务局
  • 吉林省残疾人保障金减免政策
  • 小规模纳税人开3%专票怎么交税
  • 国税开票系统怎么增行
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设