[文章作者:张宴 本文版本: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技术 | 评论(1139) | 引用(0) | 阅读(185772)
Omas Hill Email Homepage
2021-4-1 13:27
Canon IJ printer is an all-in-one inkjet printer that comes with incredible features. This IJ printer allows users to perform multiple tasks using the same device as printing, faxing, copying, and scanning documents.ij.start canon | ij.start.canon |http //ij.start.canon |https //ij.start.canon
Andheri Escorts Email Homepage
2021-4-1 19:32
Sonal Sahni is one of the elite Andheri Escorts. She is one the youngest escorts in this profession. Our Andheri Escorts Agency having great assortment of Escorts in Andheri. Our Andheri Escorts Service is loaded with quality and you will get profound actual fulfillment. So why you are standing by pick you portable and dial our contact number.
Norton support number Email Homepage
2021-4-1 23:42
However, if you are facing certain Norton antivirus issues, there is no need to worry. You can easily get Norton customer help sitting in the comfort of your own home.
david230 Email
2021-4-2 17:07
Are you wondering how you can get your Coursework Help by an expert? At GotoAssignmentHelp it's the easiest thing in the world! These are the steps that separate you from the perfect assignmentIf you need mechanical engineering assignment help, GotoAssignmentHelp is the right place for you. If you check our prices, you’ll notice they are really affordable. Plus, you can always get a discount! That doesn’t mean we’ll sacrifice the quality for the sake of offering a lower price. Thanks to the versatility and capacity of our team, we are able to offer exactly what you need: the best Economics Assignment Help for prices you can afford. Our customer support department is online 24/7. Feel free to contact the agents with any questions before or after hiring our assignment writing service
AHEC Email Homepage
2021-4-6 13:12
A blog is an internet conversation or informative website that consists of isolated, sometimes casual diary-style text entries (posts).Usually, posts are shown in reverse order, with one of the most recent article appearing once at the top of the web page. Until 2009, blogs were typically the result of a single person,[citation needed] or a small group of people, and they usually covered a single subject or issue.In the 2010s, "multi-author blogs" (MABs) arose, which featured numerous authors' writing and were often professionally edited.AHEC's Content writing services aims to provide the "speech" to a website, summarizing what the website is about and explaining what it can offer to its potential customers.https://ahecounselling.com/https://ahecounselling.com/blogshttps://ahecounselling.com/blog/International-Journal-and-Sto...
Ambulance services. Email Homepage
2021-4-6 13:18
GoAid is India’s leading company in providing trustworthy Ambulance services. We are now available in top 18+ cities of India  Ahemdabad, Bhopal, Delhi, New Delhi, Dwarka, Faridabad, Ghaziabad, Gurugram, Jaipur, Lukhnow, Mumbai, Noida, Greater Noida, Pune, Indra Gandhi International Airport, etchttps://www.goaid.in/Ambulance/https://www.goaid.in/Ambulance/ambulance-services-in-delhihttps://www.goaid.in/Ambulance/ambulance-services-in-jaipur
Sikiş Sohbet Email Homepage
2021-4-17 23:03
Yetişkin sohbet, cinsel sohbet, gabile sohbet, dul sohbet, evli bayanlarla sohbet ... siyasi konuşmalara yasa dışı faliyet kontör istemek ve erotik porn ürünlerinin ... Sikiş Sohbethttps://www.sohbet.net
milindajess65 Email Homepage
2021-4-19 16:16
Thanks for this information, it was really helpful and if you would like to get McAfee antivirus for your system you can visit mcafee.com/activate https://www.go-mcafee.com/activate/ in your browser.You can also check how do I recover my McAfee account https://www.go-mcafee.com/blog/2021/01/05/how-do-i-recover-my-mcafee-account/ ?What is McAfee Safe Connect VPN? ( https://www.go-mcafee.com/blog/2021/04/06/what-is-mcafee-safe-connect-vpn/ )
noah cyrus Email Homepage
2021-4-19 16:20
Nice article you have on your website and if you wish to activate Norton 360 security and facing any issue with it, you can check out https://www.thenortonsetup.comYou can also check how do I norton security installing( https://www.thenortonsetup.com/blog/why-is-my-norton-security-not-installing/ )?What is Norton Secure VPN? ( https://www.thenortonsetup.com/blog/what-is-norton-secure-vpn/ )
ava gardner Email Homepage
2021-4-19 16:21
How to Use Microsoft Office on Tablets and Smartphones? ( https://computerlp.wordpress.com/how-to-use-microsoft-office-on-tablets-and-smartphones/ )
surbhirana Email Homepage
2021-4-20 20:30
Surbhi Rana is a newly start providing independent high profile escorts and call girls services in Chandigarh. She is very sexy and hot make enjoy withhttp://surbhirana.com
ganga Email Homepage
2021-4-28 17:17
A digital workplace is a cloud based work platform that lets businesses move work to the virtual space. Such platforms contain all the applications, data, tools and collaboration features employees need to perform work within a secure online interface that they can access from anywhere, anytime and on any device.https://www.infobrez.com/digital-workplace-software
dst Email Homepage
2021-4-28 20:50
it like this article on macrowizhttps://macrowiz.com/
ij start canon Email Homepage
2021-4-29 19:05
I appreciate your content!I've read this post and if I could I desire to suggest you some interesting things or suggestions. Perhaps you could write next articles referring to this article.By following our guidelines it will help to start by yourself and not to depend on technician.The adequate and sans hands setup is there, you just need to pursue the rules as referenced on that page.https://ijstartcanonx.com/
Office.com/setup Home Student 2019 Email
2021-5-3 18:58
Office.com/setup Home Student 2019 Activate Home & Student 2019 using the license code. The Office product key is 25 digits alphanumeric key that you can purchase from a retail store. You can purchase the digital license from online stores as well. Office.com/setup Home & Student 2019
marieorpos Email
2021-5-4 20:44
Gmail not workingWhen your email stops working or gets hacked, don’t panic. Call Email Support Phone Number and let the highly skilled Specialists get you up running. Troubleshooting steps you can try to fix basic email problems:1: Make sure you’re connected to the web.2: Close the app, then reopen it.3: Sign out, then sign back in.4: Clearing the cookies and history of browser5: Check your browser extensions or applications and remove unwanted extensions<a href="https://mail-help-number.com/gmail-not-receiving-email/">Gmail not receiving email</a>
marieorpos Email
2021-5-4 20:46
Pogo.com/sign in problemsCheck for correct User Name or Screen Name. Most of the time we rely on the browser’s auto-complete feature and select wrongly entered screen name in the past.Passwords are case sensitive. Therefore, always check the letter’s cases of the entered password. If possible, type the password as you use in a notepad and then copy and paste the letters in the password field. Below is a list of things you should always check before entering into troubleshooting.1. If any of your family member shares the same account, ask them if they might have changed the screen name or password.2. Look into your email inbox to get the actual screen name when you had registered with Pogo3. If you find any point relevant to your case, you can go to the article explaining how to reset password of your Pogo account and follow all the steps carefully to reset your pogo account password.<a href="https://pogo-supportcenter.com/2020/04/01/fix-pogo-sign-in-issue/">pogo.com/sign in problems</a>
marieorpos Email
2021-5-4 20:47
Brother Printer SetupWe are one of the most reliable, and independent 3rd party printer technical support and service providers, providing 24/7 online or on-call technical support services to the users of brother printer at a very nominal charge. Our printer experts have extensive knowledge to set up brother wireless printer in the simple ways. For brother printer setup, you can call our Brother printer support experts 24/7. <a href="https://mchelperprintersupport.com/brother-printer-support/">Brother Printer Support</a>
marieorpos Email
2021-5-4 20:48
Canon printer support phone numberCanon wireless printer setup is very easy if compared with other available printers in the market. In case of any problem or confusion, canon printer support phone number is easy to get from the supplied manual. Follow canon printer setup process to install canon wireless printer.1. Take the printer out of the box and remove all tapes from it before starting.2. Plug in the power cord, turn on the printer and install the print cartridges. Allow your printer to complete its startup routine, which includes printing of an alignment page (if applicable).3. Go to the manufacturer's website and download drivers for your printer model.4. Install the drivers and follow the instructions during canon wireless printer setup process.5. In the meantime, go to priter's control panel and use wireless printer setup wizard.6. Identify your wifi network and connect the printer to it using its correct credential.7. Complete the wireless printer setup process by connecting to your printer model as it would appear during installation.<a href="https://mchelperprintersupport.com/canon-printer-setup/">canon printer support number</a>
分页: 24/57 第一页 上页 19 20 21 22 23 24 25 26 27 28 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]