[文章作者:张宴 本文版本: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技术 | 评论(1139) | 引用(0) | 阅读(185514)
ysecretd Email Homepage
2022-9-20 15:49
very interesting, good job and thanks for sharing such a good blog. Gatineau Escorts
poojagupta Email Homepage
2022-9-25 14:43
Body massage gives you ultimate relief to your body.i would like to recommend each and everyone go for massage once in a week for ultimate relief. it will not only gives you relief but also increse your productivity.call girls in JaipurJaipur Escort service
bettyjules44 Email Homepage
2022-9-27 16:45
All time readiness as well as providing Finance assignment Help in any subject is the top quality of our experts who hold master’s or PhD degrees in their respective subject that makes them the perfect ones to complete your assignment within the timeline.
escort in Mohali Email Homepage
2022-9-28 14:54
Welcome to our website of wonderful escorts available for you to book any time of the week for a romantic evening. The only difficult decision you will make is which girl on the call you want to meet. We have inviting girls in Mohali, like models and glamor all over Mohali and the surrounding area. Various female citizens accompanying girls will be able to visit you either at home or in hotel rooms. On our site, you can find GFE women and thrill girls anywhere from Mohali. There are many hotels in Mohali and we can cover them all, especially 3 and 5-star hotels in Mohali.is a website with the best independent call girls in Mohali. escort service Mohali Here you will find young escorts, willing to accompany you to a certain event, and a weak party with you. Girls, our website shows are real and all the girls really love their work. Little call girls in Mohali are waiting for you to call them and invite them to your hotel room or visit them at their places. Booking a Mohali call for a young lady through us is as simple as a piece of cake. You can call us or Whatsapp on the number mentioned above and request pictures and recordings of young women's call in Mohali. One of our guests will go to your call or WhatsApp and send you every one of the pictures and recordings of young women in Mohali to insist. After selecting a young lady from that point, you can send that specific photo or video to us. Moreover, we will update you on their prices and timings. If nothing is too much trouble, note that each of the traits we depict is indisputable, and we ban individuals who would bargain with us immediately. You can search for the services of Mohali Escort because they have the most active young fashion models in their gathering in case you are looking for the beautiful call girls of Mohali.https://ct.streetgirls.in/mohali-escorts-service
hydromaxseries Email
2022-10-9 17:12
This is an amazing result after I used the Hydromax Pump, It's really a penis enlargement pump that gives amazing results.
hydromaxseries Email
2022-10-9 17:13
This is an amazing result after I used the Hydromax Pump, It's really a penis enlargement pump that gives amazing results.
hydromaxseries Email
2022-10-9 17:13
This is an amazing result after I used the Hydromax Pump, It's really a penis enlargement pump that gives amazing results.cool
xtraizefunciona Email
2022-10-9 19:35
Se ha demostrado que las píldoras Xtrasize son efectivas para superar los problemas de salud sexual, no necesita preocuparse por tomar píldoras Xtrasize porque se ha probado clínicamente que son seguras para el consumo.
christinacharls Email Homepage
2022-10-14 16:36
You made such an interesting piece to read, giving every subject enlightenment for us to gain knowledge. Thanks for sharing the such information with us to read this...Google Bellen Nederland
call girls of Lahore Email Homepage
2022-10-15 20:08
Once you've found someone who seems trustworthy, give them a call and set up a meeting. When meeting up with your chosen call girl, be sure to agree on a price beforehand. This will help avoid any awkwardness or misunderstandings later on.
call girls near me Email Homepage
2022-10-15 20:08
Islamabad call girls are available to provide you with the best possible service. There is a wide range of call girls in Islamabad who can offer their services to you, and all of them are extremely beautiful and talented. You can choose from a variety of different services that they offer, and they will make sure that you are completely satisfied with their performance.
call girl service in Karachi Email Homepage
2022-10-15 20:09
Second, there is always the risk that the call girl may not be who she says she is. It is important to do your research and make sure that you are hiring someone who is reputable and trustworthy. Finally, there is always the risk that you may not be satisfied with the services provided by the call girl.
ella28lee Email Homepage
2022-10-22 08:20
Never ever underestimate the importance of <a href="https://greatassignmenthelper.com/php-assignment-help/">PHP Assignment Help</a> because without it, you might face much trouble in doing your assignment. So, it is always important to understand the importance of <a href=” https://greatassignmenthelper.com/uk/ ”>Help with Assignment</a>.
สล็อตPG Email Homepage
2022-10-22 15:10
Check out our new products here: สล็อตPG [item code is aoom123]
Navi Mumbai Escorts Email Homepage
2022-10-22 16:26
Hey, Babes are you searching for that hot and nude night fun with sexy girls near me just starting rs 4999 at your doorstep service payment takes only cash and online as you wish. Also perfect for hangouts, long drives, parties, hookups, and one-night stands in the city is our call lady Escort Services in Navi Mumbai. The location of the meeting is up to you. https://adhiranene.com/
Amna Hot scandals Email Homepage
2022-10-26 20:06
You don't have to spend a lot of money to connect with women here with us The Pakistan Call girl’s services have professional specialists who are trying to attract everyone. You don't have to worry about your pockets while staying with our fabulous hot sexy girls they are here at your doorstep planning to ensure sexual satisfaction
Jenny
2022-10-27 15:01
We allow you to maintain a romantic relationship with Delhi Escorts Agency instead of rubbing their vagina with your cock. It’s an old-fashioned way to get seduced by watching a girl undressing and performing some erotic moves with her boobs and a nude pole dance.
Komal Hot scandals Email Homepage
2022-10-27 16:54
You don't have to spend a lot of money to connect with women here with us The Pakistan Call girl’s services have professional specialists who are trying to attract everyone. You don't have to worry about your pockets while staying with our fabulous hot sexy girls they are here at your doorstep planning to ensure sexual satisfaction
Kinza Hot scandals Email Homepage
2022-10-28 18:23
You don't have to spend a lot of money to connect with women here with us The Pakistan Call girl’s services have professional specialists who are trying to attract everyone. You don't have to worry about your pockets while staying with our fabulous hot sexy girls they are here at your doorstep planning to ensure sexual satisfaction
Muskan Hot Scandals Email Homepage
2022-10-29 18:35
The Pakistan Call girl’s services have professional specialists who are trying to attract everyone. You don't have to worry about your pockets while staying with our fabulous hot sexy girls they are here at your doorstep planning to ensure sexual satisfaction
分页: 42/57 第一页 上页 37 38 39 40 41 42 43 44 45 46 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]