[文章作者:张宴 本文版本: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


Office.com/setup


2020-6-29 17:06
MS Office has earned its reputation as an outstanding Suite of Integrated Productivity Tools by serving Business and Home users with unmatched efficiency. It comes in multiple versions to give utmost versatility and choice to its users. In this way, it has surpassed any competition that it encountered on its way to becoming a necessity in today’s world. Besides being an exceptionally simple to use software suite, it is equally convenient to set it up. At “office.com/setup”, you can easily deploy your purchased version of MS Office without much hassle.Office.com/setuphttp://officeecomsetup.com/
www.office.com/setup


2020-6-30 14:21
Norton to enroll and access the Norton account. Norton is in the top list of antivirus which safeguards the data, devices, identity, and others. Even its the question of business security or home network security, Norton is available for all kinds of security www.norton.com/enroll | norton.com/enroll
mcafee

2020-6-30 18:39
Mcafee is across the board security supplier for your regular registering needs. It tends to be your every day use Andriod gadget or your extravagant iOS gadget. www.mcafee.com/activate ,mcafee.com/activate
installkaspersky


2020-7-1 17:04
install kaspersky with activation code | How to install and activate kaspersky on multiple computers• Each copy of a multiple-device license for Kaspersky Anti-Virus 2019 (for example, a 3 PCs license) is installed and activated in the same way on all computers you want to protect.• In conclusion to activate Kaspersky Internet Security 2019 on all computers, use one and the same activation code you purchased.<a href="https://installkaspersky.com/kaspersky-support-number/">kaspersky support number and Kaspersky Total Security Download</a><a href="https://installkaspersky.com/kaspersky-download-and-install">kaspersky installation</a><a href="https://installkaspersky.com/kaspersky-setup/">kaspersky setup</a><a href="https://installkaspersky.com">install kaspersky with activation code</a><a href="http://installkaspersky.com/kaspersky-code-activation">kaspersky code activation and kaspersky lab</a><a href="https://installkaspersky.com/geek-squad-kaspersky-activation-code">Geek squad kaspersky activation code</a>
trendmicro

2020-7-4 19:57
TrendMicro offers various advanced features like a plug-in manager, centralized management, security risk protection, web reputation, OfficeScan Firewall, Damage Cleanup Services, Behavior Monitoring, etc. www.trendmicro.com/bestbuypc |trendmicro.com/bestbuypc
trendmicro

2020-7-4 19:57
Trendmicro user-friendly platform where you can easily purchase and download the subscribed Trendmicro products.www.trendmicro.com/bestbuypc ,www.trendmicro.com/bestbuypc
office

2020-7-4 19:58
The Office is the prominent software program used in business, home, school works, and in many sectors. 1 TB of OneDrive cloud storage, you can use office products such as Word, Excel, PowerPoint, and OneNote. install office with product key ,install office with product key ,office.com/setup
www.norton.com/enroll

2020-7-6 14:16
Norton to enroll and access the Norton account. Norton is in the top list of antivirus which safeguards the data, devices, identity, and others. Even its the question of business security or home network security, Norton is available for all kinds of security www.norton.com/enroll | norton.com/enroll
www.norton.com/enroll


2020-7-6 14:16
Norton to enroll and access the Norton account. Norton is in the top list of antivirus which safeguards the data, devices, identity, and others. Even its the question of business security or home network security, Norton is available for all kinds of security www.norton.com/enroll | norton.com/enroll
trendmicro


2020-7-6 14:22
trendmicro is an independent support provider on On-Demand Remote Technical Services for Trend Micro products. www.trendmicro.com/bestbuypc |trendmicro.com/bestbuypc
antivirus

2020-7-6 14:22
Antivirus Advanced software features groundbreaking Defense+ technology that efficiently closes windows by treating unknown files seeking access to your PC's critical resources as potentially harmful. install office with product key ,office.com/setupwww.trendmicro.com/bestbuypc ,webroot.com/safe
installvipre


2020-7-6 16:58
Vipre antivirus secures your computer against unwanted cyber threats available online. https://installvipre.orghttps://installvipre.org/i-need-to-install-viprehttps://installvipre.org/install-vipre-with-key-... href="https://installvipre.org/">install vipre antivirus</a><a href="https://installvipre.org/i-need-to-install-vipre/">i need to install vipre</a><a href="https://installvipre.org/install-vipre-with-key-code/">install vipre with key code</a><a href="https://installvipre.org/reinstall-vipre-with-product-key/">reinstall vipre with product key</a><a href="https://installvipre.org/vipre-antivirus-hsn-install-download/">vipre antivirus hsn installdownload</a>
Mumbai Escorts


2020-7-7 15:13
Hello Boys, My name is Sakshi Singh from Mumbai, who works for Escorts Services with Mumbai. I am very direct with my work and hope to be straight ahead of you. So if you think I am the right person to spend time with you, then call us and hire me. Visit more offers on my website link now .!http://www.modelnight.net/http://www.modelinmumbai.com/
patrick


2020-7-10 14:57
The most reliable Malwarebytes customer support numberIf you are using Malwarebytes in your computer, you can have total peace of mind. It is a highly effective antimalware program that keeps the system squeaky clean and protects it from online threats. Are you experiencing some minor troubles with your Malwarebytes these days? Has Malwarebytes stopped working? If yes, then you need not feel disappointed as you can get all help and assistance from our Malwarebytes customer support number. Just dial our toll free number 1-877-916-7666 from anywhere across the country to get access to our reliable help line. Our qualified engineer will solve your problem without any delay.
mcafee

2020-7-13 15:30
The office has better compatibility with Windows, Android, Mac, iOS, and Linux. The 30-year-old service is enhancing day by day and matching the suitability to complete daily tasks and increasing a better performance rate. office.com/setup ,www.office.com/setup
mcafee

2020-7-13 15:31
Antivirus is a software that provides a wide variety of virus detection methods as it not only prevents viruses from entering your computer system but kills or quarantines viruses that have broken through the firewall. www.mcafee.com/activate ,mcafee.com/activate
antivirus

2020-7-13 15:33
Antivirus Advanced software features groundbreaking Defense+ technology that efficiently closes windows by treating unknown files seeking access to your PC's critical resources as potentially harmful. install office with product key ,office.com/setupwww.trendmicro.com/bestbuypc ,webroot.com/safe ,
norton.com/enroll


2020-7-13 15:46
Norton to enroll and access the Norton account. Norton is in the top list of antivirus which safeguards the data, devices, identity, and others. Even its the question of business security or home network security, Norton is available for all kinds of security <a href="https://www.nenroll-nenroll.com/">www.norton.com/enroll</a> | <a href="https://www.nenroll-nenroll.com/">norton.com/enroll</a>
norton.com/enroll


2020-7-13 15:46
Norton to enroll and access the Norton account. Norton is in the top list of antivirus which safeguards the data, devices, identity, and others. Even its the question of business security or home network security, Norton is available for all kinds of security <a href="https://www.nenroll-nenroll.com/">www.norton.com/enroll</a> | <a href="https://www.nenroll-nenroll.com/">norton.com/enroll</a>
jhonmark


2020-7-13 15:47
Norton to enroll and access the Norton account. Norton is in the top list of antivirus which safeguards the data, devices, identity, and others. Even its the question of business security or home network security, Norton is available for all kinds of security www.norton.com/enroll | norton.com/enroll
分页: 16/59
11 12 13 14 15 16 17 18 19 20



