Window 下面利用Oid 获取SNMP主机信息 以及计算方法
2013-11-15 10:49
513 查看
Windows OID' for CPU, Memory, Disk Utilization2007-10-31 11:03Windows CPU
Utilization:
OID:.1.3.6.1.2.1.25.3.3.1.2
(.iso.org.dod.internet.mgmt.mib-2.host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorLoad)
in
HOST-RESOURCES-MIB
1.3.6.1.2.1.25.3.3.1.2.2 And
1.3.6.1.2.1.25.3.3.1.2.3
Windows Memory
Utilization:
Total : OID: 1.3.6.1.2.1.25.2.2.0 单位(KB)--Windows
2003
1.3.6.1.2.1.25.2.2.0 = 2096304 [Integer]
Memory Usage 的处理和 HDD total,
HDD usage一致
Windows Disk
Utilization:
Total
OID:
Usage OID:
1. Disk type OID
(hrStrogeType):
hrStorageTypes
1.3.6.1.2.1.25.2.1
OBJECT
IDENTIFIER
hrStorageOther
1.3.6.1.2.1.25.2.1.1
OBJECT
IDENTIFIER
hrStorageRam
1.3.6.1.2.1.25.2.1.2
OBJECT
IDENTIFIER
hrStorageVirtualMemory
1.3.6.1.2.1.25.2.1.3
OBJECT
IDENTIFIER
hrStorageFixedDisk
1.3.6.1.2.1.25.2.1.4
OBJECT
IDENTIFIER
hrStorageRemovableDisk
1.3.6.1.2.1.25.2.1.5
OBJECT
IDENTIFIER
hrStorageFloppyDisk
1.3.6.1.2.1.25.2.1.6
OBJECT
IDENTIFIER
hrStorageCompactDisc
1.3.6.1.2.1.25.2.1.7
OBJECT
IDENTIFIER
hrStorageRamDisk
1.3.6.1.2.1.25.2.1.8
OBJECT
IDENTIFIER
hrStorageRam 表示内存, hrStorageFixedDisk 表示硬盘, hrStorageVirtualMemory
表示虚拟内存, hrStorageCompactDisc 表示光盘
2. 区分各个磁盘/分区的类型
1.3.6.1.2.1.25.2.3.1.2.1
= 1.3.6.1.2.1.25.2.1.4 [ObjectIdentifier] //硬盘
1.3.6.1.2.1.25.2.3.1.2.2 =
1.3.6.1.2.1.25.2.1.4 [ObjectIdentifier] //硬盘
1.3.6.1.2.1.25.2.3.1.2.3 =
1.3.6.1.2.1.25.2.1.4 [ObjectIdentifier] //硬盘
1.3.6.1.2.1.25.2.3.1.2.4 =
1.3.6.1.2.1.25.2.1.4 [ObjectIdentifier] //硬盘
1.3.6.1.2.1.25.2.3.1.2.5 =
1.3.6.1.2.1.25.2.1.7 [ObjectIdentifier] //光盘
1.3.6.1.2.1.25.2.3.1.2.6 =
1.3.6.1.2.1.25.2.1.7 [ObjectIdentifier] //光盘
1.3.6.1.2.1.25.2.3.1.2.7 =
1.3.6.1.2.1.25.2.1.3 [ObjectIdentifier] //虚拟内存
1.3.6.1.2.1.25.2.3.1.2.8 =
1.3.6.1.2.1.25.2.1.2 [ObjectIdentifier] //物理内存
3. Disk/分区 Information
OID:
1.3.6.1.2.1.25.2.3.1.3.1 = "C: Label: Serial Number dc26ea33"
[Octets]
1.3.6.1.2.1.25.2.3.1.3.2 = "D: Label:test Serial Number 9629f314"
[Octets]
1.3.6.1.2.1.25.2.3.1.3.3 = "E: Label:test_backup Serial Number
94389268" [Octets]
1.3.6.1.2.1.25.2.3.1.3.4 = "F: Label:others Serial Number
5c4002e8" [Octets]
1.3.6.1.2.1.25.2.3.1.3.5 = "G:"
[Octets]
1.3.6.1.2.1.25.2.3.1.3.6 = "H: Label:Oracle10g Serial Number
b1c04dbe" [Octets]
1.3.6.1.2.1.25.2.3.1.3.7 = "Virtual Memory"
[Octets]
1.3.6.1.2.1.25.2.3.1.3.8 = "Physical Memory" [Octets]
4.
StorageAllocationUnits OID:也叫每个箸/块的大小
1.3.6.1.2.1.25.2.3.1.4.1 = 512
[Integer]
1.3.6.1.2.1.25.2.3.1.4.2 = 4096
[Integer]
1.3.6.1.2.1.25.2.3.1.4.3 = 4096
[Integer]
1.3.6.1.2.1.25.2.3.1.4.4 = 4096
[Integer]
1.3.6.1.2.1.25.2.3.1.4.5 = 0 [Integer]
1.3.6.1.2.1.25.2.3.1.4.6
= 2048 [Integer]
1.3.6.1.2.1.25.2.3.1.4.7 = 65536
[Integer]
1.3.6.1.2.1.25.2.3.1.4.8 = 65536 [Integer]
5.StorageSize
OID:一个磁盘分为多少块/箸, 总大小
1.3.6.1.2.1.25.2.3.1.5.1 = 25157789
[Integer]
1.3.6.1.2.1.25.2.3.1.5.2 = 2815383
[Integer]
1.3.6.1.2.1.25.2.3.1.5.3 = 4096567
[Integer]
1.3.6.1.2.1.25.2.3.1.5.4 = 11006525
[Integer]
1.3.6.1.2.1.25.2.3.1.5.5 = 0 [Integer]
1.3.6.1.2.1.25.2.3.1.5.6
= 317298 [Integer]
1.3.6.1.2.1.25.2.3.1.5.7 = 63101
[Integer]
1.3.6.1.2.1.25.2.3.1.5.8 = 32754 [Integer]
6. StorageUsed
OID://已经使用的块/箸
1.3.6.1.2.1.25.2.3.1.6.1 = 7427924
[Integer]
1.3.6.1.2.1.25.2.3.1.6.2 = 861039
[Integer]
1.3.6.1.2.1.25.2.3.1.6.3 = 16820
[Integer]
1.3.6.1.2.1.25.2.3.1.6.4 = 5788717
[Integer]
1.3.6.1.2.1.25.2.3.1.6.5 = 0 [Integer]
1.3.6.1.2.1.25.2.3.1.6.6
= 317298 [Integer]
1.3.6.1.2.1.25.2.3.1.6.7 = 12172
[Integer]
1.3.6.1.2.1.25.2.3.1.6.8 = 13270 [Integer]
7.
StorageAllocationFailures OID://分配失败的块/箸
1.3.6.1.2.1.25.2.3.1.7.1 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.2 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.3 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.4 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.5 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.6 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.7 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.8 = 0 [Counter32]
8.
在这个例子中
可以看到的盘符是C: D: E: F:; 同时可以得到虚拟内存信息,物理内存的信息
C: 盘大小为512× 25157789=
12880787968bytes or 12GB
C: 盘以用空间512×7427924= 3803097088bytes or
3.54GB
C:盘使用率为3.54/12*100% = 29.5%
C: 盘空间分配错误512×0 = 0
bytes
硬盘总的大小为512*25157789 + 4096*2815383 + 4096*4096567+ 4096*11006525 =
about 80G
磁盘使用大小为512*7427924 + 4096*861039 + 4096*16820 + 4096*5788717 =
about 29G
整个硬盘的使用率 29/80 *100% = 36.2%
物理内存
Total RAM 65536*32754 =
2096256 KB, 2047.125M about 2G 这个数字和1.3.6.1.2.1.25.2.2.0结果差不多
Used RAM
65536*13270 = 829M
内存使用率 829/2048 * 100% =
40.4%
内存每个箸/块的大小:hrStorageAllocationUnits,1.3.6.1.2.1.25.2.3.1.4,HOST-RESOURCES-MIB,OBJECT
内存已使用的块/箸大小:hrStorageUsed,1.3.6.1.2.1.25.2.3.1.6,HOST-RESOURCES-MIB,OBJECT
CPU的块/箸大小:hrProcessorLoad,1.3.6.1.2.1.25.3.3.1.2,HOST-RESOURCES-MIB,OBJECT
Utilization:
OID:.1.3.6.1.2.1.25.3.3.1.2
(.iso.org.dod.internet.mgmt.mib-2.host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorLoad)
in
HOST-RESOURCES-MIB
1.3.6.1.2.1.25.3.3.1.2.2 And
1.3.6.1.2.1.25.3.3.1.2.3
Windows Memory
Utilization:
Total : OID: 1.3.6.1.2.1.25.2.2.0 单位(KB)--Windows
2003
1.3.6.1.2.1.25.2.2.0 = 2096304 [Integer]
Memory Usage 的处理和 HDD total,
HDD usage一致
Windows Disk
Utilization:
Total
OID:
Usage OID:
1. Disk type OID
(hrStrogeType):
hrStorageTypes
1.3.6.1.2.1.25.2.1
OBJECT
IDENTIFIER
hrStorageOther
1.3.6.1.2.1.25.2.1.1
OBJECT
IDENTIFIER
hrStorageRam
1.3.6.1.2.1.25.2.1.2
OBJECT
IDENTIFIER
hrStorageVirtualMemory
1.3.6.1.2.1.25.2.1.3
OBJECT
IDENTIFIER
hrStorageFixedDisk
1.3.6.1.2.1.25.2.1.4
OBJECT
IDENTIFIER
hrStorageRemovableDisk
1.3.6.1.2.1.25.2.1.5
OBJECT
IDENTIFIER
hrStorageFloppyDisk
1.3.6.1.2.1.25.2.1.6
OBJECT
IDENTIFIER
hrStorageCompactDisc
1.3.6.1.2.1.25.2.1.7
OBJECT
IDENTIFIER
hrStorageRamDisk
1.3.6.1.2.1.25.2.1.8
OBJECT
IDENTIFIER
hrStorageRam 表示内存, hrStorageFixedDisk 表示硬盘, hrStorageVirtualMemory
表示虚拟内存, hrStorageCompactDisc 表示光盘
2. 区分各个磁盘/分区的类型
1.3.6.1.2.1.25.2.3.1.2.1
= 1.3.6.1.2.1.25.2.1.4 [ObjectIdentifier] //硬盘
1.3.6.1.2.1.25.2.3.1.2.2 =
1.3.6.1.2.1.25.2.1.4 [ObjectIdentifier] //硬盘
1.3.6.1.2.1.25.2.3.1.2.3 =
1.3.6.1.2.1.25.2.1.4 [ObjectIdentifier] //硬盘
1.3.6.1.2.1.25.2.3.1.2.4 =
1.3.6.1.2.1.25.2.1.4 [ObjectIdentifier] //硬盘
1.3.6.1.2.1.25.2.3.1.2.5 =
1.3.6.1.2.1.25.2.1.7 [ObjectIdentifier] //光盘
1.3.6.1.2.1.25.2.3.1.2.6 =
1.3.6.1.2.1.25.2.1.7 [ObjectIdentifier] //光盘
1.3.6.1.2.1.25.2.3.1.2.7 =
1.3.6.1.2.1.25.2.1.3 [ObjectIdentifier] //虚拟内存
1.3.6.1.2.1.25.2.3.1.2.8 =
1.3.6.1.2.1.25.2.1.2 [ObjectIdentifier] //物理内存
3. Disk/分区 Information
OID:
1.3.6.1.2.1.25.2.3.1.3.1 = "C: Label: Serial Number dc26ea33"
[Octets]
1.3.6.1.2.1.25.2.3.1.3.2 = "D: Label:test Serial Number 9629f314"
[Octets]
1.3.6.1.2.1.25.2.3.1.3.3 = "E: Label:test_backup Serial Number
94389268" [Octets]
1.3.6.1.2.1.25.2.3.1.3.4 = "F: Label:others Serial Number
5c4002e8" [Octets]
1.3.6.1.2.1.25.2.3.1.3.5 = "G:"
[Octets]
1.3.6.1.2.1.25.2.3.1.3.6 = "H: Label:Oracle10g Serial Number
b1c04dbe" [Octets]
1.3.6.1.2.1.25.2.3.1.3.7 = "Virtual Memory"
[Octets]
1.3.6.1.2.1.25.2.3.1.3.8 = "Physical Memory" [Octets]
4.
StorageAllocationUnits OID:也叫每个箸/块的大小
1.3.6.1.2.1.25.2.3.1.4.1 = 512
[Integer]
1.3.6.1.2.1.25.2.3.1.4.2 = 4096
[Integer]
1.3.6.1.2.1.25.2.3.1.4.3 = 4096
[Integer]
1.3.6.1.2.1.25.2.3.1.4.4 = 4096
[Integer]
1.3.6.1.2.1.25.2.3.1.4.5 = 0 [Integer]
1.3.6.1.2.1.25.2.3.1.4.6
= 2048 [Integer]
1.3.6.1.2.1.25.2.3.1.4.7 = 65536
[Integer]
1.3.6.1.2.1.25.2.3.1.4.8 = 65536 [Integer]
5.StorageSize
OID:一个磁盘分为多少块/箸, 总大小
1.3.6.1.2.1.25.2.3.1.5.1 = 25157789
[Integer]
1.3.6.1.2.1.25.2.3.1.5.2 = 2815383
[Integer]
1.3.6.1.2.1.25.2.3.1.5.3 = 4096567
[Integer]
1.3.6.1.2.1.25.2.3.1.5.4 = 11006525
[Integer]
1.3.6.1.2.1.25.2.3.1.5.5 = 0 [Integer]
1.3.6.1.2.1.25.2.3.1.5.6
= 317298 [Integer]
1.3.6.1.2.1.25.2.3.1.5.7 = 63101
[Integer]
1.3.6.1.2.1.25.2.3.1.5.8 = 32754 [Integer]
6. StorageUsed
OID://已经使用的块/箸
1.3.6.1.2.1.25.2.3.1.6.1 = 7427924
[Integer]
1.3.6.1.2.1.25.2.3.1.6.2 = 861039
[Integer]
1.3.6.1.2.1.25.2.3.1.6.3 = 16820
[Integer]
1.3.6.1.2.1.25.2.3.1.6.4 = 5788717
[Integer]
1.3.6.1.2.1.25.2.3.1.6.5 = 0 [Integer]
1.3.6.1.2.1.25.2.3.1.6.6
= 317298 [Integer]
1.3.6.1.2.1.25.2.3.1.6.7 = 12172
[Integer]
1.3.6.1.2.1.25.2.3.1.6.8 = 13270 [Integer]
7.
StorageAllocationFailures OID://分配失败的块/箸
1.3.6.1.2.1.25.2.3.1.7.1 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.2 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.3 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.4 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.5 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.6 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.7 = 0
[Counter32]
1.3.6.1.2.1.25.2.3.1.7.8 = 0 [Counter32]
8.
在这个例子中
可以看到的盘符是C: D: E: F:; 同时可以得到虚拟内存信息,物理内存的信息
C: 盘大小为512× 25157789=
12880787968bytes or 12GB
C: 盘以用空间512×7427924= 3803097088bytes or
3.54GB
C:盘使用率为3.54/12*100% = 29.5%
C: 盘空间分配错误512×0 = 0
bytes
硬盘总的大小为512*25157789 + 4096*2815383 + 4096*4096567+ 4096*11006525 =
about 80G
磁盘使用大小为512*7427924 + 4096*861039 + 4096*16820 + 4096*5788717 =
about 29G
整个硬盘的使用率 29/80 *100% = 36.2%
物理内存
Total RAM 65536*32754 =
2096256 KB, 2047.125M about 2G 这个数字和1.3.6.1.2.1.25.2.2.0结果差不多
Used RAM
65536*13270 = 829M
内存使用率 829/2048 * 100% =
40.4%
内存每个箸/块的大小:hrStorageAllocationUnits,1.3.6.1.2.1.25.2.3.1.4,HOST-RESOURCES-MIB,OBJECT
内存已使用的块/箸大小:hrStorageUsed,1.3.6.1.2.1.25.2.3.1.6,HOST-RESOURCES-MIB,OBJECT
CPU的块/箸大小:hrProcessorLoad,1.3.6.1.2.1.25.3.3.1.2,HOST-RESOURCES-MIB,OBJECT
相关文章推荐
- 利用反射获取.DLL文件中的属性和方法以及版本信息
- windows oid 利用SNMP获得主机信息
- windows oid 利用SNMP获得主机信息
- windows oid 利用SNMP获得主机信息
- 获取时间方法,以及计算两个整型日期之间的天数
- 获取网卡信息(网卡MAC,ip,index,devicename)的一般方法(利用IP HELPER api)
- OID-----利用SNMP获取、走访节点值【程序代码+分析
- ajax利用html5新特性带进度条上传文件 html5的FormData对象和input的file属性以及window.URL.createObjectURL( ) 方法
- JQ获取指定class下面的子元素,并加属性以及JQ追加子元素的方法
- 切换导航标签实现当前标签颜色改变以及利用js如何准确获取当前页面url网址信息
- struts2 用get方法 获取信息 用下面的乱码,用下面代码可以转正常。
- 利用python获取网页信息以及插入Access数据库
- 获取PC硬件信息方法一:利用Java Applet
- j2me学习笔记【2】——利用Display类的isColor()方法获取设备是否支持彩色的信息
- Python利用系统命令获取文件(夹)信息以及Python对Excel的简单操作
- 利用堡垒主机获取防火墙里面主机信息
- ExtJs--05--给window组件添加功能条以及子组件获取上级或下级组件的属性和方法
- IFC标准是为了满足建筑行业的信息交互与共享而产生的统一数据标准,是建 筑行业事实上的数据交换与共享标准。本文概要介绍了IFC标准的产生及发展 历程,IFC的整体框架结构,简要说明了IFC标准的实现方法和过程,描述了 当前的应用以及我们应该更加积极地利用IFC标准为建筑软件行业服务。
- 利用Zabbix API 获取各个分组下的服务器列表以及详细信息
- 用Java获取window操作系统信息以及Java虚拟机信息