[文章作者:张宴 本文版本: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) | 阅读(185097)
Conceptkart Email Homepage
2022-11-28 18:16
<a href="https://conceptkart.com/">Concept Kart™</a> offers a wide range of gadgets. Our collection includes <a href="https://conceptkart.com/collections/in-ear-monitors">In Ear Monitors</a>, headphones, Amps & DACs, keyboard cases, and many smart gadgets. We are an authorized seller of products from brands to provide you with the best service possible.
top call girls in lahore Email Homepage
2022-11-28 19:32
We arranged an immense collection, which contains 5 major categories of escorts in Lahore. In our opinion, everything matters because you can’t convince a mango-lover happy by offering him apples. Something like this applies to escort services also. https://lahoreonlinegirls.com/
top call girls in lahore Email Homepage
2022-11-28 19:32
We can either conduct gentle and genuine call girls in Lahore or plan an in-call stay with housewife Call girls in Lahore. Isn’t it cool or sounds interesting?https://lahoreonlinegirls.com/
Aerocity Escorts Email Homepage
2022-11-30 13:19
Hello Gentlemen! How Are You? We Hope You All Are Good. Welcome To The Finest Aerocity Escorts Agency Available In Delhi. We Are The Leading Aerocity Escort Offering Sexy Call Girls At Affordable Prices. Here You Can Find Hot High Profile Ladies Who Are Looking For Men To Have Unforgettable Sexual Pleasure.Most Of The Men Are Looking For Some Sexual Pleasure With Hot Babes In The City. Sex Is The Basic Need Of Humans And To Completes All The Demands Of People We Are Here To Help You. Our Aerocity Escorts Service Are Known For Devoted And Exotic Female Models. So Don't Waste Your Time If You Want To Enjoy The Wild Sensual Life With Hot Girls. A World Of Most Devoted And Miraculous Gratification From The Queens Of Seduction Is Here.
vigrxplusuk Email
2022-11-30 15:47
Vigrx Plus is an additional supplement to increase sexual stamina which is made from natural herbal ingredients and has been clinically tested to be safe for consumption.
vigrxplusuk Email
2022-11-30 15:49
Vigrx Plus is an additional supplement to increase sexual stamina which is made from natural herbal ingredients and has been clinically tested to be safe for consumption.
karachi vip call girls Email Homepage
2022-12-1 15:35
Are you looking for the right girl? Call Girls In Karachi are waiting to be discovered. Give us a call today!
meghanewgirl1 Email Homepage
2022-12-7 14:52
Hi, I'm Megha Malik independent escorts in delhi! What I could say about me? I’m nice Indian girl who likes to enjoy the life, and I think that I have been done that very well. I like spend nice time with peoples always with good, positive energy and fun. I like to make peoples happy. I think that is my talent in this world. And I’m very happy in what I do. I’m expensive because I offer to you a unique and a exclusive service and experience.Indepednent Escorts in Delhi
miketaylorsg Email Homepage
2022-12-7 17:37
No one can deny that assignment doing is not an easy job but to maintain a good academics, you need to focus on the questions given in the assignment and then only after the completion of assignment you will be able to score well in your academics which is no doubt very necessary for you. So, simply you can hire a genuine expert who will assist you in completing your assignment in the perfect way and also you will be able to score well in your assignments which will be done by taking help for Accounting Assignment Help.Accounting Assignment Help
lovely Email Homepage
2022-12-17 19:57
CHIEF ESCORT AHMEDABABhttps://www.aditipatelescort.com/<a href="https://www.aditipatelescort.com/">Escort in Ahmedabad</a>
swetygera Email Homepage
2022-12-19 15:05
Welcome to the most reliable and trustworthy raipur escorts. A large number of individuals are still deprived of us so it's a short preamble that will elucidate us absolutely. So guys we come up with the supreme and finest addition of charismatic, elegant, and eye-pleasing raipur escortHere's a huge amount of captivating and stylish young raipur call girls in the town and they keep the search for companions for having fun. Our services weren't able to do astound among the pleasure seekers in the starting days but couldn't break us. Libertines started to show enthusiasm into our provisions with the second year so we add some more kinds into our collection.raipur escorts service are strictly trained to satisfy or handle each client they receive gently. There are the four categories mentioned below which are recently available here. You guys can take the pleasure of all these several services obtainable in raipur.
Alisha Khan Email Homepage
2022-12-19 16:48
Lahore is home to some of the hottest and sexiest young escorts and call girls that you can find anywhere. If you're looking for a night of passionate fun, then look no further! In this blog post, we will be discussing the top 5 Lahore young escorts and sexy call girls that can fulfil your desires. From their amazing looks to their unparalleled skill sets, these ladies are sure to make your night unforgettable. So, without further ado, let's get started!
Alisha Khan Email Homepage
2022-12-19 16:49
Lahore is home to some of the hottest and sexiest young escorts and call girls that you can find anywhere. If you're looking for a night of passionate fun, then look no further! In this blog post, we will be discussing the top 5 Lahore young escorts and sexy call girls that can fulfil your desires. From their amazing looks to their unparalleled skill sets, these ladies are sure to make your night unforgettable. So, without further ado, let's get started!
Noida Queens Email Homepage
2022-12-20 18:46
Hi, I am Noida Queens staying in Noida. Earlier I had started working as noida escorts. Currently I have my own agency for noida escort and all over Delhi NCR.Noida Queens is the most popular noida escorts service and whole Delhi NCR. You will get 100% satisfaction from our noida call girls. They are very very open minded. You can take them for a Romantic Night, Bachelor Party, Pool Party, Water Park, Disco, Pub, Long Travel, For a cinema etc and they will give you company in each and every single moment that you will enjoy the best moment of your life.
Mumbai Escorts Email Homepage
2022-12-22 21:10
Hello! I'm Nivedita. Do you feel your heart is still beating to be a part of Mumbai call girl service? Your happiness will be completely satisfied by me. Since I'm the most attractive and gorgeous girl out of all the women in Mumbai. My dark eyes are a nightmare at the first glance escort services in Mumbai.
escort Pathankot Email Homepage
2022-12-25 13:55
Pathankot escorts will this it's a haven of Pathankot call girls meeting with hot n beautiful call girls in Pathankot contemporary ladies, the whole best technique to become familiar with state or a rare gap to become Pathankot escorts to what the streetgirls escorts Indian soul is? Whichever your Pathankot escorts is, regardless of the motive due your visit to state, we have a tendency to be bouncing to welcome you to our Female Escorts in Pathankot Call Girls Service we have a tendency to are the people agency will perceive your needs besides will Pathankot escorts them, not simply bring Pathankot escorts the bacon your provides nonetheless whole then real with a intensity, original power and an image in atmosphere of solicitation. You, as a client, are thane model escorts to choose any of the shoppers as per your high-quality and low-cost. Status like state woman of the house is luxurious and should cut a hole in your compact if you're not in fiscal matters solid. On the opposite hand, there also are regular, agency are accessible at cheap Pathankot escort service. In case, you've Pathankot escorts a taut low-cost, then you'll be able to drive for these models.Always book genuine and trusted Pathankot escorts girl and models! Save more cost and get full enjoymnet ay most competitive pocket budget. So get ready for the love and fun tonight!.
poojakalra Email Homepage
2022-12-31 17:27
We are confident that being alone is the last thing you want to do when you are in Ahmedabad. Finding an Escorts Service in Ahmedabad that can provide you with what you want is the easiest way to prevent this. Price, appearance, and service are important factors to take into account while looking for the ideal Indore Escorts. Since Ahmedabad is a well-liked tourism destination with a variety of attractions for visitors from all over the world, it's a terrific way to enjoy life. We advise you to try Pune Call Girls in order to enhance your enjoyment of your stay in this city. One of the most stunning cities in the world, Ahmedabad is renowned for being a center for culture and the arts.
chandru Email Homepage
2023-1-4 15:56
sleep apnoea treatment chennaiHi! This is a nice article you shared with great information. Thanks for giving such wonderful information. I hope you will publish this type of post. Also, check my website.Visit here: - https://thanchospital.com/
kuhal Email Homepage
2023-1-4 16:09
Medicare Clinic is a full-service dental practice committed to providing exceptional care for patients of all ages. Our team of experienced and compassionate dentists and hygienists offer a range of preventive, restorative, and cosmetic services.Laparoscopic Surgery in Chennai
kuhal1123 Email Homepage
2023-1-4 16:11
roller blinds manufacturers chennaiWe are a leading provider of home furnishings services based in Chennai. We understand the importance of having the right look for your home, so we will not let you worry about our services. Visit Curtains and blinds in chennai. Our customers are important to us and we provide top-quality services at a reasonable price.
分页: 44/57 第一页 上页 39 40 41 42 43 44 45 46 47 48 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]