[文章作者:张宴 本文版本: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技术 | 评论(1138) | 引用(0) | 阅读(185144)
Satish230
2022-1-14 17:19
Digital marketing leverages digital tactics and channels to connect with existing and potential customers. It helps businesses grow, garnering sales, leads, and revenue. Digital channels include owned media {such as websites}, earned media {such as user-generated content}, and paid media {SMO Company in India} Compared to traditional marketing, with Digital Marketing Company in India we can reach a targeted audience and measure the success of our efforts.Digital marketing services are carried out by passionate marketers and certified professionals who are adept at all the different kinds of digital marketing. A strong digital presence drives awareness and engagement, new customers, and repeat purchases. SEO Company in India should be ROI-driven, by choosing the marketing mix and strategies most suited to your needs and objectives.
annybank Email
2022-1-14 20:25
Would you mind to get served by a global leader of Assignment Helper? Of course not! Take a moment and get onboard to our World class assignment help writing services ata cost-effective price. Our writers serve to various locations & requisitions not only for Assignment Makers but also for Programming Help & many more & they equally understand the importance of time and relevance of assignments. Both factors are essential to score good marks in your work but for that, you needto put your effort and time. If you have any issue or want to connect with  experienced best assignment help or search for someone to receive help with my assignment, you must visit our website.
Grow With Grades Email Homepage
2022-1-18 19:00
Amazing work. If you need assignment help while in university, I highly recommend that you choose GWG.  https://www.growwithgrades.com/assignment-help
tomas Email Homepage
2022-1-21 17:39
https://www.brandsnbehind.comProviding the best and in the given time frame at advertising company has helped us in increasing our credibility in the market. We are a team of creative yet smart people who understand the importance of performing and implementing innovation in work.
Lizakhan Email Homepage
2022-1-25 00:54
Hello there, gentlemen. My name is Joya khan , and I am a 22-year-old independent call girl and scientific college student. I tell you that I am well-versed in the concept of pleasure and that you will have a delightful time with me. For all forms of erotic massages, I am a qualified masseuse and therapist. I am possibly the most passionate and opulent person you will ever meet.  https://delhiescortservices4u.comhttps://delhiescortservices4u.com
guru Email Homepage
2022-1-25 20:27
Nadi Astrology is an ancient super science that sheds light on the journey of your soul and helps you understand your past, present, and future.
RIYA Email Homepage
2022-1-27 17:19
Hey sweetheart! Wants me near you, I am Riya Patel here to spend the night with you. I am a young female escort from gurugram escort /Delhi/ noida-escorts service. I have various techniques to deal with your night freak. I am passionate and hot Model who always giving you desire & fun enjoyment just as your need. gurugram escortescort in manesarescorts in chanakyapuriescorts in paharganjI am Riya Patel Models Escorts in Delhi & VIP, we are working with top VIP models “Escorts Girls in Gurugram/Delhi” call us +91-9818604831 for the booking escorts girls available for your entertainment in gurugram escort /Delhi/ noida-escorts and here deals VIP, High-profile, Indian Escorts and Russian Escorts girls.escorts in saketescorts in sushant lokescorts in vasant kunjfaridabad escortsIt’s hard to spend time alone with a beautiful, smoky hot Escort. That’s why we make sure you use your precious time collectively. If you are single and looking for some illegal entertainment, you can meet our free escorts in gurugram escort /Delhi/ noida-escorts and have a great time. Our independent Gurugram escort services will spice up your gold assembly.greater kailash escortindirapuram escotrrohini escort servicesohna escortsvasant vihar escortnoida-escortshttps://gurugramescort.com/
ij scan utility Email Homepage
2022-1-29 17:23
IJ Scan Utility is software for your Windows and Mac operating systems that assists you to perform scanning of your photos and documents quickly. It supports an uninterrupted scanning of your data with just a few clicks of your mouse.  ij scan utility |ij canon scan utility
olivilajhon08 Email
2022-2-2 19:25
The wireless and wired models require drivers and software; therefore, each has to undergo one important installation process. If your printer model isn’t set up yet, you can get started now.  https://istartsetup.com/https-ij-start-cannon/https://www.ijstartca-none.org/
luna Email
2022-2-3 12:39
Ij scan utility comes packed with interactive features to ease your scanning for an unmatched experience.It also offers you to incorporate with such third-party applications and software by exporting your scanned items to the required service.ij scan utility  | ij scan utility download  | ij canon scan utility
Canon IJ Network Tool Email Homepage
2022-2-3 12:45
      Canon IJ Network Tool  is a toolkit software with the options to keep a check on most of your Canon printer network settings and adjust them according to your requirements. The Canon IJ Network tool will get you through the network settings uninterruptedly.      Canon IJ Printer Utility    is a complete software package meant to adjust and modify the configurations of your printer device as per the requirement.
Canon IJ Printer Utility Email Homepage
2022-2-3 12:46
     Canon IJ Printer Utility    is a complete software package meant to adjust and modify the configurations of your printer device as per the requirement.
rimajha Email Homepage
2022-2-3 14:38
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 themhttps://www.escortsserviceingurugram.co.in/escort-service-in-gurgaon-about-us/
nishatrivedi Email Homepage
2022-2-3 15:28
https://www.modelinmumbai.in/ajmer-escorts.html
nishatrivedi Email Homepage
2022-2-3 15:30
Good day, lads! I'm Nisha Trivedi, a tall and skinny brunette model and first-class Cash Payment Escorts Service in Ajmer who is 21 years old. I'm just what you need to unwind; when you're with me, you'll forget about the rest of the world.
pinkijha Email Homepage
2022-2-3 15:51
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/
Islamabad Escorts Email Homepage
2022-2-3 16:18
The reality and availability of Islamabad’s prostitution services have provided a solution to reduce people’s stress and have provided a new hope of means as a source of income. There is also intense standard competition in today’s market for the Islamabad Call Girls service. You can choose one of the hundreds of escort agencies where thousands of Call Girls, women, and men work vigorously every day.
Call Girls in Islamabad Email Homepage
2022-2-3 16:19
Our team would like to welcome you to visit our site warmly. Here you will have the opportunity to book hot Islamabad escorts waiting for you to give you a sexy time. We are known for offering the best private dates and hotel fun for people who come to this beautiful city. You will have a perfect dating experience that will not please you but will allow you to chase away the loneliness and stress of life. The primary mission of our agency is to satisfy the fantasies of all clients in the most brilliant way. Our team appreciates that you trust us and that you spend your hard-earned money on girls with class. These Islamabad prostitutes will turn all your dreams into reality now! You need to make a quick call to reserve them.
call girls in karachi Email Homepage
2022-2-3 16:19
Escorts in karachi is a high-class escort catalog in karachi. Discovered the best private escort administrations and provocative escorts around karachi. Those looking for the genuine class will settle with our exquisite models beyond a shadow of a doubt. Those looking for an assortment will have their dreams with every one of the Escorts in karachi first-class accompanies love to work with fine, cordial, and adoring model escorts that are accessible in our registry. This site was made only for you – to peruse the best, circumspect tip-top model escorts.
Best Pakistan Escorts Email Homepage
2022-2-4 14:46
Whether it's going for a private appointment or a high-end meal on a VIP occasion, every impressive escort here is the perfect ally for your day and night. Combining eloquence and insight with a desire to please, our Pakistani escorts are truly invaluable. As per the demand of Pakistan, these young escorts of Pakistan are happy with their work and are determined to help their customers in recovery and pleasant company. <a href="https://chikkahub.com/read-blog/21238">Pubg Lover</a><a href="https://www.torah-haim.com/read-blog/10631">Pubg Lover</a><a href="https://addandclick.com/read-blog/39918">Pubg Lover</a><a href="https://www.plingue.com/read-blog/8123">Pubg Lover</a><a href="https://cliqafriq.com/read-blog/166364">Pubg Lover</a><a href="https://www.plingue.com/read-blog/8125">Pubg Lover</a><a href="https://9020club.com/blogs/enjoy-yourself-with-islamabad-escorts-9270">Pubg Lover</a><a href="https://network.counselindia.com/read-blog/69968">Pubg Lover</a><a href="https://kaalama.org/read-blog/67119">Pubg Lover</a><a href="https://social.heyluu.com/read-blog/80481">Pubg Lover</a><a href="https://rpmrush24.com/read-blog/10181">Pubg Lover</a><a href="https://catbuzzy.com/read-blog/56618">Pubg Lover</a><a href="https://redsocialgoool.com/read-blog/39514">Pubg Lover</a><a href="https://social.x-vendor.com/read-blog/19853">Pubg Lover</a><a href="https://facesocial.unlockcode4blackberry.com/read-blog/2922">Pubg Lover</a><a href="https://reseau.1mile.com/read-blog/107225">Pubg Lover</a><a href="https://hyvsi.com/read-blog/57706">Pubg Lover</a><a href="https://alumni.armtischool.com/read-blog/6098">Pubg Lover</a><a href="https://acrochat.com/read-blog/88068">Pubg Lover</a><a href="https://laf4e.net/read-blog/2975">Pubg Lover</a><a href="https://www.obee.vip/read-blog/56830">Pubg Lover</a>
分页: 33/57 第一页 上页 28 29 30 31 32 33 34 35 36 37 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]