[文章作者:张宴 本文版本: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) | 阅读(185802)
xcxc Email Homepage
2021-7-31 19:32
I'm genuinely astonished about the data you give in your articles. I should state am particularly overwhelmed by your whole story. It is hard to getone such site that licenses Microsoft Office customers to viably Introduce, Arrangement and Enact Office on their Macintosh or Windows system. To download the plan customers essentially need to enter their Item key on the webpage and trust that the record will download.The presentation of Microsoft Office has been a leading jump forward. Over the new numerous years, Office saw some critical updates with the expansion of new features no matter what, and the latest Office Arrangement available today is 2019, which can be downloaded from  and moreover the latest structure has four varieties – Microsoft Office Home and Understudy, , Home and Business.Sign In or Make another Microsoft Record.https://mcafee-activation.com/mcafee-total-protection/
Pogo Customer Support (806) 304-1513 Email Homepage
2021-8-2 18:05
How to Contact Pogo Games Customer Support (806) 304-1513 Pogo games is a popular gaming platform having a clientele of 5 million registered users encompassing Free Users as well as Club Pogo Members. With such a huge customer base it becomes crucial to have well-functioning customer service. While it is necessary, nonetheless reaching out to them becomes a challenge for various users. So we shall provide ways how to reach out to Pogo games customer support and get the required assistance.https://www.pogo-support-number.com/blog/contact-pogo-customer-service/
Pogo Customer Support (806) 304-1513 Email Homepage
2021-8-2 18:06
How To Contact Pogo Customer Service ? (806) 304-1513 Pogo games is a popular gaming platform having a clientele of 5 million registered users encompassing Free Users as well as Club Pogo Members. With such a huge customer base it becomes crucial to have well-functioning customer service. While it is necessary, nonetheless reaching out to them becomes a challenge for various users. So we shall provide ways how to reach out to Pogo games customer support and get the required assistance.
pawan Homepage
2021-8-3 00:05
VPN Proxy Master Pro application masks your true IP address and location, encrypt your internet traffic, secures you from public Wi-Fi and helps unblock sites and apps on your Android phone so that you can access any restricted content, connect safely and anonymously.Our servers ensure high availability, security and anonymity of VPN services.<a href="https://play.google.com/store/apps/details?id=com.vpnproxymaster.pro"> VPN Proxy Master</a>
jackbuffett18 Email Homepage
2021-8-3 17:14
I obligation of appreciation is all together for offering such edifying web diary to us. I should state you are an incomprehensible writer, I love the way that you. Mcafee.com/activate | Office.com/setup
Shalini Kaur Email Homepage
2021-8-5 18:47
Andheri escort and it is never ever resting celebration at luxury resort hotels made the town money of activity. To select an ideal genuine escort or agency online is the same as finding water in the sand, everyone imposes Escort Service Andheri about is sincerity and a great attitude to consumers that is brand new in town and blindly trusting Andheri escorts list every time. To get Andheri Hi Profile escort can is a much better solution for initial escort seekers because in this area agency provides upscale models. Once again I do want to remind you that a trusted agency in Andheri is providing escorts that are real when you are for HI Budget Profiles. Andheri Escort Agency may charge 15k to 50k or above range for genuine escort shots. At a high spending plan escort agency, you could get hot & sexy model girls with gorgeous curves.Popular places of Mumbai Call Girl:- Escort Service in Andheri || Escort Service in Bandra || Escort Service in Juhu || Escort Service in Malad || Escort Service in Powai || Escort Service in Vashi || Escort Service in Airoli || Escort Service in Borivali || Escort Service in Chembur || Escort Service in Churchgate || Escort Service in Colaba || Escort Service in Dadar || Escort Service in Dahisar || Escort Service in Dharavi || Escort Service in Ghatkopar || Escort Service in Gorai || Escort Service in Goregaon || Escort Service in Grant Road || Escort Service in Jogeshwari || Escort Service in Kandivali || Escort Service in Khar Road || Escort Service in Kharghar || Escort Service in Kurla || Escort Service in Lokhandwala || Escort Service in Mahim || Escort Service in Marine Lines || Escort Service in Marol || Escort Service in Mira Road || Escort Service in Mulund || Escort Service in Naigaon || Escort Service in Nalasopara || Escort Service in Navi Mumbai || Escort Service in Nerul || Escort Service in Sakinaka || Escort Service in Sion || Escort Service in Vasai || Escort Service in Versova || Escort Service in Vile Parle || Escort Service in Vasai Virar || Escort Service in Wadala || Escort Service in Worli || Escort Service in Mumbai || Esort Servise in Belapur ||
gurutech00 Email Homepage
2021-8-9 13:37
We are a prominent organization involved in rendering IT Services. Our services are cater to different sectors at cost-competitive prices as per the suitability and requirements of the clients.We offer high quality services that match the expectations of our customers.Best possible solutions keeping in mind the clients' strategic business interests and risks involved.Highly reliable, effective and can be implemented as per the specifications provided by the clients.Skilled and talented professionals with immense industry experiencefor more info contact best android app development company in jaipur
gurutech00 Email Homepage
2021-8-9 13:44
We are a prominent organization involved in rendering IT Services. Our services are cater to different sectors at cost-competitive prices as per the suitability and requirements of the clients.We offer high quality services that match the expectations of our customers.Best possible solutions keeping in mind the clients' strategic business interests and risks involved.Highly reliable, effective and can be implemented as per the specifications provided by the clients.Skilled and talented professionals with immense industry experiencebest android app development company in jaipur
gurutech00 Email Homepage
2021-8-9 13:44
We are a prominent organization involved in rendering IT Services. Our services are cater to different sectors at cost-competitive prices as per the suitability and requirements of the clients.We offer high quality services that match the expectations of our customers.Best possible solutions keeping in mind the clients' strategic business interests and risks involved.Highly reliable, effective and can be implemented as per the specifications provided by the clients.Skilled and talented professionals with immense industry experiencebest android app development company in jaipur
david230 Email
2021-8-10 18:02
Malaysia Essay Help is highly useful, as the tutors and assignment writers from our firm have full knowledge of the various university standards and syllabus. We have solved paper help that are perfect solutions to your requirements and can be used by the students as the reference. Our tutors help the students in realizing the potential you have by guiding you through the correct process and helping you in My Assignment Help according to the rules of your college.
amelia Email
2021-8-12 13:50
How to Set up Microsoft Office with Product Key at office.com/setup                  Steps to setup Microsoft Office at microsoft365.com/setup  are:Visit www.office.com/setup and follow the on-screen instructions  activation link.Sign in to your Microsoft account or to manage your Microsoft products’ subscription, create one.Enter your product key or code and click Next.When your account successfully associated with the key, you’ll see the page “My Office account“.Now, Select Install and follow the on-screen instructions.
ap.setup Email Homepage
2021-8-18 18:20
<a href="https://apsetup.net/">Ap.setup Wifi range extender </a>Ap.setup Wifi range extender using ap.setup is an offline web page. You can simply setup your WIFI extender via 192.168.10.1. The best thing you can do to extend the range of WI-FI extender by installing it as a companion for range to your existing <a href="https://apsetup.net/"> wireless router.</a><a href="https://apsetup.net/galaway-wifi-extender-setup/"> GALAWAY WIFI EXTENDER SETUP </a><a href="https://apsetup.net/what-is-the-aigital-wifi-repeater-setup/">How to setup Aigital Wifi repeater setup? </a>
Mevin Smith Email Homepage
2021-8-20 13:22
The issues might include, user unable to access the company file that lost and unable to recover it. In this article we are going to discuss on some of the  QuickBooks common Enterprise errors, along with their troubleshooting.
Camera Setup Email Homepage
2021-8-26 15:12
<a href="https://camera-setup.net/">Camera login through an application is a simple choice that companies have opted for instead of the old browser setup. Moreover, brands like Nest, Arlo, provide both applications based and web-based login through my.arlo.com, home.nest.com and ytechnology.com. However,  Ring, Foscam, Zumimall, Tethys, Amcrest, etc provides only an App-based setup. </a><a href="https://camera-setup.net/arlo-camera-setup/">how to sync arlo camera </a><a href="https://camera-setup.net/arlo-camera-sync-button-not-working-2/">arlo sync base station sync arlo camera </a>
aman Email Homepage
2021-8-31 00:33
https://myapkdownload.co/sms-bomber-apk-download-for-android/
nimakrikken Email Homepage
2021-8-31 14:06
https://facebook.contactnummernederlands.com/
marisevijgen Email Homepage
2021-8-31 17:12
https://amazon.contactnummernederlands.com/https://amazon.contactnummernederlands.com/
marisevijgen Email Homepage
2021-8-31 17:12
https://amazon.contactnummernederlands.com/https://amazon.contactnummernederlands.com/
marisevijgen Email Homepage
2021-8-31 17:13
https://amazon.contactnummernederlands.com/
microsoft365 Email
2021-9-4 15:57
Use your Microsoft account through microsoft365.com/setup for everything you want to with Microsoft 365. Create an account or use the account of services such as OneDrive, Skype, Outlook, or Xbox Live. Use the site microsoft365.com/setup to download and install Microsoft 365 setup that will allow you to use multiple apps like Word, Excel, OneNote, PowerPoint, or more.
分页: 29/57 第一页 上页 24 25 26 27 28 29 30 31 32 33 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]