位置: 编程技术 - 正文

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

  • 旅游业成本交税会计分录怎么做
  • 消费税征收范围包括
  • 必要收益率的取值可以是
  • 事业单位的会计制度是什么
  • 税务筹划的12种方法知乎
  • 税控盘抵扣增值税有时间限制吗
  • 个体生产经营所得税税率表
  • 企业固定资产折旧当月增加当月计提吗
  • 设备安装行业前景
  • 建筑工程公司是什么意思
  • 企业自建房屋建几层合适
  • 企业支付的工伤费用怎么入账
  • 食品发票可以抵扣所得税吗
  • 单位给员工上的商业险是什么
  • 营改增后加工行业的税率是多少?
  • 开发票税收分类编码怎么选
  • 在外地的分公司可以独立核算开发票吗
  • 对方公司开支票怎么办
  • 原材料明细账目
  • 税务局减免的税金会计分录
  • 城镇土地使用税税率
  • php utf8转unicode
  • win7的本地连接在哪
  • 住房公积金会扣税吗
  • 广告制作公司成本核算包含哪些
  • php语句和php变量都是区分大小写的
  • mxnet github
  • php和aspnet哪个好
  • element ui el-tree
  • laravel elementui
  • php扫二维码
  • php getcwd与dirname(__FILE__)区别详解
  • sqlserver怎么用
  • 货物不符合质量条款规定
  • 理财产品怎么收费
  • 个体工商户个税多久申报一次
  • 发票开具与小票的关系是怎样的?
  • 初级会计实务重点内容
  • 库存商品过期变成废品
  • 职工福利基金提取流程
  • 收到销货方的返款分录
  • 网银费用及回单怎么查
  • 超过社保基数的工资怎么发放
  • 新办企业在建期间账务处理
  • 单位经办人给员工发工资
  • 如何证明自己是中国人
  • sum(case when then)(判断男女生的个数)
  • mysql必知必会读书心得
  • windows隐藏
  • centos怎么执行脚本
  • win7 win8.1双系统安装教程
  • vc_mbcsmfc.exe是什么
  • grep正则表达式运用举例
  • windows安装mq
  • win10预览设置
  • linux系统默认启动级别
  • glrotatef函数
  • 页里面 CDATA的作用说明
  • How to embed a jframe in an eclipse view
  • [置顶]游戏名 TentacleLocker
  • android PercentRelativeLayout 支持百分比来设置控件的宽高
  • java list和array list区别
  • android网络请求时怎么取消
  • easyui combobox设置值
  • unity3d创建模型
  • js创建对象的三种方式
  • unity uma
  • jQuery tagsinput在h5邮件客户端中应用详解
  • node搭建项目
  • 三分钟带你玩转灭火器
  • python中的urllib
  • javascript实现2016新年版日历
  • 欢迎使用本公司智能语音电动车
  • javascript编程技术
  • 税控盘忘记抄报罚多少
  • 社保在哪里缴费
  • 2023年印花税税目表
  • 办理跨区域事项报验
  • 省税务局属于什么级别
  • 税收分类编码1080499
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设