[文章作者:张宴 本文版本: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
注:此处的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()函数发送电子邮件
(4)、在MySQL上创建一个数据库servmon,然后在该数据库中执行以下SQL语句创建表:
备注:这张表是PHP接口程序用来记录发送磁盘分区报警邮件的时间,避免在一段时间内重复发送大量报警邮件的。
(3)、PHP接口程序
http://yourdomain/servmon/interface.php
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
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
; 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
little
2021-10-13 14:11
Leave management software is the most common way of dealing with, overseeing, and handling a wide range of downtime or leave demands got from the representatives' side and dealing with the work-power and records appropriately.
anhhshdc
2021-10-13 19:47
GotoAssignmenthelp is the proficient academic writing service holding a resourceful team of more than 3,000 assignment tutors, dedicated to assist students with the authentic academic supporthttps://www.gotoassignmenthelp.com/assignment-help/online-assignment-help/ https://www.gotoassignmenthelp.com/essay-help/cheap-essay-writing-service/ https://www.gotoassignmenthelp.com/sg/essay-help/cheap-essay-writing-service/
organic moong dal price
2021-10-18 19:14
It is a really nice article, I appreciate your hard work. You write on different topics that are quite interesting it force me to visit your website regularly. I also want to share some organic food products that are getting a prominent place in the market because of their health benefits.
Gowtham
2021-10-22 17:07
We are providing a Best Management Software and Services to our Potential Customers for a long while.
david230
2021-10-26 20:40
Hiring an assignment helper in the malaysia with gotoassignmenthelp.com offers complete peace of mind. We understand how much it takes to write an assignment with perfection. Our professional assignment help experts in the Malaysia have acquired specialized knowledge for writing college assignments with perfection. You are probably wondering why you should take our assignment help malaysia? What are the features we offer and what is it in for you if you pay for Assignment Expert on our website? We ensure you get all benefits of our assignment help that transforms to post-college graduation benefits. To find out why you should never let your grades suffer and stay on top of your class.
Teknobuilt
2021-11-2 18:06
Teknobuilt is here to provide Digital Construction work services with a professional approach to the clients. Our other services include Geo Plot Manager, Onsite Planning, Pace OS Platform, Workflow Automation Construction, Project Management 4.0, etc. For more information, contact @ +91-11-41072395, or you can mail us at info@teknobuilt.com.https://www.teknobuilt.com/
spidergoan
2021-11-15 02:15
Thank you so much for sharing amazing Information with us. Visit Here- Call Girls in GoaRussian Escorts in GoaGoa Escorts Service
disney12
2021-11-25 15:05
One of the issues people are seeing is a message telling them to visit%A0 disneyplus.com/begin Here are the FOUR STEPS to follow if you see. Disney Plus%A0is one of the most popular streaming services in the world right now. disneyplus.com/begin With%A0Disney Plus, you can enjoy the full catalog of Disney HD video content that. Visit%A0Disneyplus Begin%A0com if you want to create your account on Disney Plus or if you're looking to obtain some information about it. disneyplus.com/begin Disney Plus%A0is an on-demand, ad-free streaming service for Disney fans. living a seemingly perfect suburban life, but soon%A0begin%A0to question. disneyplus.com/begin Disney+ is the exclusive home for your favorite movies and TV shows from Disney, Pixar, Marvel, Star Wars, and National Geographic. disneyplus.com/begin Start streaming today.Go to to get started. Then follow these steps: Type in your email address for your Disney+ account on the Login website. disneyplus.com/begin Disney+ is the exclusive home for your favorite movies and TV shows from Disney, Pixar, Marvel, Star Wars, and National Geographic. disneyplus.com/begin Disney+ is the home for your favorite movies and TV shows from Disney, Pixar, Marvel, Star Wars, and National Geographic.https://disneyplus.combegins.com/
Mumbai Escorts Service
2021-11-30 13:22
Great Post!!https://www.mayabansal.net/https://www.mayabansal.net/
organic arhar dal
2021-11-30 21:02
Thanks for your blog. It is well written and easy to understand. I regularly visit your blog for more interesting topics, that is why I am here. I also want to share some information especially for those who are more concerned about their health may visit organic pulses in india. In our online organic store, we made a collection of organic pulses like moong, masoor, Chitra rajma, others.organic arhar dal
alex
2021-12-8 14:39
Indisjob.com is a fast-growing recruitment consultancy firm located in Delhi, which provides top Placement services, HR Consultancy, Manpower Recruitment, and Staffing solutions all across the industries. We recruit throughout numerous industry segments for corporate groups and business houses during India and especially in Delhi. We have a huge database of candidates in all fields at all levels. We have a marketing team with attentive professionals who understand and cater to the special personnel needs of the clients using their precise search proficiency. We provide superior manpower to the organizations. Our mission is to help the client to develop their competitive edges.click here for your dream job,https://indisjob.com/
assignments
2021-12-8 19:38
Gotoassignmenthelp is team of leading professional writers for online assignment help australia Writing Services to students all around the world. Contact us today for Best Assignment assistance at very affordable price. Under GotoAssignmentHelp we provide many types of help to the students. We are the most reliable assignment helpers. We have gained our specialization after spending most of our times in making ourselves perfect. We providing 100% plagiarism free Assignment Help. At the point when you pick our best assignment help assistance, our faculty will consider the quality and your evaluation criteria.
john
2021-12-9 19:19
The canon mg3620 setup is incredibly helpful with numerous ways of printing remotely. With the Canon PRINT application effectively print and sweep photographs and archives straightforwardly from your cell phones. Appreciate printing from your iPad, iPhone or iPod contact with AirPrint, and from Android gadgets with Google Cloud Print.https://wearableworld.co/canon-pixma-mg3620-printer-to-wifi/
Bangalore Escorts
2021-12-15 19:51
Get High Profile Independent Bangalore Escorts in Bangalore Contact us directly at 8123369453. Enjoy with Our Escorts Bangalore like your Girlfriend and get the utmost satisfaction.Bangalore EscortsBangalore EscortsBangalore Escorts
technical help
2021-12-16 00:05
IT support is the need of the hour for all businesses today. If you do not want to erect an IT support team of your own, it is always a good idea to get the help and support from a reliable IT company. You will come across lots of service providers but none of them comes even close to the level of expertise and the kind of support that is provided by Assistance For All. We look after the hardware, software and networking problems of our clients in all industries. it help
SEO Services India
2021-12-21 13:30
Liking is the digital form of flattery, and this technique works great for digital marketing. Can use the like button to share anything that you like on various social networking sites. https://snapvisibility.com/beginners-guide-to-lead-generation/https://forum.gorod.dp.ua/member.php?u=348288&tab=aboutme&simple=1
Online Assignment Help
2021-12-23 13:01
Cheap Essay Writing Service preparation and submitting assignments and essays before the deadline is a tough nut to crack. It takes extreme dedication. What if, you do not have this much availability? GOTOASSIGNMENTHELP service provider. It can take away all the pain you are in. You can What if, you have planned things that are clashing with your courses? What if, you are regularly getting less grades your courses? If this sounds you fit, then you should probably take Online Assignment Help Online from get plagiarism free assignment and Essay Help and that too with high quality. This can probably bring A+ grade and you can roam proudly with best grades under your arm.
rimajha
2021-12-23 13:29
Escort Service in Gurgaon are independent tours Gurgaon Escort have been placed in the categories of you can contact on our website to spend time with them.<a href="https://www.escortsserviceingurugram.co.in/escort-service-in-gurgaon-about-us/"> Gurgaon Escort Service</a>
pinkijha
2021-12-23 14:01
Gurgaon is a famous place for call girls. The sensual and beautiful Escort Service in Gurgaon take a free trip to fulfill your wish. If you are interested in Escort Service, then you can contact us on our website for a holiday with them.http://www.gurgaonmallgirl.com/
Ruby Shah
2021-12-27 19:25
We offer vasant kunj escorts available to fulfill your sexual desires. No matter what sexual fantasies you're having. If you join vasant kunj Escort Agency, they'll be all amused. The escorts at vasant kunj very friendly manner they deal with their clients. Even if they've got the most bizarre imaginations, they'll never doubt that. Whatever you want to describe it, it's the standard for these kinds of escorts.saket escortsvasant kunj Escorts
分页: 31/57 26 27 28 29 30 31 32 33 34 35