关于nagios监控远程服务器对服务器性能影响的测试
1. Nagios监视远程服务器时,是通过在控制端执行以下命令进行数据收集的:
/usr/local/nagios/libexec/check_http -I 192.168.16.11
/usr/local/nagios/libexec/check_ssh -H 192.168.16.11
/usr/local/nagios/libexec/check_ping -H 192.168.16.11 -w 100.0,20% -c 500.0,60% -p 5
/usr/local/nagios/libexec/check_tcp -H 192.168.16.11 -p 22
/usr/local/nagios/libexec/check_snmp_load.pl -H 192.168.16.11 -C public -w 70% -c 90% -T netsc -f
/usr/local/nagios/libexec/check_traffic.sh -V 2c -C public -H 192.168.16.11 -I 0 -w 400,200 -c 600,400 -M -b
/usr/local/nagios/libexec/check_snmp_storage.pl -H 192.168.16.11 -C public -m "^/" -w 80% -c 90% -f
/usr/local/nagios/libexec/check_snmp_storage.pl -H 192.168.16.11 -C public -m "memory|Memory" -w 80% -c 90% -f
/usr/local/nagios/libexec/check_snmp -H '192.168.16.11' -C public -o .1.3.6.1.4.1.2021.11.9.0,.1.3.6.1.4.1.2021.11.10.0,.1.3.6.1.4.1.2021.11.11.0 -l 'CPU usage (user system idle)' -u '%'
/usr/local/nagios/libexec/check_snmp_load.pl -H 192.168.16.11 -C public -w 3,3,2 -c 4,4,3 -T netsl -f
2. 测试方法:
1)通过nagios运行时,监视收集远程服务器资源使用信息;
2)通过在控制端每s执行监控命令,监视收集远程服务器资源使用信息;
3. 测试结果:
方法一:nagios运行时,在远程服务器分别执行top -b -d 2 -p21472 >/tmp/top_snmp.log、top -b -d 2 >/tmp/top_all.log,执行时间约为3小时,分析收集到的日志得知,监视时系统资源使用情况正常。
top_snmp.log部分信息
top - 15:17:25 up 192 days, 22:16, 4 users, load average: 0.00, 0.00, 0.00
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 32933092k total, 21012132k used, 11920960k free, 520748k buffers
Swap: 16779884k total, 0k used, 16779884k free, 16376668k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21472 root 15 0 157m 8616 4424 S 0.0 0.0 0:12.07 snmpd top_all.log部分信息
top - 09:51:22 up 192 days, 16:50, 5 users, load average: 0.00, 0.00, 0.00
Tasks: 258 total, 1 running, 257 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2%us, 0.1%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 32933092k total, 20603272k used, 12329820k free, 520164k buffers
Swap: 16779884k total, 0k used, 16779884k free, 15974748k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 15 0 10372 692 584 S 0.0 0.0 0:02.33 init
2 root RT -5 0 0 0 S 0.0 0.0 0:00.23 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.04 ksoftirqd/0 方法二:在控制端执行脚本plugins_test.sh,执行命令为:watch –d –n 1 sh plugins_test.sh,同时在远程服务器上执行top -b -d 1 -p21472 >top_snmp_time.log、watch -d -n 1 vmstatg、watch -d -n 1 free -m,5min后查看日志,分析收集到的日志得知,监视时系统资源使用情况正常。
Free命令10s之间的变化数
total used free shared buffers cached
Mem: 32161 20527 11633 0 508 15983
-/+ buffers/cache: 4035 28125
Swap: 16386 0 16386 total used free shared buffers cached
Mem: 32161 20528 11632 0 508 15983
-/+ buffers/cache: 4035 28125
Swap: 16386 0 16386 vmstat命令10s之间的变化数
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 11912152 520788 16367288 0 0 0 3 0 0 0 0 100 0 0 procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 11912484 520788 16367332 0 0 0 3 0 0 0 0 100 0 0
top_snmp_time.log部分信息
top - 16:22:15 up 192 days, 23:21, 9 users, load average: 0.00, 0.00, 0.00
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 32933092k total, 21018792k used, 11914300k free, 520780k buffers
Swap: 16779884k total, 0k used, 16779884k free, 16374824k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21472 root 15 0 157m 8616 4424 S 0.0 0.0 0:13.08 snmpd top - 16:22:16 up 192 days, 23:21, 9 users, load average: 0.00, 0.00, 0.00
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 32933092k total, 21018792k used, 11914300k free, 520780k buffers
Swap: 16779884k total, 0k used, 16779884k free, 16374824k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21472 root 15 0 157m 8616 4424 S 0.0 0.0 0:13.08 snmpd top - 16:22:17 up 192 days, 23:21, 9 users, load average: 0.00, 0.00, 0.00
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 32933092k total, 21018680k used, 11914412k free, 520780k buffers
Swap: 16779884k total, 0k used, 16779884k free, 16374824k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21472 root 15 0 157m 8616 4424 S 0.0 0.0 0:13.08 snmpd
4. 测试结果:
通过以上数据分析后可知:在利用nagios的自身插件及snmp协议(共对远程服务器的10个服务时行监控)监控远程服务器时,对远程服务器资源使用情况无影响。当大于10个服务时,需要另行评测。
5. 远程服务器配置情况:
[root@xxx-xxx ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c &cat /proc/cpuinfo | grep physical | uniq -c
[1] 13558
1 physical id : 0
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 40 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 40 bits physical, 48 bits virtual
16 Intel(R) Xeon(R) CPU E5620 @ 2.40GHz [root@xxx-xxx ~]# cat /etc/issue&free -g
[1] 13753
CentOS release 5.6 (Final)
Kernel \r on an \m total used free shared buffers cached
Mem: 31 20 11 0 0 15
-/+ buffers/cache: 3 27
Swap: 16 0 16
[1]+ Done cat /etc/issue
关于nagios监控远程服务器对服务器性能影响的测试的更多相关文章
- nagios监控远程端口
check_port 位置:/usr/local/nagios/libexec/ 代码(新建可执行文件) #!/bin/sh /usr/local/nagios/libexec/check_tcp - ...
- count++线程安全与 synchronized对性能影响的测试
一个计时器,同时开启100个线程,每个线程休眠1ms钟后,将全局静态变量count加1,这100个线程创建完之后,休眠500ms,计算总耗时,程序如下: public class Counter { ...
- Nagios的安装配置与应用之五监控远程Linux服务器
本文出自 “曹坏水” 博客,请务必保留此出处http://cao2012.blog.51cto.com/366908/1132113 NRPE是Nagios的一个功能扩展,它可在远程Linux和UNI ...
- Nagios 监控系统架设全攻略
Nagios 全名为(Nagios Ain’t Goona Insist on Saintood),最初项目名字是 NetSaint.它是一款免费的开源 IT 基础设施监控系统,其功能强大,灵活性强, ...
- nagios监控linux设置
本章主要用来设置nagios的相关配置文件,从而能实现对linux系统的监控. 在进行监控相关服务的时候,nagios会周期性的调用插件去监测服务器的状态,nagios自带的所有插件都放在如下目录: ...
- 在Nginx中搭建Nagios监控平台
本文只做Nginx下Nagiox安装的说明,其它关于Nagios监控的详细配置请参考我的另一篇文章[Ubuntu 10.04下构建Nagios监控平台] Nagios依赖PHP环境和perl环境.由于 ...
- 搭建基于Nagios的监控系统——之监控远程Linux服务器
上一篇介绍了如何安装Nagios Core,这一篇跟大家分享一下如何将一台远程的Linux服务器加入纳入监控范围. 第一部分:在远程Linux上安装Nagios Plugins和NRPE 第一步: ...
- jprofiler_监控远程linux服务器的JVM进程(实践)
几天前写了一篇文章,jprofiler_监控远程linux服务器的tomcat进程(实践),介绍了使用jprofiler怎样监控远程linux的tomcat进程,这两天想了想,除了可以监控tomcat ...
- 通过SSIS监控远程服务器Windows服务并发送邮件报警!
利用SSIS不仅可以做BI项目的ETL,而且还可以做一些系统监控和维护工作,由于之前供应商写的Windows服务是读取ESB的消息进行处理,且通过OA流程与访客系统进行了集成,无论是ESB出现状况,还 ...
随机推荐
- mysql5.5字符集设置的一点变化(对于中文乱码问题,需要设置mysql字符集)
工作中因为字符集问题没少头疼,还犯过一次错误,还好拯救及时,没有发生重大事故,唉,弄清楚点还是非常有必要的: 例如我的工作环境为CTR+redhat5+mysql5.5 在导入sql语句的时候必须要注 ...
- Disconf
通常我们会做如下配置:(disconf 2.6.21) <!-- 一次扫描 --> <bean id="disconfMgrBean" class="c ...
- Android Studio使用总结
记录Android-Studio遇到的各种坑 http://blog.csdn.net/u012874222/article/details/50616698 Android Studio 权威教程 ...
- twitter点赞动画详解
今天在微博上看到@过气网红一丝 的一篇微博,codepen上贴出了twitter点赞那个动画效果的源码,地址 http://codepen.io/yisi/pen/LpXVJb .我看了下效果很好看, ...
- <2016-1-28>
1.链接的网址前加入?action=bs-transfer@mdp&url=http://www.baidu.com 2.登录页面的验证 <script> function log ...
- C++11 lambda的理解
C++11 的 lambda 表达式规范如下: [ capture ] ( params ) mutable exception attribute -> ret { body } (1) [ ...
- FreeBSD从零开始---安装后配置(三)
IPFW和IPF 一.IPFW IPFW意思可以理解为ip防火墙,主要作用是拦截设定规则外的ip包.你可以把这个理解为linux下的iptables,但是,ipfw要比iptables简单易用. ...
- Windows Server 2012重复数据删除技术体验
在企业环境中,对磁盘空间的需求是惊人的.数据备份.文件服务器.软件镜像.虚拟磁盘等都需要占据大量的空间.对此,微软在Windows Server 2012中引入了重复数据删除技术.重复数据删除技术通过 ...
- c++学习--继承与派生
继承和派生 1 含有对象成员(子对象)的派生类的构造函数,定义派生类对象成员时,构造函数的执行顺序如下: 1 调用基类的构造函数,对基类数据成员初始化: 2 调用对象成员的构造函数,对对象成员的数据成 ...
- java.io.file
package cn.edu.tongji.cims.wade.system; import java.io.*; public class FileOperate { pub ...