[文章作者:张宴 本文版本: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技术 | 评论(1135) | 引用(0) | 阅读(180439)
icelandholidaypackages Email Homepage
2024-4-4 17:43
if you want to book a international Iceland travel packages or flight tickets so contact us via websitehttps://icelandholidaypackages.com/
Maya Email Homepage
2024-4-4 19:52
I'm sure the first thing that springs to mind when you hear the name Hyderabad is biriyani. However, we are here to present you with something more fascinating. Are you a self-assured man who requires the ideal woman by your side? If so, you've arrived at the ideal location. Since we are the top supplier of gorgeous Hyderabad Call Girl for self-assured men like you. Our ladies can match you for any kind of outing because they are stylish and appealing.
topgirlsfun Email
2024-4-8 19:41
Call girl service in Vijayawada is one of the most luxurious places in Andhra Pradesh, and also the best for those who love to enjoy nightlife with call girls to make their day special and full of fun. Being in the neighborhood of the airport, it is mostly visited by those who are travelers. People also enjoy the luxurious overnight stays and the modern infrastructure and hospitality of those hotels.  Vijayawada Call Girl has multiple options to select the best call girl to spend a good time with.
Mangalore Escort Email
2024-4-17 16:11
Mangalore, also known as Karnataka, is a beautiful city in the state of Karnataka, India. It is famous for its historic landmarks, backwaters, beaches, and delicious cuisine. If you're planning to date a Mangalore girl, you're in for a great time. Mangalore Escorts Service dating girls are known for their beauty, intelligence, and wit. However, they can be quite different from girls from other parts of the world. Here are some tips that can help you date a Mangalore call girls successfully
Rohanrajj Email
2024-4-20 14:14
If you are searching for Moti Nagar Escorts and are prepared to experience the enjoyment of being at Green Park, then our amazing Green Park girls can give you that. Our call young girls are well prepared, thoughtful, and supportive. Our agency will give you elite services in Green Park and give you extraordinary services on the bed.
escort girls in Lahore Email
2024-4-23 01:01
Hiring escort girls in Lahore can be a fun way to explore your sexual desires. In exchange for payment, a call girl offers friendship and intimate services, allowing you to experience genuine joy almost without commitment.https://pakistanibeauty.online/escort-services-and-call-girls-in-lahore/
escort girls in Lahore
2024-4-23 01:02
Hiring escort girls in Lahore can be a fun way to explore your sexual desires. In exchange for payment, a call girl offers friendship and intimate services, allowing you to experience genuine joy almost without commitment.https://pakistanibeauty.online/escort-services-and-call-girls-in-lahore/
escort girls in Lahore Email Homepage
2024-4-23 01:04
Hiring escort girls in Lahore can be a fun way to explore your sexual desires. In exchange for payment, a call girl offers friendship and intimate services, allowing you to experience genuine joy almost without commitment.https://pakistanibeauty.online/escort-services-and-call-girls-in-lahore/
topgirlsfun Email
2024-5-1 20:08
Do you have an unfulfilled dream of erotic fantasies with call girls? Then you should try one of the sizzling teenage Russian Call Girls in Indore .
36rpm Email
2024-5-9 18:02
Looking for the best SEO company in Gurgaon to elevate your online presence and drive organic traffic to your website?. 36RPM is the best SEO Agency in Gurgaon where we provide top-notch SEO Services at a reasonable price. Get in touch right now!https://36rpm.com/search-engine-optimization
awaken chocolate Email
2024-5-22 21:06
Amazing article. Continue the good work this article was very helpful <a href="https://awakenmushroomchocolate.com/"> Awaken Superfood Chocolate </a>
vashicallgirls Email Homepage
2024-5-29 12:15
Vashi Call Girls provides premium services with married (Bhabhi) girls in Vashi. Get the best experience with call girls service Vashi.https://www.vashicallgirls.com
Amritsar Call Girls Email Homepage
2024-5-30 19:27
Our Amritsar Call Girls are breathtaking and unmatched in beauty! For your enjoyment, we offer an abundance of stunning Amritsar brunettes, stunning blonde babes, sexy caramel beauty, and charming women of many cultures and personalities. The majority of our women are Indian call girls who are native to the area and have extensive knowledge of Amritsar. Telling us the address you would like to meet at will allow us to arrange the rest with our Amritsar call girls, all you have to do to enjoy a sensual experience! Usually, we can organize for you to have that same evening with the woman of your choosing. Our call girl agency in Amritsar that offers last-minute dates is ours. Every day, all of the call girls that are available in Amritsar and other places are added to other areas. mahipalpur Call Girl
Laxmi Email
2024-6-3 19:00
From college girls to female escorts, Mumbai Escorts Service, Russian escorts, high-profile or high class escorts to independent escorts, Mumbai has it all. The city of Mumbai always offers more than you can enjoy! The city’s gorgeous canals, refreshing coffee shops, and the attractive girls oft Mumbai Escorts Service will captivate your moment.
kaashi Email
2024-6-6 20:44
You shouldn't worry about having to choose between these women if you're anticipating to go out to bars or parties because they are amazing energy partner. Generally speaking, Call Girls in Pune you can book the desirable young lady of your choosing anytime you want to plan a lively party venue that will give you the night of your dreams.
rakhi Email
2024-6-25 17:31
You've come to the right place if you want to enjoy your daily life but are bored with it. You Can Get Fun Entertainment From Her, A Beautiful Hot Model Call Girl Named Laxmi. Our Govindpuri Escorts Agency are stunning and hilarious; they will treat you like a model, and you will savour their lovely bodies and sexy figure love moments. Our model escorts can provide you with the most romantic sex in whatever situation you desire, as well as comfort from your worries and stress. We want you to enjoy our Govindpuri  escort service, which is why we asked you to invest more money.
Payal Kapoor Email Homepage
2024-7-8 19:53
Our agency provides the best services of the sexy call girls in Chandigarh. If you think that you will find such babes in other agencies or in other cities, then you are wrong. Chandigarh Escortshttps://chdescorts.com
escort lahore Email Homepage
2024-7-13 04:25
Whenever you're coming To Lahore, create a specific Knock regarding Our Doors, and that we can give You the most effective <a title="escort lahore" href="https://escortservicesinlahore.online/">escort lahore</a> Greatest fun.
escort lahore Email Homepage
2024-7-13 04:26
Whenever you're coming To Lahore, create a specific Knock regarding Our Doors, and that we can give You the most effective <a title="escort lahore" href="https://escortservicesinlahore.online/">escort lahore</a> Greatest fun.
分页: 55/57 第一页 上页 50 51 52 53 54 55 56 57 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]