[文章作者:张宴 本文版本: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) | 阅读(185145)
Assignment Help Uk Email Homepage
2021-12-27 19:59
I was also a student just like you are. I know what it means for a student to write a good assignment. It was during the fall when I had to submit my assignment within a week and I got fever. It was like a chill in my spine. Just the thought of loosing out the assignment deadline made me very nervous. Thanks to Jenyfer. She forwarded me a page Assignment Help Uk  and I clicked it to get land on a page which was to be like a Santa to me. Though they did took a charge, it was a very resonable amount and I was able to get it submitted on time. Although it was on a very short notice, they did charge very resonable. Thought, somebody may need it so I shared it here.
banaswadi escorts Email Homepage
2021-12-28 17:48
ali Email Homepage
2021-12-28 21:58
jobs in pakistan 2022htttps://nokrijoin.com
tenlord Email Homepage
2021-12-29 15:37
Nice post. Your ideas are very helpful. https://www.breziot.com/seo-company-in-auckland.html
ij.start cannon Email Homepage
2021-12-29 20:09
Get started to Canon setup cannon printer you need to start the process with the Easy Wireless Connect method on your MacOs. The canon printer setup site is based on the computer operating system where you can find an online manual and guide.https://istartsetup.com/https://istartsetup.com/ij-start-cannon/
ij.start cannon Email Homepage
2021-12-29 20:10
Get started to Canon inkjet setup with guidelines of ij.start.canon site.  It features a paper tray on its rear side that enables reloading plain and photo paper effortlessly fast. It is compatible with printing on both plain paper as well as photo paper with a glossy surface. It also has a flatbed scanner, and all these features together make the Canon printer a superior printer model. ij.start canon |ij.start cannon | ij.start canon
Larry
2021-12-31 19:34
Assignment Help Service is a well-known coursework help company that provides skilled essay writers to students from all around the world, assisting them with writing difficulties. The website has established itself as the most promising dissertation help online during the course of its more than ten years of existence. You may contact them if you need help with any academic work.
techmatters Email Homepage
2022-1-4 06:37
If you want to know the answer for how to fix HP Printer In Error State. We included some of the best possible solutions to fix the issue. Contact our team and you can find many useful solutions HP Printer In Error State to easily solve your issue.
tomas Email Homepage
2022-1-5 12:27
Newspaper advertisementNewspaper display advertising is a form of newspaper advertisement - where the advertisement appears alongside regular editorial content. Display ads are generally used by businesses and corporations towards promotion of their goods and services and are generally for larger budget clients.
kaviya Email Homepage
2022-1-5 12:29
https://vacuumelevators.co.in/one of the major elevator manufacturers in Chennai, has a variety of elevators that are entirely customisable and allow you to have almost any convenience you can think of.
shruti1116 Email Homepage
2022-1-10 12:50
We provide escort service in Delhi. Offer high profile call girls Service in Delhi at affordable rates. Get ultimate pleasure with our female escorts in Delhi. An Independent Delhi escorts with high profile here for your entertainment and fulfil your desires in Delhi call girls service. Our all Escorts models are belong to hi-fi profile. We have best experience in Female Escorts Service. Hot, beautiful, gorgeous female partner. We are very old, genuine, experienced and trusted escort agency. Book Top quality escorts service in Delhi NCR today.
Niharika Joshi Email Homepage
2022-1-10 15:32
Thanks for the article. Hello everyone, I am Niharika Joshi and I am 21 years old and calling girls Mohali is a model and actress who has acted in many films, TV shows, and web series as well. My sensual movements will amaze you to the hilt tonight. I'm cool and high quality, I love sex and I'm going to show it to you, and you'll hallucinate with all the emotion. In intimacy, I am a true volcano of mischief, sexual arousal, and sensuality. I feel the desire and enjoy the utmost passion with me. I look cute and sexy. Mohali Russian escort, hurricane in bed, I'll make you lose your mind next to me, you're leaving. Our moments will be very inviting and warm, and you will experience with me new sensations. I am ready to share rich sex with you, take you to the escort plane in Mohali of multiple and delicious adventures. I look forward to sharing my powerful orgasm with you, and for both of us to enjoy it to the fullest. I want to experience those sensations that will make me feel your hands, your skin, and your warmth. Escorts in Mohali I are only available to culture and educated gentlemen who know how to treat a girl with love and tenderness. My service does not rush, and you will attend with all the attention and affection you deserve. Mohali escort service is perfect for you, don't miss the chance to call or WhatsApp me now for a hot meeting in Mohali. https://bit.ly/3HcOpH3 // https://cutt.ly/AUXtNxO //
assignment help12 Email
2022-1-10 19:06
Gotoassignmenthelp is team of leading professional writers for assignment help online Writing Services to students all around the world. Contact us today for Best pay for assignment at very affordable price. Under GotoAssignmentHelp we provide many types of help to the students. We are the most reliable assignment helpers. We have gained our specialization after spending most of our times in making ourselves perfect. We providing 100% plagiarism free Assignment Help. At the point when you pick our java assignment help assistance, our faculty will consider the quality and your evaluation criteria.
ij.start canon Email Homepage
2022-1-12 19:34
Get started to Canon inkjet setup with guidelines of ij.start.canon site. Canon drivers fully support and assists for all compatible products for all Window versions. We offer the required data to configure, utilize and install your Canon products on your Windows PC.. ij.start canon |ij.start cannon | ij.start canon
david2303
2022-1-14 16:04
Case Study Help at GotoAssignmentHelp match your study needs across a broad range of subjects. Your Assignment would demonstrate all learning outcomes for that unit and showcase intellectual debate, critical analysis, evidence of original thought Assignment writers and generation of new ideas. Our Homework Help team ensures to read the assignment instructions and guidance notes to avoid fail or lose marks.
david2303
2022-1-14 16:04
Case Study Help at GotoAssignmentHelp match your study needs across a broad range of subjects. Your Assignment would demonstrate all learning outcomes for that unit and showcase intellectual debate, critical analysis, evidence of original thought Assignment writers and generation of new ideas. Our Homework Help team ensures to read the assignment instructions and guidance notes to avoid fail or lose marks.
rubyshah85 Email Homepage
2022-1-14 17:16
这是一条隐藏评论或留言。您需要以合适的身份登入后才能看到。
rubyshah85 Email Homepage
2022-1-14 17:17
这是一条隐藏评论或留言。您需要以合适的身份登入后才能看到。
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.
分页: 32/57 第一页 上页 27 28 29 30 31 32 33 34 35 36 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]