位置: 编程技术 - 正文

用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命令)

  • 支票盖财务章盖在哪里
  • 年初的进项税额计算公式
  • 业务往来说明范本
  • 旅游的合同
  • 公司注销前的发言怎么写
  • 专项土地补偿款怎么入账?
  • 营业外支出税前扣除比例是多少
  • 房地产企业如何计算增值税
  • 技术先进型企业认定
  • 往来科目明细表
  • 一次性收取跨年租金房产税怎么交
  • 公益捐赠税前扣除政策
  • 预提厂房租金
  • 企业购买理财产品的会计分录
  • 收购免税农产品的进项税可以抵扣吗
  • 如何解决电脑无法定位程序输入点
  • 苹果电脑如何提高网速
  • 如何取消开始菜单的程序
  • win11开机黑屏进不去桌面
  • 其他暂收应付款项有哪些
  • auepuc.exe是什么软件
  • 默认网关不可用的解决办法
  • 空调安装还要收费
  • 简单谈谈php中的安全性
  • 城市维护建设税减免税优惠政策
  • 逻辑回归模型
  • 增值税直接减征的情形
  • 汽车以旧换新怎么操作
  • 本地住宿费能报销吗
  • 以前年度收入少计如何做帐
  • 什么是预付账款的管理重点
  • 非正常损失的原材料进项税额可以抵扣吗
  • 发票认证系统叫什么名字
  • js数组entries
  • phpcms api
  • 商场收取租金如何入账
  • 应付账款尾差如何处理
  • 个人独资企业计提的各种准备金支出不得扣除
  • 工资以现金形式发放英文
  • mongodb的语句
  • 个人所得税专项附加扣除标准一览表
  • 公司购买办公用品会计分录
  • 利润分配未分配利润在报表里怎么体现
  • 房租费用能计入什么科目
  • 跨区域缴纳个税相关规定
  • 收到销售方负数发票可以次月入账吗
  • 外币汇兑会计分录
  • 所得税预缴多了可以不退税嘛
  • 帮对方代垫运费计入什么科目
  • 专利年费可以减免吗
  • 资产负债率比率
  • 内帐外帐的区别与联系
  • 会计账簿的启用与登记实验报告
  • mysql5.7.
  • mysql sql 基础教程
  • bios如何关闭网卡
  • xp剪贴板怎么打开
  • 远程查看微信聊天记录软件
  • win7开机taskeng
  • win8应用商店废了
  • 微软正式推送windows11
  • 系统死锁或资源管理器崩溃时让xp系统自动重启的方法
  • Ubuntu操作系统安装步骤
  • win7界面比win10好看
  • shstart.exe - shstart是什么进程 有什么用
  • windows批处理命令脚本
  • js html css
  • javascript基础笔记
  • jquery如何实现双向绑定
  • pygame如何加载图片
  • python的for函数
  • 广东省国家税务总局官网
  • 国家税务局申报系统操作步骤说明在哪里看
  • 卷式发票如何查验真伪
  • 广东国家税务局网上税务服务大厅
  • 下岗的党员需要交党费吗
  • 出口退税的企业货币要回国内吗
  • 个人所得税法全文完整版2021实施细则
  • 企业演讲稿 英文
  • 普惠性税收优惠政策例子
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设