[文章作者:张宴 本文版本: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
注:此处的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()函数发送电子邮件
(4)、在MySQL上创建一个数据库servmon,然后在该数据库中执行以下SQL语句创建表:
备注:这张表是PHP接口程序用来记录发送磁盘分区报警邮件的时间,避免在一段时间内重复发送大量报警邮件的。
(3)、PHP接口程序
http://yourdomain/servmon/interface.php
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
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
; 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;
`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
Lahore Call Girl Service
2024-9-19 20:54
{url=https://lahoreescortservice.online/call-girls-in-lahore/]Lahore Call Girl Service[/url] can give you a romantic evening in a way that doesn't break the bank. Call girls in our area are professional women who like what they do. Besides that, they've been trained to handle a wide range of events, including the sexiest ones. You can hire more than one our area Call girl at the same time if you don't have enough cash. [b][/b]
Lahore Call Girl Service
2024-9-19 20:59
You can get a lot of different services from independent call girls in Lahore, such as in-call and out-call services. They can make guys of all ages' fantasies come true and give them a night they will never forget. In fact, a lot of them are from other countries and come from a wide range of backgrounds. These modern women go to college during the day and work as call girls at night.
Swarna
2024-9-23 20:36
These Cheap Escorts in Delhi are such elegant and refined women, so they prefer to converse with serious customers rather than jesters. If, after completing all of your searches, you have chosen to look for the Call Girls in Delhi through an agency, get in touch by phone or email and wait for a response; if not, they will get back to you as soon as they log on.
urvashi
2024-9-24 16:04
Fruitful things for intimacy are important and required for a great hard-core life. Thus, you need to know more about these services from our agency. Sarojini Nagar Escorts Service allows you to ensure great things for the physical relationship. Sarojini Nagar Escorts Hence, add some fruitful ideas to make the generic intimate relationship with a passionate and professional partner.
Murree Escorts
2024-9-29 18:36
We have the best escort service in Murree. Call us to book your escorts.escorts MurreeMurree escortsescorts service in Murree
대전출장안마
2024-9-30 10:44
"Loved the content! It’s informative and well-written. Thanks for sharing!"Korea Beauty Show대전출장안마
Lahore Call Girls
2024-10-9 22:29
You can use their services if you want to have fun and get laid. Along the way, you'll remember some great things that you will never forget. Our Lahore Call Girls can help you with both your health and the fact that you're lonely. Also, some amazing things will happen to you that you'll never forget.
satyam
2024-10-17 13:21
Making the most of it with the Connaught Place Escorts proves to be quite beneficial for you because they possess thorough and meticulous knowledge about it. They have also undergone extensive preparation. If you're looking for Escorts in Connaught Place, look no further. Savour attractive and sensible girl for dating in Connaught Place, and select the young girl of your choice who is independent.
출장안마
2024-10-17 16:15
Улучшение эмоционального баланса является преимуществом массажной терапии. Способствуя расслаблению 和 снижению стресса, массаж помогает справиться с перепадами настроения 和 подерживает более стабильное эмоциональное состояние。출장안마
출장안마
2024-10-18 11:46
Thank you for sharing such good information. The explanations for each topic were clear and useful. I look forward to more great content in the future!출장마사지
First-time home buyers in Longueuil
2024-10-19 03:07
Great article on the Linux Server Monitoring System ServMon V1.1! It's fascinating to see how effective monitoring can enhance system performance and reliability. Just like in the real estate industry, where having a good system in place is crucial for success. If you're ever looking for guidance in the real estate market, I recommend checking out the services of a reliable <a href='https://yelenamarkus.cbsrealtyus.com/real-estate-agent/'>real estate agent in Brossard</a>. Their expertise can make a significant difference in your property transactions!
MumbaiEscortsSanaKaur
2024-11-10 01:30
My name is Sana Kaur, I am a 19-year-old female, and I am an independent VIP Escort Service In Mumbai. I want you to have an amazing session with me while you can eat me whole with desire. I look forward to spending a wonderful time with you and living a wonderful and super happy time for both of us. I am a gentle and volatile woman, made to spend beautiful moments with you. I love seeing you happy, and I am always ready to surprise my friends with a lot of love and thought. I am a very passionate and loving woman. I assure you that I can give you everything a man could ever want in a night of fun. What I offer is very high quality for men who want a different experience in bed. Call and Whatsapp me anytime anywhere on X to create safe and secure Mumbai Escort Service.https://www.escortservicemumbai.net/
Murree Escorts
2024-11-16 16:42
We have the best escorts service in Murree. Call us to book your escorts. If you\'re looking for a girl who is not only hot but also professional and has a great personality, then our Murree female escorts are just what you need. escorts in Murreeescorts Murree
monicanight04
2024-11-17 16:51
I'm Monica Night, a sexy girl ready to give you my romantic company during your stay in Dehradun. I'm only 22 years old Dehradun Escorts Girl and have a great figure of 32-28-32 to complete your sexual dream. If I'm in your arms in the privacy of a hotel room, you'll be out of control of your emotions. If you will pay for my Escort service in Dehradun then you will enjoy happy moments with me, I have an erotic body with big boobs which makes you crazy about me.
monicanight04
2024-11-17 16:53
Hello friends are you looking Aerocity Escorts if yes, visit our website. we provide in-call and out-call escort service in Aerocity at all 5 Star Hotels 24×7 near IGI Airport of Aerocity. Our escorts are independent, high-end and exclusive.Goa EscortsGurgaon Escorts
riyamehra
2024-11-22 13:48
Book High Profile escorts in Delhi for an unforgettable experience. Enjoy luxury companionship, personalized service, and elite escorts in Delhi for your needs
Rebeca
2024-12-7 14:29
Robot sex dolls offer unparalleled customization, allowing users to tailor the doll's appearance, personality, and behavior. From the doll's voice to its responses, every feature can be adjusted to personal preferences. This level of personalization can help users develop a closer connection with their doll, cultivating the feeling that they have a unique and dedicated partner.robot sex dolls
Kolkata Hotel Escorts call girls
2024-12-17 17:08
5 Star Hotel Escort Service In Kolkata.On this page I would like Call me: +91-8420572529 to tell you about my Kolkata Hotel Escort Services. This service is very famous in Kolkata because every Call Girl is available only in 4 star or 5 star properties. They are Highly Independent Profile escorts and only give her services in Hotels. Many people came to Kolkata for fun and enjoyment and some people come for other countries for business purpose. After, finish the work they are looking for fun and stress free life. They want to take expensive Hotels for fun, sizzling and wonderful night. These hotels are very secure and reliable. They are open 24*7 so easily you can book your meeting with our Russian escort in Kolkata. We fix your meeting confidentially and safely, in other words you can say hassle free. It is very important when you are contacting any escort service you have to take safety measures step and verify everything before avail any services.https://khansariha.com/russian-escorts-kolkata.html
分页: 57/57 52 53 54 55 56 57