[文章作者:张宴 本文版本: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) | 阅读(180457)
mehakbhatthif Email Homepage
2023-4-12 12:12
I read your blog slowly and I found that you did a great job with this writing.https://bit.ly/3LPBGQ9
mehakbhatthif Email Homepage
2023-4-12 12:14
I read your blog slowly and I found that you did a great job with this writing.https://bit.ly/3LPBGQ9
chandigarh escort Email Homepage
2023-4-13 19:36
These Naughty Babes Know Each And Every Act Along With Chandigarh Escort Poses While Making Sexual Love With You At Your Place And Without Any Problem, They Will Go With You Anywhere So That All You Get Is A Suitable Place To Get Some Hot, Naughty And Sensual Love Done Properly. Chandigarh Call Girls WhatsApp Number Service Are Known To Meet New People Who Are Font Of Educated Call Girls And Love To Talk Them In English.
avleens kaur Email Homepage
2023-4-15 18:02
Welcome to Avleens Kaur, Call girls in Mohali where you will enjoy your night life with beautiful Escorts girls in Mohali. If you want to see how so sexi model girls spend their nights, especially those who like to party late at night and want to enjoy their sexual lives day and night. Meet our wonderfull Call Girl in Mohali universe of imagination where you can enlist wonderful Escorts service in Mohali. Our Foreign Mohali Escort Service is the best High - Class Mohali Escort Agency supplier. Our Mohali escorts service are so all around prepared and tasteful that they cast an impact on the brains of the customers. If you ever feel lonely and want to spend a lot of time with a partner, you can definitely contact us. When you meet our Mohali call girls. It's a lot of fun to do anything with hot and sizzling young women by your side. Our online photos of hot local & Russian girls are current and photos are 100% real. Guaranteed 100% satisfaction, the best high class companions, strippers, provider, erotic entertainment, and adult entertainment!
Escorts in Islamabad Email Homepage
2023-4-17 13:31
Unlike your average fling, an escort is a professional relationship. In this guide to escorts in Islamabad, we'll explain what an escort is and what you can expect from one.
Hot Call Girls in Islamabad Email Homepage
2023-4-17 13:58
Getting to know the rich and famous people of Pakistan may be easy, but finding out where to find them may prove tricky. Not to worry though, you can always rely on our call girls in Islamabad.
Escorts in Islamabad Email Homepage
2023-4-17 14:23
If you’ve ever thought, “Hey! I’m such a good escort!”, then make sure you read this article. It’s full of information about escorts in Islamabad, and the best way to get them. This is the most honest guide you’ll find online.
Call Girls in Islamabad Email Homepage
2023-4-17 14:50
Want to be one? Live the life of a low-profile call girls in Islamabad, Pakistan. You'll learn what it takes to become a top escort, how to talk to potential clients and the best places to meet. Whether you're a first-timer or a veteran escort, this guide will show you how to make it big in the adult industry.
Escorts in Lahore Email Homepage
2023-4-17 19:24
When travelling to foreign countries, you may have read about all the crazy things that can go wrong, but what about here in Pakistan? We've heard stories of scary escorts in Lahore, but have you ever wondered why?
Lisa Bennet Email Homepage
2023-4-19 17:26
Services like, Do My Online Course for Me, have gained popularity among students who struggle with the demands of their academic coursework. These services offer a convenient solution for students who may face challenges in managing their coursework due to various reasons, such as a heavy workload, personal commitments, or other responsibilities. Online services are offered by professional experts who complete the entire course on behalf of the student, covering all assignments, exams, quizzes, and other coursework requirements. These services are available for a wide range of subjects and academic levels, including high school, college, and university courses. They offer personalized assistance, tailored to the specific requirements of the course, ensuring accurate completion of assignments and exams. Students can also communicate directly with the experts, providing input and feedback to ensure that the coursework is aligned with their learning goals. These services can be a valuable resource for students who need to balance multiple responsibilities, allowing them to focus on other priorities while still ensuring that their coursework is completed effectively. However, it's important for students to use these services ethically and responsibly and to comply with their institution's academic integrity policies. These services should be used as a tool for academic support and not as a shortcut to avoid learning and understanding the course material.https://takemyonlinecourseforme.com/
메이저사이트 Email Homepage
2023-4-20 15:27
I think the articles on this blog are very good and informative. Thank you for letting me know about 메이저사이트 that is hard to come across. Please share your thoughts in the future. Hope to see more information.
Richa Yadav Email Homepage
2023-4-21 20:10
Hire a Guwahati escort service to give you the time of your life! These lovely ladies are experienced in providing unforgettable pleasure, and they'll make sure that you have a fantastic time. https://ct.streetgirls.in/guwahati-escorts-service
pay for online class Email Homepage
2023-4-22 09:56
It's always important to exercise caution and verify the legitimacy of the pay for pay for online class, platform, or institution before making any payment. If you have any concerns about the legitimacy or security of an online payment, it's best to contact the relevant institution or platform directly for assistance.
Escorts in Bangalore Email Homepage
2023-4-29 12:17
In conclusion, independent escorts in Bangalore are the perfect companions for those who want to explore the city in style. They offer a range of services that cater to different interests and preferences. Booking these companions is a simple and discreet process, making it easy for you to enjoy their companionship without any hassle. Visit More: Best Escorts Girls in BangaloreDomlur Escorts Girls in Bangalore
giaverma Email
2023-4-29 13:41
This kind of website entices me to read it, but I've already read a lot of similar websites, so I'll have to read this one later.Call Girl in Pondicherry || Call Girl in Kolkata ||
Ranchi Escorts Email Homepage
2023-4-29 13:42
I'm delighted to present this excellent knowledge. I appreciate you providing this fantastic knowledge so much. Receive free home delivery at a reasonable price.Call Girls in Bijapur || Escorts in Dehradun ||
giaver Email
2023-4-29 13:43
I like the way you present your goods. Please let us know if anyone needs help putting their academic work on a visually pleasing basis.Escorts Service in Chennai || Kolhapur Escorts Service ||
Escort Service in Kanpur Email Homepage
2023-4-29 13:45
This is a fantastic article. This knowledge is quite helpful, my buddy, and I'm about to learn it. Ajmer Escorts Service This blog is also excellent and is loaded with helpful content. Keep doing what you are doing right now. Guwahati Call Girls ||
bodymassageinjaipur Email Homepage
2023-5-1 20:25
Experience Blissful Body Massage in Jaipur at Blossom SpaEscape the hustle and bustle of daily life and treat yourself to a blissful body massage at Blossom Spa. Our spa chain offers exceptional massage therapy services in Jaipur, Kolkata, and Lucknow, other popular cities in India providing a sanctuary where you can unwind, relax, and rejuvenate.At Blossom Spa, we understand the importance of a good massage. Massage therapy has been proven to provide numerous health benefits, including stress relief, improved circulation, and reduced muscle tension. That's why we offer a wide range of massage therapies, including Swedish massage, deep tissue massage, hot stone massage, Thai massage, and aromatherapy massage.Swedish massage is a gentle form of massage that uses long strokes, kneading, and circular movements on the uppermost layers of muscles. It is an excellent way to unwind and reduce stress. Deep tissue massage, on the other hand, is a more intense massage that focuses on the deeper layers of muscles and connective tissues. It is especially beneficial for individuals with chronic pain or injuries.For those who prefer a more soothing experience, hot stone massage uses heated stones to improve circulation, reduce muscle tension, and promote relaxation. Thai massage, a traditional form of massage, involves stretching and deep pressure on specific points of the body. It's a rejuvenating massage that improves flexibility, relieves pain, and reduces stress. Aromatherapy massage incorporates essential oils extracted from plants to enhance the massage experience and promote relaxation.In addition to our massage services, Blossom Spa also offers other wellness services such as facials, body scrubs, and manicures and pedicures. Our aestheticians are highly skilled and use only natural and organic products that are gentle on the skin and provide excellent results.We understand that every person is unique, and that's why our expert masseurs provide personalized services that cater to the individual needs of our clients. Our massage therapists take the time to understand your requirements and preferences and tailor the massage experience to ensure you leave feeling refreshed and re-energized.At Blossom Spa, we also believe that ambiance plays a significant role in the massage experience. Our spas are designed to provide a peaceful and tranquil environment, enhancing the relaxation process. With serene surroundings, soothing music, and aromatherapy, we guarantee that you will leave feeling completely relaxed and rejuvenated.Whether you're in Jaipur or another city in India Blossom Spa is the perfect destination to relax and unwind. Visit Our other popular centers in India areBody massage in Udaipur Body massage in Surat Body massage in AhmedabadBody massage in Kolkata Body massage in Gurgaon Body massage in NoidaBody massage in Dehradun Body massage in Indore Body massage in Lucknow Book your appointment today, and let our expert masseurs take you on a journey of relaxation and rejuvenation.
分页: 47/57 第一页 上页 42 43 44 45 46 47 48 49 50 51 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]