首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > windows >

施用 cacti 监控 windows 服务器硬盘的 I/O 状况

2012-08-14 
使用 cacti 监控 windows 服务器硬盘的 I/O 状况环境: cacti 0.8.7e?看了 11 页的帖子(http://forums.cact

使用 cacti 监控 windows 服务器硬盘的 I/O 状况

环境: cacti 0.8.7e

?

看了 11 页的帖子(http://forums.cacti.net/viewtopic.php?f=12&t=29832), 居然发现最新的 SNMP Informant 1.6 版本不支持 Windows 2008 SP2。

尝试用 Python 的 WMI 模块自己写, 然后用 cacti 调用这个 Python 脚本:

?

import wmiif __name__ == '__main__':    _wmi = wmi.WMI()    disk_info = _wmi.Win32_PerfFormattedData_PerfDisk_PhysicalDisk(Name="3 D:")[0]    M = 1024 * 1024    print 'DiskMsPersec:%s DiskReadMsPersec:%s DiskWriteMsPersec:%s' % (        int(disk_info.DiskBytesPersec) / M,        int(disk_info.DiskReadBytesPersec) / M,        int(disk_info.DiskWriteBytesPersec) / M        )

?

# =========== 以下为悲剧的 SNMP Informant 方式, 留念 ===========

1.

在要监控的机器上启动 SNMP 服务, 安装 SNMP Informant.

可能需要重启 SNMP 服务。(参见, 第7页

?

2. 下载第8页最后一帖中的附件。

http://forums.cacti.net/viewtopic.php?f=12&t=29832&start=105

?

3.

Copy the snmp_informant_*.xml files to your <cacti_path>/resource/snmp_queries directory on your cacti box.
Import the cacti_data_query_w32_*.xml files into the cacti web interface.

?

参考:

第7页的第一个帖子,作者是

?