[文章作者:张宴 本文版本: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技术 | 评论(1088) | 引用(0) | 阅读(146590)
canonerror Email Homepage
2021-5-5 14:53
he works according to their time because every workload must need to be finished but when it's about doing or priority it. we have to these kinds of simple things here so goes ahead and moves into your work and creates arrangements or some techniques to help it.                                                    this paragraph is for the technology category of a canon printer any user who wants to get the best and efficient rate of prints.<a href="https://ijstartcanonx.com/">http//ij.start.canon</a>
nidhichopra3435 Email Homepage
2021-5-7 13:41
If you want an independent female escort in Jaipur, just make an online search. You will find the contact details with profiles of several independent female Escorts in Jaipur, through online search. They are just a call away. VIP models and affluent women too work as escort to please their own crave of having sex with different people. Russian escorts in Jaipur can also be availed just through taking a step to browse over the Internet. You may get the accompaniment of escorts for parties and social event as and when required. These beautiful ladies are attractive enough to appeal all with their sexy bodies.https://www.streetgirls.in/
realtorsophia Homepage
2021-5-11 19:41
Thanks for your blog. I also want to share some information with those who are looking for a new home in California, then please contact us. we are an innovative realtor of housesofpayne to help you to sell and buy homes, find the value of your home for real estate project anywhere in California or ca.Visit for more information on:https://housesofpayne.com/your-homes-value/
Alex Banks Email Homepage
2021-5-15 06:16
We are the third party ESET Antivirus Customer Support providers. ESET offers full protection for small and medium businesses and individual consumers around the World.ESET offers full-scale security for PC and Mac computers. If you are facing any type of errors our service providers are 24/7 available to solve customer queries.feel free to dial our ESET Antivirus Tech Support Number (806) 304-3832 .https://antivirussupporthelpdesk.com/support-for-eset-antivirus
Alex Banks Email Homepage
2021-5-15 06:16
ESET is a popular name in the antivirus industry. It’s most reliable security solution range includes: ESET NOD32 Antivirus, ESET Smart Security, ESET Online Scanner & ESET Family Security Pack. The software is equipped with unique scanning features with high detection capabilities and low disk storage.Situations occur when ESET users start facing one or the other problems related to scanning, activation of product or configuration errors, even with most reliable ESET NOD32 antivirus. In this scenario you can call reliable technical support which is available available 24/7 via online help & telephone support. We have the best technical support team that have an expertise in the ESET product range and help you resolve any technical issues instantly over phone. We will help you in configuring the right settings for your antivirus so that you can get better security from virus, malware & online thefts. All you need to Contact our Eset Antivirus technical ☎️(806) 304-3832 customer support number to get instant help from expert in the field.
epsonhelpdesk Email Homepage
2021-5-15 12:27
The Epson Printer Offline Error can stem due to some glitch in the printer, wireless network, or computer. You could try running a nozzle print to check whether the issue is with the computer or not. If the nozzle pattern is fine, it means the most probable cause of this issue is some error in the computer. https://www.epsonprintersupportnumber.com/blog/how-to-bring-an-offline-epson-printer-online/
bhumikamalhotragoa Email Homepage
2021-5-18 16:07
At Bhumika Malhotra, only the best Goa escorts are available here, and they are here to provide their clients with the most exciting experience possible. They have a wide number of girls who can appeal to all of our customers' needs. To know more, visit the website.
assignment help uk Email Homepage
2021-5-20 12:13
Are you too busy to work on an assignment? or finding assignment help to complete the project, but you dont understand the topic? Sometimes you are just too tired from all the classes and exams, so an additional assignment was the straw that broke the camels back. If you encounter any obstacle with paper help there is only one reasonable solution: hiring an assignment writing services.The fact that you can get professional Essay Helper with your assignments goes to your advantage: you can always get the projects you need without missing the deadlines your professors imposed. No one will ever know that you relied on an expert writer, so you wont put your grade and academic record at risk. On the contrary; youll get a high grade and you will improve your own skills and knowledge in the topic you&rsquo;re supposed to work on
vicky Email Homepage
2021-5-22 16:20
http://www.simranpatel.info/chittoor-escort.htmlhttp://www.simranpatel.info/east-godavari-escort.htmlhttp://www.simranpatel.info/guntur-escort.htmlhttp://www.simranpatel.info/kadapa-escort.html
office.com/setup Email Homepage
2021-5-24 15:45
Office.com/setup Home student 2019 is a collection of all Microsoft application software. In this, Word, Excel, PowerPoint, Outlook, and One Note are all included. It is an upgraded version of a previous version. You can get many features like Researcher in word, Designer in Power Point, Editors options. To begin the process of Office setup home student 2019, user should have an office account and office product key.  After that user will be able to complete the process of download, Install office home student 2019. Microsoft work came first into existence in 1983 initially for MS DOS OS.  https://officehomestudent2019.mypixieset.com/GEU
mj Email Homepage
2021-5-25 10:54
Disney Plus is a one-stop shop for all of your favorite Disney shows and movies. There’s plenty of programming from Pixar, Marvel Studios, and the Star Wars world, in addition to Disney is the most popular subscription channels in the world.DisneyPlus.com/begin  
Office.com/setup home & student 2019 Email Homepage
2021-5-25 10:56
Office.com/setup Home student 2019 is a collection of all Microsoft application software. In this, Word, Excel, PowerPoint, Outlook, and One Note are all included.Office.com/setup home & student 2019  
Office.com/setup home & student 2019 Email Homepage
2021-5-25 10:57
To begin Office.com/setup home & student 2019, office account and office product key both are required. Users need to activate the office product key online with Microsoft Account at URL Office.com/setup. Office.com/setup home & student 2019  
Office.com/setup home & student 2019 Email Homepage
2021-5-25 10:57
To begin the process of Office setup home student 2019, user should have an office account and office product key.  After that user will be able to complete the process of download, Install office home student 2019.Office.com/setup home & student 2019  
block chain Email Homepage
2021-5-25 15:51
Hi, I am Kevin Booth, currently working at blockchain support. We are an independent third-party blockchain support provider. If you facing any issues while creating your new Blockchain account or while managing an old blockchain account, simply contact us at the <a href="https://www.blockchainsupport.co/">blockchain customer support number</a> and experts will resolve your issue.
block chain Email Homepage
2021-5-25 15:52
Hi, I am Kevin Booth, currently working at blockchain support. We are an independent third-party blockchain support provider. If you facing any issues while creating your new Blockchain account or while managing an old blockchain account, simply contact us at the blockchain customer support number and experts will resolve your issue.https://www.blockchainsupport.co/
Alex012 Email Homepage
2021-5-26 16:23
The Bespoke Group of Entrepreneurs (Bespoke-G-Ent) is a community of like-minded people that interact over startups, networking and trends. Our products are there to serve the needs that an every day entrepreneur may incur. Be it networking, style, productivity or health. We also have an eco-friendly selection.<a href="https://www.bespokegent.com/">Read More</a>
jamesalter Email
2021-5-26 18:14
In addition to that, the airline has set up offices so customers can help themselves by visiting the office. Delta Airlines Office in Podgorica could be easily located and the manager and the rest of the team present in the Delta airlines  office in Podgorica are professional and can be reached out easily.
microsoft365.com/setup Email
2021-5-27 16:37
Get Microsoft 365 setup by visiting microsoft365.com/setup. Sign in to Microsoft account, enter the product key and get apps quickly. Microsoft 365 is the best way to get all the apps of Office within one subscription. In case you are trying to log in at microsoft365.com/setup, you can use the other accounts like OneDrive, Outlook.com, Skype, or Xbox Live (if you already are using any of these services). Download & use Microsoft365 setup wizard using microsoft365.com/setup site, follow instructions and install apps.
office.com/setup home student 201 Email
2021-5-27 16:38
Microsoft office.com/setup home & student 2019 is the software pack for students and families. Installing office.com/setup home student 2019, you also have the option to download Home student 2019 apps separately.
分页: 25/55 第一页 上页 20 21 22 23 24 25 26 27 28 29 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]