[文章作者:张宴 本文版本: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)
QuickBooks update error 15104
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-4 18:09
QuickBooks is a widely preferred software with hi-tech features and functionalities, but when it comes to technology, codes, and algorithms, errors and unwanted disruptions can be encountered at times.QuickBooks Component Repair tool is basically a tool that can be downloaded to fix QuickBooks common errors freely. It is an especially designed tool to handle the issues and problems that are encountered with .NET Framework and other Windows components that are required for running QuickBooks.QuickBooks Error Code h202 | QuickBooks Error Code 3371
Shawn458
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-4 20:11
Do you need help with your assignments? You are in the right place! Great Assignment Help provide high-quality assignment help to students across the world. Our writers are experienced and we can write your assignment in any style. Place your order now and get a discount on it!
Shawn458
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-4 20:11
Do you need help with your assignments? You are in the right place! Great Assignment Help provide high-quality assignment help to students across the world. Our writers are experienced and we can write your assignment in any style. Place your order now and get a discount on it!
divyanshioberoi
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-4 20:28
I am Divyanshi Oberoi working as Udaipur Call Girls. I am the most professional escort girl in Udaipur. I never share my client's personal information with others and make them fully comfortable. https://www.escortserviceudaipur.in/https://www.escortserviceudaipur.in/escorts-service.htmlhttps://www.escortserviceuda...
divyanshioberoi
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-4 20:31
I am Divyanshi Oberoi working as Udaipur Call Girls. I am the most professional escort girl in Udaipur. https://www.escortserviceudaipur.in/
My Girls
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-5 14:49
Hi guys, I'm My Girls, a slim young model and a 20-year-old freelance escort. I am beautiful, sexy, and open, smiling all the time. My treatment is very complete and I consider myself a very committed lover. Escorts Service in Lucknow If you are tired, stressed or bored, don't hesitate to come and relax in my hands. I know what you need to de-stress and I assure you that you will not regret it, I am a delicious lover, just as you like.https://mygirls.in/
Tourisa
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-6 23:54
Want to travel the world but facing difficulty in getting visa. Tourisa provide best <a href="https://tourisa.in/">Visa Consultancy Service in Delhi</a> as well as best <a href="https://tourisa.in/translation-services/">Translation Agency in Delhi </a> for your convinience.Feel free to contact us at 011-41445079 or mail us at crm@tourisa.in.
islamabadescortspk
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-7 21:40
We are the top leading escort agency providing services for a long time. We do everything just to make our clients happy when they hire our Islamabad Call Girls services. Hence we have only High-Profile and VIP Call Girls in Islamabad. They are well-educated models who work properly. Our Escorts in Islamabad are well trained as well as experts in their profession.
tararaajput
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-8 17:23
Hi, my name is Tara Raajput I am a naturally sexy woman with a gamesome personality and amazing twerking chops! I'm a Cypriot summer girl as you can see in my filmland, I can keep a good discussion & give you the stylish experience ever! Sexy curvy body with Juicy bum & oversights long black hair and sexy big natural lips! I'm a Size UK12 my height is 5'7 and my bone size is DD-E 100 real filmland & videotape! Aerocity escorts | Female Escorts in Gurgaon
Pakistan Escorts
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
2022-2-11 21:36
Because if you book escort services, first of all you need a good hotel in Pakistan where you can enjoy our escort services, so we want you to have no hassle while having sex. Thinking about this and keeping your safety in mind, you have to choose our Pakistan Escort Services. Muskan Khan Agency offers you escort sex services in all hotels in Pakistan.<a href="http://karachiescortsgirls.ohari.eu/">sunny leone</a><a href="https://altcourt.org/blog/23988/12196/call-girls-in-karachi">sunny leone</a><a href="https://demo.sngine.com/blogs/21076/Independent-Escorts-Service-in-Karachi">sunny leone</a><a href="https://karachiescortsgirls.yooco.org/karachi-escorts">sunny leone</a><a href="https://karachiescortsgirls.bloggersdelight.dk/2022/01/29/call-girls-in-karachi-pakistan/">sunny leone</a><a href="https://karachiescortsgirls.obsidianportal.com/">sunny leone</a><a href="http://www.fxstat.com/en/user/profile/alizashah-315854/blog/36458146-Want-to-Have-Some-fun-with-Genuine-Karachi-Escorts?... leone</a><a href="https://karachiescortsgirls.tribeplatform.com/general/post/hire-the-best-escort-now-TVecbKLrC0fwhGG">sunny leone</a><a href="https://karachiescortsgirls.pagexl.com/">sunny leone</a><a href="https://alumni.armtischool.com/read-blog/7333_karachi-city-will-bewitch-you-with-its-vibrant-whores.html">sunny leone</a><a href="https://redsocialgoool.com/read-blog/45222_what-is-a-039-escort-039-exactly.html">sunny leone</a><a href="https://rpmrush24.com/read-blog/12366_the-best-escorts-in-karachi.html">sunny leone</a><a href="https://hippieclic.com/read-blog/68025_enjoy-your-time-with-sexy-and-hot-karachi-escorts.html">sunny leone</a><a href="https://social.artisanssoft.com/read-blog/17326_karachi-call-girls-karachvipimodels-whatsapp-number-with-photos.html&quo... leone</a><a href="https://fireland.aliv.us/read-blog/11153_escorts-services-in-karachi.html">sunny leone</a><a href="https://naijacontacts.com/topics/view/19503">sunny leone</a><a href="https://cirandas.net/sophiadaisy/blog/call-girls-services-dedicated-to-karachi">sunny leone</a><a href="https://corosocial.com/read-blog/54991_escorts-in-karachi.html">sunny leone</a><a href="https://alumni.armtischool.com/read-blog/7324">sunny leone</a><a href="https://rpmrush24.com/read-blog/12325">sunny leone</a><a href="https://redsocialgoool.com/read-blog/45168">sunny leone</a><a href="https://social.x-vendor.com/read-blog/21983">sunny leone</a><a href="https://catbuzzy.com/read-blog/61209">sunny leone</a><a href="https://network.counselindia.com/read-blog/74589">sunny leone</a><a href="https://hippieclic.com/read-blog/68020">sunny leone</a><a href="https://facenock.com/read-blog/8655">sunny leone</a><a href="https://zlidein.com/read-blog/33360">sunny leone</a><a href="https://flagonsworkshop.net/read-blog/5990">sunny leone</a><a href="https://kruthai.com/read-blog/78277">sunny leone</a><a href="https://wiwonder.com/read-blog/31780_what-does-best-high-profile-lahore-escort-service-mean.html">sunny leone</a><a href="https://7smabu.com/read-blog/71926">sunny leone</a><a href="https://www.petslambook.com/read-blog/24317">sunny leone</a><a href="https://community.wongcw.com/blogs/70019/GIFTED-and-PRETTY-INDEPENDENT-LAHORE-CALL-GIRLS">sunny leone</a><a href="https://naijacontacts.com/topics/view/19536">sunny leone</a><a href="https://hyvsi.com/read-blog/59245">sunny leone</a><a href="https://cliqafriq.com/read-blog/176411">sunny leone</a><a href="https://addandclick.com/read-blog/43912">sunny leone</a><a href="https://kaalama.org/read-blog/72474">sunny leone</a><a href="https://reseau.1mile.com/read-blog/114121">sunny leone</a><a href="https://www.torah-haim.com/read-blog/13203">sunny leone</a><a href="https://joyrulez.com/blogs/64313/SENSUAL-FOREIGNER-ESCORTS-TO-FULFILL-YOUR-SEXUAL-APPETITE">sunny leone</a>
mocleaning
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-16 01:43
Carpet water damage restoration is not only a messy project, but it can be time consuming too. It's best to call in professionals for this type of job, who have the experience and manpower to get it done right.At Noble Carpet Cleaning, we have the tools, skills, and expertise to handle any type of water-damage situation with precision. We are available 24 hours a day, 7 days a week for emergency service.
call girls in delhi
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-19 04:23
Are you searching for Luxurious Delhi Escorts Famous Call Girl here. I'm Siya Sharma a Delhi Call Girl that Ready to serve you the most astonishing sexual feelings here. Are you ready to have this amazing Sexy Delhi Escorts? . In our Escort service in Delhi, I establish that I'm the most acceptable and nice Delhi Call Girls. There are a lot of clients that only come here to feel the sensual moment with me. Actually, my motto is to meet them 100%.https://www.russianescortservicesdelhi.com/
Mykel
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-19 19:36
Thanks from my site this is very useful information if you are looking for java homework services now visit here- https://www.javahomeworkhelp.com/java-project-help.html
Mykel
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-19 19:37
https://www.javahomeworkhelp.com/java-project-help.html
Mykel
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-19 19:38
This is very useful information and if you want to get the best results related java homework service.https://www.javahomeworkhelp.com/java-project-help.html
poojabansal3435
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-21 17:20
Book call girls in Bhopal & escort service. Find genuine Bhopal escorts and real independent Bhopal call girl with real photos and WhatsApp IDs.https://hi.streetgirls.in/bhopal-escorts-servicehttps://www.udaipurescortservice.biz/independent-bhopal-escortshttps://w...
poojabansal3435
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-21 17:21
Book call girls in Bhopal & escort service. Find genuine Bhopal escorts and real independent Bhopal call girl with real photos and WhatsApp IDs.https://hi.streetgirls.in/bhopal-escorts-service
olivilajhon08
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
2022-2-24 19:00
Make sure the surface where you are placing the printer is clean and close to Pc or laptop.Check the shipped components with your inkjet printer.https://istartsetup.com/https-ij-start-cannon/https://www.ijstartca-none.org/
riyapatel3188
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-2-24 20:19
Riya is the type of girl you conjure about, but presumably not the type you take home to your mama. She’s a veritably mischievous girl, who encourages bad whenever she can, so she’s not the perfect model for your mama to authorize. Riya is the life and soul of the party. She likes to dance, she likes to drink champagne and she loves to have intimate fun with the men in her life. This is the type of girl that could keep you up all night and you’d noway know it was morning. In fact, we dare stake that Riya could keep you going for an entire weekend if she put her mind to it. You need stamina and passion for this cute golden. Riya loves all types of guests, from youthful men to more mature gentlemen. She enjoys intimate, quieter meetings too of course if you prefer, and she has a lovely apartment where she'll be happy to entertain you. Female Escorts In Delhi | Escort Service In Mahipalpur | Dwarka Escorts
suresh
![给他/她发邮件 Email](template/RuiPai/images/email.gif)
![访问他/她的主页 Homepage](template/RuiPai/images/homepage.gif)
2022-3-1 19:16
Getting Rapunzel-like strands is no easy feat—ask anyone who’s gobbled down countless biotin pills and vitamin E supplements only to be greeted with the same lackluster strands.
分页: 34/56
29 30 31 32 33 34 35 36 37 38
![第一页 第一页](template/RuiPai/images/arrows/doubleleft.gif)
![上页 上页](template/RuiPai/images/arrows/singleleft.gif)
![下页 下页](template/RuiPai/images/arrows/singleright.gif)
![最后页 最后页](template/RuiPai/images/arrows/doubleright.gif)