cacti监控linux和windows磁盘IO

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://charlie928.blog.51cto.com/3741218/1331780

一,环境

1
2
3
cacti版本:0.8.8b
# uname -a
Linux 10-6-8-200 2.6.32-279.22.1.el6.x86_64 #1 SMP Wed Feb 6 03:10:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

二,操作步骤

首先监控linux磁盘IO

1.下载snmpdiskio-0.9.6
2.解压后并拷贝命令
1
# cp snmpdiskio /usr/local/bin/
3.编辑partition.xml文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
vi /var/www/html/cacti/resource/snmp_queries/partition.xml
<interface>
        <name>Get SNMP Partitions</name>
        <description>Queries a host for a list of monitorable partitions</description>
        <oid_index>.1.3.6.1.4.1.2021.13.15</oid_index>
        <index_order>hdDescr:hdIndex</index_order>
        <index_order_type>numeric</index_order_type>
        <index_title_format>|chosen_order_field|</index_title_format>
        <fields>
                <hdIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2021.13.15.1.1.1</oid>
                </hdIndex>
                <hdDescr>
                        <name>Description</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2021.13.15.1.1.2</oid>
                </hdDescr>
                <hdInBlocks>
                        <name>Bytes Written</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.2021.13.15.1.1.3</oid>
                </hdInBlocks>
                <hdOutBlocks>
                        <name>Bytes Read</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.2021.13.15.1.1.4</oid>
                </hdOutBlocks>
        </fields>
</interface>
4.修改文件属性
1
# chown apache. partition.xml
5.修改snmpd.conf配置,添加以下内容
1
2
3
4
5
6
# vi /etc/snmp/snmpd.conf
extend .1.3.6.1.4.1.2021.54 hdNum /bin/sh /usr/local/bin/snmpdiskio hdNum
extend .1.3.6.1.4.1.2021.55 hdIndex /bin/sh /usr/local/bin/snmpdiskio hdIndex
extend .1.3.6.1.4.1.2021.56 hdDescr /bin/sh /usr/local/bin/snmpdiskio hdDescr
extend .1.3.6.1.4.1.2021.57 hdInBlocks /bin/sh /usr/local/bin/snmpdiskio hdInBlocks
extend .1.3.6.1.4.1.2021.58 hdOutBlocks /bin/sh /usr/local/bin/snmpdiskio hdOutBlocks
6.重启snmpd服务,并测试
1
2
3
4
5
6
7
8
9
10
11
12
13
# service snmpd restart
# snmpwalk -v 2c -c meihua localhost .1.3.6.1.4.1.2021.58
UCD-SNMP-MIB::ucdavis.58.1.0 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.58.2.1.2.11.104.100.79.117.116.66.108.111.99.107.115 = STRING: "/bin/sh"
UCD-SNMP-MIB::ucdavis.58.2.1.3.11.104.100.79.117.116.66.108.111.99.107.115 = STRING: "/usr/local/bin/snmpdiskio hdOutBlocks"
UCD-SNMP-MIB::ucdavis.58.2.1.4.11.104.100.79.117.116.66.108.111.99.107.115 = ""
UCD-SNMP-MIB::ucdavis.58.2.1.5.11.104.100.79.117.116.66.108.111.99.107.115 = INTEGER: 5
UCD-SNMP-MIB::ucdavis.58.2.1.6.11.104.100.79.117.116.66.108.111.99.107.115 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.58.2.1.7.11.104.100.79.117.116.66.108.111.99.107.115 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.58.2.1.20.11.104.100.79.117.116.66.108.111.99.107.115 = INTEGER: 4
UCD-SNMP-MIB::ucdavis.58.2.1.21.11.104.100.79.117.116.66.108.111.99.107.115 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.58.3.1.1.11.104.100.79.117.116.66.108.111.99.107.115 = STRING: "0"
UCD-SNMP-MIB::ucdavis.58.3.1.2.11.104.100.79.117.116.66.108.111.99.107.115 = STRING: "0
7.解压后模板导入到cacti中

8.在主机中选择此模板,是否能获取数据

然后是监控windows磁盘IO操作步骤:

1.windows客户端安装informant-std-16.exe

下载地址:http://www.wtcs.org/informant/download.htm

2.下载模板文件

以上模板文件导入到cacti中

以上模板拷贝到/var/www/html/cacti/resource/snmp_queries/中

并更改权限。

3.查看windows磁盘IO是否有数据

本文出自 “charlie_cen” 博客,请务必保留此出处http://charlie928.blog.51cto.com/3741218/1331780

cacti监控linux和windows磁盘IO的更多相关文章

  1. 使用cacti监控linux主机

    介绍:使用cacti监控linux主机,需要在linux主机上面安装snmp服务,并修改snmpd.conf文件,指定cacti服务器的地址,然后在cacti的前台界面添加此主机即可,此处以监控cen ...

  2. Cacti监控Linux主机

    1 要监视一台Linux主机,需要在被监控的主机上安装net-snmp相关软件包,CentOS安装可使用“yum -y install net-snmp”命令:# yum -y install net ...

  3. linux上测试磁盘IO速度

    运维工作,经常要测试服务器硬件性能,以此来判断是否存在性能瓶颈. 下面介绍在linux上测试磁盘IO速度的工具: 1.hdparm CentOS中,安装的两种方法: 1) yum安装. # yum i ...

  4. linux使用windows磁盘,挂载共享目录

    实例说明:客户两台服务器,一台web服务器(linux)只有50G,课程资源太多太大导致磁盘不够用:客户的文档服务器(windows)磁盘很大超过1T,所以产生了,将web资源使用文档服务器磁盘的想法 ...

  5. nagios监控mysql主机,nginx,磁盘IO,网卡流量

    http://blog.chinaunix.net/uid-28685162-id-3506260.html nagios安装完成,打开/usr/local/nagios/etc/nagios.cfg ...

  6. linux 下查看磁盘IO状态

    from:脚本之家 linux 查看磁盘IO状态操作 作者:佚名 字体:[增加 减小] 来源:互联网 时间:11-15 15:13:44我要评论 Linux系统出现了性能问题,一般我们可以通过top. ...

  7. LoadRunner监控Linux与Windows方法

    1.首先保证被监视的windows系统开启以下二个服务Remote Procedure Call(RPC) 和Remote Registry Service: 2.被监视的WINDOWS机器:右击我的 ...

  8. cacti监控linux主机时iptables阻碍了udp161端口造成无法监控解

    由于在添加linux主机时,有防火墙启用,造成无法监控linux主机,现有两种方法解决无法监控linux主机问题:可以通过在监控主机执行该命令: snmpwalk -c public -v 2c 19 ...

  9. Zabbix 监控Windows磁盘IO

    Windows下,打开cmd输入 typeperf -qx > c:\typeperf.txt #打开c:\typeperf.txt文件 windows性能计数器里面包含windows相关数值 ...

随机推荐

  1. github仓库主页介绍

  2. Leetcode34--->Search for a Range(在排序数组中找出给定值出现的范围)

    题目:给定一个排序数组,找出给定的target值出现的范围:算法复杂度要求在O(logn);如果没有找到,则返回[-1, -1]; 举例: For example,Given [5, 7, 7, 8, ...

  3. selenium - Js处理滚动条操作

    # 11.Js处理滚动条操作 driver.execute_script('arguments[0].scrollIntoView();',target) target 为find_element_b ...

  4. mysql使用日常备忘

    批量插入数据时,如果主键是有业务意义的,并非自自增张,那么有可能在插入的数据中有与已存在的键值重复的,可以用如下方式来插入: INSERT IGNORE 当要插入一个数据时,插入的字段值中主键字段或唯 ...

  5. hdu5443 The Water Problem

    The Water Problem Time Limit: 1500/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Othe ...

  6. Welcome-to-Swift-11方法(Methods)

    方法是由特定类型关联起来的函数.类.结构体和枚举都能定义成实例方法.它封装了特定的任务和给定类型的实例的功能函数.类,结构体和方法也能定义类型方法,它只与类型的本身由关联.类型方法和Objective ...

  7. Eclipse或MyEclipse没有在java类文件上显示Spring图标的问题

    Eclipse或MyEclipse没有在java类文件上显示接口图标的问题解决办法: 前: 后:

  8. Element 'plugin' cannot have character [children], because the type's content type is element-only

    原因是你复制的时候,带了一些特殊符号. 解决方案: 将那一串代码复制到notpad++ 或者文本上面,再复制到你的编译器里面,就可以解决问题了

  9. py-faster-rcnn 的makefile.config 注意事项

    在配置py-faster-rcnn的过程中,我遇到一些问题,记录如下 py-faster-rcnn文件夹下面有一个caffe-fast-rcnn文件夹 这个过程中,我们需要编译caffe, rbgir ...

  10. python logger日志工具类

    pytest命令行执行默认不会打印log信息,需要加‘-s’参数或者 ‘–capture=no’,即pytest -s #! /usr/bin/env python # coding=gbk impo ...