[文章作者:张宴 本文版本: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技术 | 评论(1135) | 引用(0) | 阅读(180528)
ij.start canon Email
2021-9-4 15:57
Canon support site ij.start canon is the best place to find the latest Canon printer drivers and software for each Canon printer product. ij.start.canon is the canon help site to let you download and set up your Canon printer completely.
mehakbhatt34 Email Homepage
2021-9-9 20:46
Welcome to Mehak bhatt Delhi Escorts Agency the lone name in the tip Top Escort Service in Delhi circle thatif you want to enjoy your holiday with fantastic model then contact me. Escorts In BangaloreAerocity Escort Service Gurgaon Escorts service[url=https://mehakbhatt.com/escorts-in-rajouri-garden]Rajouri Garden Escorts Se
Sofia Mil Email Homepage
2021-9-11 16:06
https://cloufan.com/read-blog/7688https://postheaven.net/lg0acxt79vhttps://mel.fm/blog/bhumi-singh/89027-why-choose-an-independent-sangrur-escorthttps://worldunity.tk/read-blog/2351https://sofiamil.substack.com/p/why-choose-an-independent-sangrur?r=rgg9l&utm_campaign=post&utm_medium=web&utm_source=copyhttps://m.mydigoo.com/forums-topicdetail-328081.htmlhttps://www.tumblr.com/blog/view/suratescortshttps://suratescortsservic.blogspot.com/2021/09/why-choose-independent-sangrur-escort.htmlhttps://sites.google.com/view/sangrur-escorts-service/home?authuser=1http://www.aytoloja.org/jforum/user/profile/181961.page
alyoona
2021-9-12 04:57
As the name suggest, these massage in dubai have a believe of giving complete relaxation and refreshment. Happy promotes relaxation and motion and relieves muscle tension. Gliding, percussion or tapping, friction, vibration and petrologist or kneading is the various therapies useful in these body massage. Concept of anatomy of pathology and physiology are used to ensure full relaxing service.https://dubai-massage-center-massage-spa.business.site/https://dubai-massage-center-massage-spa.business.site/
alyoona
2021-9-12 04:58
You will forever be draped with the top quality massage and during your massage session the etiquette Jan will follow is to just uncover the part of your body as they are working on, ensuring that your mind is respected at every times. <a href="https://dubai-massage-center-massage-spa.business.site/" rel="dofollow">massage in dubai</a>
missdelhiescort Email Homepage
2021-9-18 14:26
Hi, I am Miss Delhi Escort. I am a Sexy Delhi Escort Girl. I am Just 23 Years old. I am Very Good Looking Girl. I am Delhi University Student. I am an Escort Service provider in Delhi.  My status. Age:21 Height:5'2 Measurement:34D-24-36 Weight:52kg Eye color:Black Stata/City: Delhi.
ij.start canon Email Homepage
2021-9-18 17:13
Canon printer comes with numerous types, including multifunction, single function, photo print, scanning, copy, and other so many features; however, setting up a Canon model requires an almost similar process to canon setup.https://istartsetup.com/
Disney Plus Email Homepage
2021-9-23 19:18
Disney plus begin code serves the topmost releases from the marvel production, star wars, and Pixar. If the TV of the user is smart with the 4k picture quality then Disney has modified its movies to support such greater quality videos by releasing the 4k movies.disneyplus.com/begin
shehnaazkhan Email Homepage
2021-9-25 14:54
Coming to your website, realized that you are giving very good information, similarly, we are also spreading awareness in India that how easily you can book from Delhi escorts and Mumbai escorts services to Goa escorts very easily and you how to avoid fraudDelhi EscortsEscorts in DwarkaEscorts in AerocityEscorts in Mahipalpur
sunaina kaur Email Homepage
2021-9-25 14:59
Hi baby, my name is Sunaina Kaur, I am a beautiful and hot Latina from Delhi, I am 23 years old and I am new here in Punjab Working as Independent Delhi Escorts Service Provider.Delhi Escorts Mahipalpur Escorts Noida EscortsGurgaon Escorts
chocolategirls Email Homepage
2021-9-25 15:00
Hello handsome! This is me, Reshma Pandit. I am a young erotic girl like a cup of milk. I know that you were not happy with your sexual life so that you came here well don't worry because I will give you everything that you didn't get from your wife or your ex-girlfriend.Escorts In BangaloreCall Girls in BangaloreEscorts in WhitefieldEscorts in MG Road
josvijay Email Homepage
2021-9-28 14:12
eLab Communications certified developers are available to help you build, maintain or update your Shopify store. Our services include: Building Custom Extensions for Your Specific Needs. Implementing Responsive Design for Optimal Mobile & Tablet View.https://www.infobrez.com/
Bed Pari Email Homepage
2021-9-28 20:10
7022789089 Bangalore Escorts provides escort call girls by the Bed Pari escort agency. We have selected the best high profile call girls in Bangalore.Bangalore Escorts
himanigupta Email Homepage
2021-10-1 19:46
Get the best VIP Independent Models with our Laxmi Nagar escorts agency. Book:9718435539 for sexy high-profile celebrity Laxmi Nagar escort service at the cheap rate at Laxmi Nagar place available 24/7Laxmi Nagar Escorts
chandru Homepage
2021-10-1 21:38
python training in BangaloreWith the presence of 10+ branches all throughout Bengaluru, we provide diverse knowledge of Python and inculcate in students all concepts of Python with hands-on Python Training in Bangalore and one-to-one faculty-student interaction. Our program will help you to learn step by step process ranging from installation setup to advance level skill impairment of Python programming.https://www.besanttechnologies.com/training-courses/python-training-institute-in-bangalore
เกมส์ pg slot สมัคร Email Homepage
2021-10-5 22:33
Java Homework Help Online Email
2021-10-8 19:51
Do you need help with Java Homework Help Online? Don't worry, our experts have Online Java Homework Help. You can get Java help within a certain time. Our homework support has top priority so that you are completely satisfied with our service. Our Java experts take an inadequate approach to help you achieve this goal. Before you start, they will give you sample Java homework training to help you feel confident in our Java program.https://www.javahomeworkhelp.com/
ishika Email Homepage
2021-10-10 15:21
Today if someone asks me which is the best post you have seen then I would like to say that I saw your post the best today and it is a very beautifully written post which I appreciate very much. And I also think that if you see someone's post and it is beautiful and well written, that should be appreciated.Call girls in gurugram   Gurugram escorts
ishitaboss Email Homepage
2021-10-10 15:24
Today if someone asks me which is the best post you have seen then I would like to say that I saw your post the best today and it is a very beautifully written post which I appreciate very much. And I also think that if you see someone's post and it is beautiful and well written, that should be appreciated.Call girls in gurugram   Gurugram escorts
Disney Plus Email Homepage
2021-10-11 20:03
Disneyplus.com/begin is a well-known and well-oriented streaming application with its own streaming network. It streams many movies, tv shows, news, sports web series, and newly released shows. Even Disney releases its own animated movies on the Disney plus begin.disney plus begin code
分页: 30/57 第一页 上页 25 26 27 28 29 30 31 32 33 34 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]