[文章作者:张宴 本文版本: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
![点击在新窗口中浏览此图片 点击在新窗口中浏览此图片](attachment/200708/servmon1.1.jpg)
ServMon V1.1 在 1.0 的基础上,增加了对Linux系统负载的监控,并编写了客户端自动安装包:
1、被监控端服务器(Linux)
(1)、下载并安装ServMon Client
注:此处的password为interface.php程序中设置的数据传输验证密码。
客户端安装包源码:
│
├─install
├─[src]
│ ├─[bin]
│ │ ├─diskstat_send
│ │ ├─loadstat_send
│ │ └─swapstat_send
│ ├─[cron]
│ │ └─servmon
│ └─[data]
屏幕演示:
![点击在新窗口中浏览此图片 点击在新窗口中浏览此图片](attachment/200708/servmon1.1_client.jpg)
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()函数发送电子邮件
(4)、在MySQL上创建一个数据库servmon,然后在该数据库中执行以下SQL语句创建表:
备注:这张表是PHP接口程序用来记录发送磁盘分区报警邮件的时间,避免在一段时间内重复发送大量报警邮件的。
(3)、PHP接口程序
http://yourdomain/servmon/interface.php
![](https://cdn.phpts.cn/phpts/www/webstatic/img/logo@2x.png)
![](https://cdn.phpts.cn/phpts/images/software/phptsbnew.jpg)
8月3日,我写了“Linux服务器监控系统 ServMon V1.0”,今天,ServMon V1.1 版本亮相。
ServMon的原理是用shell脚本定时抓取被监控Linux服务器上的信息,再用curl POST到监控机的PHP接口程序上,由PHP接口程序对信息进行分析,如果存在异常,则发送报警邮件给管理员。报警邮件演示页面请见:http://blog.zyan.cc/read.php/276.htm
![点击在新窗口中浏览此图片 点击在新窗口中浏览此图片](attachment/200708/servmon1.1.jpg)
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
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]
屏幕演示:
![点击在新窗口中浏览此图片 点击在新窗口中浏览此图片](attachment/200708/servmon1.1_client.jpg)
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
; 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;
`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
![](https://cdn.phpts.cn/phpts/www/webstatic/img/logo@2x.png)
![](https://cdn.phpts.cn/phpts/images/software/phptsbnew.jpg)
astro
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2023-10-9 15:12
Best blog to read
Blindsonwindows
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2023-10-16 22:52
Thanks!
kukux360
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2023-10-18 17:33
India Call Girls are something that people only know about. This is because Mumbai Call Girls are not readily available to the public and it is hard to find India Call Girl advertisements in any part of the world.
kukux360
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
2023-10-18 17:35
And if someone finds one, he will be surprised to know that the person is an Indiakar. This is because Vashi Call Girls are one of the most gorgeous girls in the world and they have some of the best features that you can find in any human being.Call Girls in Churchgate
Kanchan
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
2023-10-18 17:37
For people who travel often to India, it is important to have an Call Girls in Mumbai with them. This is because India has some of the most gorgeous girls who come from Russia. If a person needs a Call Girl service, Dadar Call Girls Number can provide him with a great service.
Kanchan
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
2023-10-18 17:38
Welcome to High Class and Modern Thane Call Girl in India. We are here to provide you with the best Call Girl in Airoli. Unlike other Call Girl agencies, we care about our clients and their satisfaction.
shanaya
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
2023-10-23 18:00
Indian girls are among the most attractive in India. This is a fact that you can easily find in any search engine. In our Hanumangarh Call Girl service, girls get recruited based on their ability and field of interest. You can trust that the girl you choose will be your friend and make your dreams come true. Our Hanumangarh Call Girl girls are beautiful and perfect and honest and will give you genuine love and satisfaction.Hanumangarh Call Girl service
Mumbai Escorts
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2023-10-25 10:14
Because of our inclination we generally need to mess around with somebody one of a kind. Our Escorts in Mumbai give you explicit accomplice as indicated by your requirements for satisfying your needs.Mumbai Escorts | Mumbai Call Girls | Mumbai Escort Girls |
Mumbai Escorts
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2023-10-25 12:24
Dating escorts in Mumbai is the best solution of releasing stress and enjoy life to the fullest and the cream on cake is when you got one of the best and high profile escort in Mumbai. Imagine the times when you are very tired and completely drained out.Mumbai EscortsMumbai Call GirlsMumbai Escort GirlsMumbai Escort Models
andersondavid01
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2023-10-28 14:07
Seeking help to complete an intricate academic project within the due date, professional assignment help in Canada is the best solution to complete an academic paper. I was unsure about taking external writing support for my project but the support of experts has made it easier for me to solve my project excellently. The best thing about the services is the affordable pricing that anyone can easily pay. The quality of work is outstanding and according to my expectations. Thanks to the experts for providing valuable assignment help.
Cheerypatel
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2023-10-28 17:11
Are you searching for VIP Escort In Ahmedabad Find out your companion escort only here at Aditi Patel Escort Services - Available 24/7 for Incall and Outcalls Call Girls in Ahmedabad.https://www.aditipatelescort.com/
arihantflexpack
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
2023-11-7 19:17
Arihant Flex Pack is a reliable solution for enterprises that depend on effective packaging to secure their products in Jaipur's busy industrial scene. As a prominent Strapping Roll Manufacturer in Jaipur Rajasthan , they have continuously provided top-notch strapping rolls that satisfy the various requirements of nearby companies.The importance of strapping rollers in the packing industry cannot be emphasized. If you're a manager or owner of a business in Jaipur and you need a reputable manufacturer of strapping rolls to match your needs, Arihant Flex Pack is a name you can trust and is of high quality.
ij.start.canon
2023-11-7 19:46
ij.start.canon is a platform for getting the canon printer driver.Install https //ij.start.canon printer setup online or a disc to operate your Canon ij printer. .Visit http //ij.start.canon to download printer drivers and start setting up your printer device. ij.start canon allows you to download, install, and configure on your PC, Mac and smartphones as well.
Muha meds carts
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
2023-11-14 03:07
Muha Meds is a popular brand in the cannabis industry, known for its high-quality and reliable products. With an extensive range of cannabis vape cartridges, Muha Meds has gained a reputation for delivering a consistent and enjoyable vaping experience.https://officialmuhameds.com/https://officialmuhameds.com/
Muha meds carts
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
2023-11-16 03:27
Muha Meds is a popular brand in the cannabis industry, known for its high-quality and reliable products. With an extensive range of cannabis vape cartridges, Muha Meds has gained a reputation for delivering a consistent and enjoyable vaping experience.https://officialmuhameds.com/https://officialmuhameds.com/
David Watson
2023-11-21 13:49
Industrial Relations Assignment Help provides invaluable support for students navigating the complex landscape of workplace relationships and labor issues. With expert guidance, students can gain insights into labor laws, negotiations, and organizational dynamics, ensuring a comprehensive understanding of industrial relations. This service is a valuable resource for academic success in this field.
Chaitanya
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2023-11-27 12:30
Thanks in favor of sharing such a nice thought, post is pleasant, Thats why I have read it completelyTableau TrainingSelenium Online TrainingSAP ABAP Certification Training from Hyderabadhttps://viswaonlinetrainings.com/courses/tableau-online-training/https://viswaonlinetrainings.com/courses/selenium-online-training/https://viswaonlinetrainings.com/courses/sap-abap-online-training/
Quirita
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2023-11-30 21:21
Quirita, as an independent girl in Delhi, you are a unique blend of beauty and talent. | https://quirita.in/female-escorts-in-gurgaon.html | https://quirita.in/female-escorts-in-noida.html | https://quirita.in/female-escorts-in-ghaziabad.html | https://quirita.in/female-escorts-in-faridabad.html | https://quirita.in/female-escorts-in-vaishali.html |
Bhopal Escort
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
2023-12-4 15:46
Would you be able to call girls in Bhopal? A wide selection of authentic images of sexy women. Get an exclusive range 24/7 from the best call girls agency in Bhopal. https://www.streetgirls.in/bhopal-escortshttps://www.streetgirls.in/bhopal-escorts
girl chd
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
2023-12-8 14:11
Whether you are seeking a companion for intimate pleasure, a dinner date, a party, a long drive, or even corporate meetings, our Chandigarh Escort Service can fulfill your desires.https://girlchd.inhttps://girlchd.in/call-girls-in-chandigarh.htmlhttp://www.sargunmehta.in
分页: 52/56
47 48 49 50 51 52 53 54 55 56
![第一页 第一页](template/RuiPai/images/arrows/doubleleft.gif)
![上页 上页](template/RuiPai/images/arrows/singleleft.gif)
![下页 下页](template/RuiPai/images/arrows/singleright.gif)
![最后页 最后页](template/RuiPai/images/arrows/doubleright.gif)