[文章作者:张宴 本文版本: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技术 | 评论(1136) | 引用(0) | 阅读(182467)
Lotus 365 Email Homepage
2023-9-6 18:43
In India, the popularity of sports betting has significantly increased in recent years. The betting industry has found a fertile ground to expand with the rise in smartphone usage and interest in sports. The Lotus 365 App , a betting app, has made ripples in the Indian industry in particular.In India, cricket is more than a sport; it is a religion. Every match is followed by millions of fervent fans, and this passion has given rise to a sizable betting market. Users have a wide range of options because of the availability of so many online betting sites. However, one brand has continually distinguished itself from the competition: the Lotus 365 App.The  Lotus 365 App, which offers a variety of sports, live betting options, security features, and a customer-focused approach, has grown to become one of the most popular betting apps in India. The emergence of mobile betting apps has changed the landscape of the industry, enhancing its use and appeal to consumers nationwide. While India's legal system for gambling is still complicated, both operators and consumers must practice responsible gaming and abide by local laws. Lotus 365 and comparable apps are positioned to play a big role in determining the future of the Indian betting sector as it continues to develop.For more read our blogs- http://sonicsquirrel.net/detail/label/Lotus365/10099/Visit our other reference link- https://lotus365official.nicepage.io/
Anika Email
2023-9-8 20:07
Our services are going to be more amusing and thrilling. Call Girls In Jaipur There are many amendments have to be made yet for making India escort services convenient for pleasure seekers. We also provide a routine fitness check-up to each escort girl in our collection.
Vaansh Email
2023-9-9 14:43
You can plan your stay with any of our gorgeous babes and keep your lips lock with her juicy lips. Delhi Escorts Find the best match for your needs by calling us . We assure your satisfaction by adding new features and a new face in our services. You will get everything here that you had dreamed of.
vaansh Email
2023-9-9 15:17
We might be the only of our kind of escort provider in the nation who touches all the major cities of the nation. Call Girls in Delhi   You can plan an erotic night-stay with our glamorous night angels in any state of the nation you are staying.
Payal Email
2023-9-9 15:43
You would always feel like you’re accompanying someone who suits you perfectly. Delhi Escorts Agency We have a widespread empire of our escort services in Delhi, India. If you are on a trip to India so choosing us might enhance your enjoyment and pleasure of your journey.
Radhika Email
2023-9-9 16:11
We might be the only of our kind of escort provider in the nation who touches all the major cities of the nation. Escort in Delhi   You can plan an erotic night-stay with our glamorous night angels in any state of the nation you are staying.
jackowen
2023-9-11 17:03
Students require assignment helper online since they require assistance with their assignments. Other companies offer online Assignment Help in the USA, but we are one of the best assignment writing service providers that offer online writing services.
Vaansh Email
2023-9-11 17:34
If you have been alone for a long time, so your time has started. We are here to introduce the most essential Escorts In Delhi to you. Yes, we are discussing over escort services in Delhi, which has an empire of the cutest girls of the town.
rohanrajput Email
2023-9-13 16:05
Our young and energetic college Delhi Escorts  are fabulous at dating. Going for a casual or dinner date with one of these Delhi escorts is a dream come true for many customers. Fill your life with a lot of romantic activities. The sweet girls will let you explore the world of romance with them. You won’t believe the capability of our college escorts in Delhi. Apart from romance, you will get erotic and girlfriend experiences from our ladies in the meeting.
rohanrajput Email
2023-9-13 16:06
Do you prefer to make hot girlfriends in the capital city? The good thing is that we have qualified Escorts in Delhi  services. They are beautiful and bold to possess all qualities necessary to be an ideal girlfriend. Enjoy the companionship of our hot girlfriends with exciting moments to enjoy in the secret meeting. Don’t worry, the meeting is going to be private and personalized based on your requirement.
gerg Email Homepage
2023-9-13 16:42
<a href="https://shotblastech.com/shot-abrasive-consumption-calculation/">shot blasting machine calculation</a>,<a href="https://shotblastech.com/shot-blasting-machine-blog/">shot blasting machine blog</a>, <a href="https://shotblastech.com/shot-blasting-machine-blog/shot-blasting-machine-faqs/">shot blasting machine FAQ</a>, <a href="https://shotblastech.com/shot-blasting-machine-company/">shot blasting machine company</a>, <a href="https://shotblastech.com/shot-blasting-machine-company/about-shot-blasting-machine-manufacture/">shot blasting machine manufacture</a>, <a href="https://shotblastech.com/shot-blasting-machine-company/shot-blasting-machine-testimonials/">shot blasting machine testimony</a>, <a href="https://shotblastech.com/shot-blasting-machine-company/spare-parts-shot-blasting-machine/">shot blasting machine spare parts</a>, <a href="https://shotblastech.com/shot-blasting-machine-company/shot-blasting-machine-video/">shot blasting machine video</a>, <a href="https://shotblastech.com/shot-blasting-machine-company/shot-blasting-machines-projects/">shot blasting machine project</a>, <a href="https://shotblastech.com/shot-blasting-machine-company/service-shot-blasting-machine/">shot blasting machine service</a>, <a href="https://shotblastech.com/shot-blasting-machine-for-heating-radiator/">shot blasting machine for heat radiator</a>, <a href="https://shotblastech.com/shot-blasting-machine-for-marble-stone-and-paver-blocks/">shot blasting machine for marble stone</a>, <a href="https://shotblastech.com/shot-blasting-machine-overview-of-each-main-parts/">shot blasting machine main parts</a>, <a href="https://shotblastech.com/shot-blasting-machines/">shot blasting machines</a>, <a href="https://shotblastech.com/shot-blasting-machines/cylinders-shot-blasting-systems-for-cylindrical-items/cylinder-outer-sur... blasting machine for cylinder outer surface</a>,
Siys Email
2023-9-15 20:20
We are the best India Escorts service provider. We provide young College Girl Escorts, Call Girls Chandigarh , housewife escorts, Model Escorts India, and Call girls at very reasonable rates.
Siys Email
2023-9-15 20:21
We are the best India Escorts service provider. We provide young Call Girls Chandigarh , independent escorts, housewife escorts, Model Escorts India, and Call girls at very reasonable rates.
Siys Email
2023-9-15 20:22
We are the best India Escorts service provider. We provide young Call Girls Chandigarh , independent escorts, housewife escorts, Model Escorts India, and Call girls at very reasonable rates.
asmitta Email Homepage
2023-9-21 00:15
Connect to Asmitta Bansal who is famous world class Goa call girls model offering real entertainment and sexual satisfactions. Avoid fake call girls agency and Just call us for book call girls services in Goa at lowest cost.https://www.garima-pandey.com/https://www.soniyatripathi.com/
vansh Email
2023-9-23 18:36
They leave no stone unturned to delight you off the bed as well and this is what makes our agency is one of the leading Delhi Escorts Service . We conduct authentic, highly-qualified and elegant call girls in Delhi near all the major hotels.
vansh
2023-9-23 19:15
If you are sick of your same daily routine, there is no excitement or adventure left in your life, all you see and Delhi Escorts Agency feel is the boring hectic life then you need a break and let us do the work for you.
vansh
2023-9-23 19:21
Delhi Escorts Services are very beautiful and have a charm to you. If you also want to spend some special time which will fill your night with sex and Delhi Escorts give you full enjoyment of sex then you need to call us, we will provide you with such Escorts which you only dreamed of.
kaabir Email
2023-9-27 16:33
Our Escorts Agency is given the Escort Service in India at all time. The agency is all time open and all time the escort girls are available for given their services. The escort girls come on the time and they are available for the time and then another girl comes in agency.Katwaria Sarai Escorts || Escorts in Khajoori Khas || Khan Market Escorts Service || Khanpur Call Girls || Call Girls in Khera Kalan ||
Siya Koli Email
2023-10-7 18:03
Young, passionate love-makers are the best option for taking sexual pleasure erotically. Delhi Call Girl If you are extremely hungry or craving for lovemaking then you should go with young college girl escorts. We have a group of professional college going escorts and you wouldn’t believe that these girls are so high in the market presently.
分页: 51/57 第一页 上页 46 47 48 49 50 51 52 53 54 55 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]