[文章作者:张宴 本文版本:v1.1 最后修改:2007.08.31 转载请注明出处:http://blog.zyan.cc]

  8月3日,我写了“Linux服务器监控系统 ServMon V1.0”,今天,ServMon V1.1 版本亮相。

  ServMon的原理是用shell脚本定时抓取被监控Linux服务器上的信息,再用curl POST到监控机的PHP接口程序上,由PHP接口程序对信息进行分析,如果存在异常,则发送报警邮件给管理员。报警邮件演示页面请见:http://blog.zyan.cc/read.php/276.htm

  点击在新窗口中浏览此图片

  ServMon V1.1 在 1.0 的基础上,增加了对Linux系统负载的监控,并编写了客户端自动安装包:

  1、被监控端服务器(Linux)
  (1)、下载并安装ServMon Client
引用
wget http://blog.zyan.cc/soft/linux/servmon/servmon-1.1.linux.tar.gz
tar zxvf servmon-1.1.linux.tar.gz
cd servmon-1.1
./install -i http://yourdomain/servmon/interface.php password

  注:此处的password为interface.php程序中设置的数据传输验证密码。

  客户端安装包源码:
  │
  ├─install
  ├─[src]
  │  ├─[bin]
  │  │  ├─diskstat_send
  │  │  ├─loadstat_send
  │  │  └─swapstat_send
  │  ├─[cron]
  │  │  └─servmon
  │  └─[data]

  屏幕演示:
  点击在新窗口中浏览此图片




  2、监控端服务器配置(Linux)
  (1)、启动sendmail
  /usr/sbin/sendmail -bd -q30m
  -b:指定Sendmail在后台运行,并且监听端口25的请求。
  -d:指定Sendmail以Daemon方式运行(守护进程)。
  -q:当Sendmail无法将邮件成功地发送到目的地时,它会将邮件保存在队列里。该参数指定邮件在队列里保存的时间。其中的30m表示保留30分钟。

  (2)、修改php.ini的[mail function]部分为以下内容,然后重启Apache,使PHP能够使用mail()函数发送电子邮件
引用
[mail function]
; For Win32 only.
;SMTP = localhost
;smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail -t -i


  (4)、在MySQL上创建一个数据库servmon,然后在该数据库中执行以下SQL语句创建表:
引用
CREATE TABLE `tb_diskstat` (
 `ip` varchar(128) NOT NULL default '',
 `date` int(10) NOT NULL default '0',
 UNIQUE KEY `ip` (`ip`)
) TYPE=MyISAM;

  备注:这张表是PHP接口程序用来记录发送磁盘分区报警邮件的时间,避免在一段时间内重复发送大量报警邮件的。

  (3)、PHP接口程序
  http://yourdomain/servmon/interface.php


Tags:



技术大类 » 其他Unix技术 | 评论(784) | 引用(0) | 阅读(108700)
apsaraofindia Email Homepage
2021-3-3 16:35
I have been looking for this information for quite some times. Will look around your website .   Chandigarh Escort Service
daniellisa Email Homepage
2021-3-8 18:55
QB Diagnostic tool is a great tool that can solve major errors like:1. QuickBooks update error 152702. QuickBooks update error 152233. QuickBooks update error 13284. QuickBooks update error 12007. If you want to know how to <a href="https://qberror.com/quickbooks-installation-diagnostic-tool/" target="_blank">install diagnostic tool for Quickbooks</a> then you can click on the link and learn it all.
steve Email
2021-3-9 14:50
You can use Quickbooks File Doctor if you encounter any errors in your Quickbooks accounting software, network connectivity issues, trouble while accessing company files, and various data damages in Quickbooks.Quickbooks File Doctor
awan Email Homepage
2021-3-10 18:33
Branded Surveys Review: In the market, there are lots of survey websites and companies claiming that they providing surveys and paying money for that. But in the market, there are also frauds and scams in the name of surveys and market research. So in this article, we are going to share about Branded Surveys Review and I will explain each and everything in depth. This is not a paid or affiliate post, I will share most details with transparency and reality about Branded Surveys Reviews.<a href="https://cashogame.com/branded-surveys-review/">click here</a><a href="https://cashogame.com/survey-world-reviews/">click here</a><a href="https://cashogame.com/surveys-that-pay-cash-through-mail/">click here</a>
pawan Email Homepage
2021-3-10 18:34
Branded Surveys Review: In the market, there are lots of survey websites and companies claiming that they providing surveys and paying money for that. But in the market, there are also frauds and scams in the name of surveys and market research. So in this article, we are going to share about Branded Surveys Review and I will explain each and everything in depth. This is not a paid or affiliate post, I will share most details with transparency and reality about Branded Surveys Reviews.<a href="https://cashogame.com/branded-surveys-review/">click here</a><a href="https://cashogame.com/survey-world-reviews/">click here</a><a href="https://cashogame.com/surveys-that-pay-cash-through-mail/">click here</a>
ATT email not working Email Homepage
2021-3-11 16:29
How Am I Supposed to Fix ATT Email Not Working On iPhone?If your ATT email doesn’t work at all on your iPhone device, what you do is close the app where you are accessing and restart it to check whether you’re able to operate it. Then, make sure to check if your ATT mail app is up-to-date. Once the app is updated, your issue of ATT email not working will automatically go away.    Related Blogs - https://www.gethumanhelp.com/aol-mail-login-problems/
mariahayden Email Homepage
2021-3-11 19:14
If you are struggling with yahoo mail sync problem then here are a few tips you can try to fix the problem, firstly check your internet connection it’s strong or not. Then, clear all the cache and cookies and refresh the page. Other than that, check your spam folder to check it your mails are going there but in case nothing works, contact Yahoo Help.https://www.contactyahoo.us/blog/yahoo-mail-not-syncing-on-iphone-mac-android-ipad/
devinsmith0444 Email Homepage
2021-3-18 13:31
This QuickBooks Error Code 6189 is also commonly known as ‘runtime error’. This error code usually arises while the QB Company file opens or runs. Install the QuickBooks Database Manager on the device to neglect the QB errors.If you need immediate support for this error – you can get in touch with our QuickBooks support team by dialing our toll-free number.i.e. +1-844-405-0906.
bookalisharoy Email Homepage
2021-3-18 13:47
Independent Mumbai Escorts service by Alisha Roy at very affordable price. Meet Our Call Girls in Mumbai for Unlimited Enjoyment. These Escorts Girls in Mumbai are really open minded and will satisfy you deeply. contact our Mumbai Escorts Agency today for booking.
ij.start canon Email
2021-3-18 15:18
Ij.start canon is a platform for getting the canon printer driver. You can download the driver easily according to your model as ij.start.canon is designed with the best user-friendly interface. Canon provides an answer for all the types of Canon printers problems by which you can easily figure out how to set up from ij.start canon and improve insight.
canon
2021-3-19 13:05
Canon  is a platform for getting the canon printer driver. You can easily download the driver according to your model as ij start canon is designed with a user-friendly interface. Ij.start canon  |Ij.start.canon
lottie Email
2021-3-19 15:17
Microsoft office is an all-in-one software package that makes calculations, presentations as well as making reports easy. Office.com/setup Home & Student 2019
lottie Email
2021-3-19 15:17
Microsoft office is an all-in-one software package that makes calculations, presentations as well as making reports easy. Office.com/setup Home & Student 2019
lottie Email
2021-3-19 15:18
Microsoft office is an all-in-one software package that makes calculations, presentations as well as making reports easy. Office.com/setup Home & Student 2019
ganga Email Homepage
2021-3-19 18:05
If you feel it’s high time for you to invest in Software but aren’t sure where to start, then we are here to help you. You can browse any Software or service providers on basis of your requirements. Submit your requirement and providers will contact you with their best price offers for your Software. https://www.infobrez.com
neeraj Homepage
2021-3-19 21:59
jacklee Email
2021-3-22 18:22
Hi, I am Jack. We have multiple businesses in Gulf countries. - Creative design centerSaudi catering<a href="https://gulfcryo.com">Kuwait oil company</a>
ij.start canon Email
2021-3-25 17:09
ij.start.canon is a platform for getting the canon printer driver. Canon offers a diverse group of printer categories. Choose the right https //ij.start.canon printer to get the stunning print quality which provides easy-to-use software with improved wireless connectivity. Install http //ij.start.canon printer setup online or a disc to operate your Canon ij printer. Visit ij.start.canon to download printer drivers and start setting up your printer device.
Essay Helper Email Homepage
2021-3-30 19:28
Assignment Help  preparation and submitting assignments and essays before the deadline is a tough nut to crack. It takes extreme dedication. What if, you do not have this much availability? What if, you have planned things that are clashing with your courses? What if, you are regularly getting less grades your courses? If this sounds you fit, then you should probably take Assignment Help Canada Online from GOTOASSIGNMENTHELP service provider.
steve
2021-3-31 20:15
if you want to convert your quicken to QuickBooks hassle free then you should check this blog on converting quicken to quickbooks
分页: 23/40 第一页 上页 18 19 20 21 22 23 24 25 26 27 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]