该博文转至:http://blog.sina.com.cn/s/blog_853cc55b0101a2mq.html

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

windows oid 利用SNMP获得主机信息(转)的更多相关文章

  1. 利用ansible进行主机信息收集

    --- - hosts: myjob gather_facts: True vars: IP: "{{ ansible_default_ipv4['address'] }}" HO ...

  2. windows环境利用apache 配置虚拟主机

    windows环境利用apache 配置虚拟主机 1.改动http.host #LoadModule vhost_alias_module modules/mod_vhost_alias.so #In ...

  3. Windows漏洞利用 ms17-010

    漏洞名称 SMB 远程命令执行漏洞(ms17-010) 漏洞描述 继2016年 8 月份黑客组织 Shadow Brokers 放出第一批 NSA “方程式小组”内部黑客工具后,2017 年 4 月 ...

  4. Nginx隐藏主机信息,proxy_hide_header 与fastcgi_hide_header

    Nginx中proxy_hide_header 与fastcgi_hide_header都可以隐藏主机头信息,两者在具体使用时还是有着一定的区别的.刚好业务使用的nginx反向代理在显示响应头时将后端 ...

  5. windows下Apache的虚拟主机配置

    1.Apache虚拟主机: 在Apache上有关于虚拟主机的具体说明,具体可以参考Apache手册,这里简单的说一下虚拟主机主要分为两种: 1.基于主机名的虚拟主机(一个IP地址,多个网站) 2.基于 ...

  6. Windows漏洞利用技术概述

    Windows漏洞利用技术总结 1. 前言 本文是我对漏洞利用技术的学习总结,也是自己践行QAD (Questions.Answer.Discussions)的一次实践.本文通过阅读几位大牛的文章.演 ...

  7. findsmb - 列出在子网上响应SMB名称查询的主机信息

    SYNOPSIS 总览 findsmb [子网广播地址] 描述 此perl脚本是Samba组件的一部分. findsmb是个用于打印出关于子网中响应SMB名字查询请求的主机信息的perl脚本.实际上它 ...

  8. Windows Azure 配置Active Directory 主机(3)

    步骤 4:在 CloudSite 中安装附加域控制器 1.登录到 YourVMachine,单击“开始”,键入“dcpromo”,然后按 Enter. 2.在“欢迎使用”页上,单击“下一步”. 3.在 ...

  9. Windows Azure 配置Active Directory 主机(1)

    现在越来越多企业将自己业务系统迁移云端,方便公司日常运维管理.这篇文章将简单介绍一下,从 Windows Azure 虚拟网络上的虚拟机 (VM) 中的 Corp Active Directory 林 ...

随机推荐

  1. hadoop2.2.0 MapReduce的序列化

    package com.my.hadoop.mapreduce.dataformat; import java.io.DataInput;import java.io.DataOutput;impor ...

  2. LeetCode - 204. Count Primes - 埃拉托斯特尼筛法 95.12% - (C++) - Sieve of Eratosthenes

    原题 原题链接 Description: Count the number of prime numbers less than a non-negative number, n. 计算小于非负数n的 ...

  3. JDBC编程之优化

    1.创建 dbconfig.properties driver=com.mysql.jdbc.Driver dburl=jdbc\:mysql\://localhost\:3306/mytest us ...

  4. [Qt] Mask 蒙版

    [Qt] Mask 蒙版 Mask能够覆盖在其他的widget上面,实现一些动态图片的加载效果.下面给出代码. mask.h #ifndef MASK_HJ #define MASK_HJ #incl ...

  5. PHP中字符串类型与数值类型混合计算

    字符串转数值的规则 当一个字符串被当作一个数值来取值,其结果和类型如下: 如果该字符串没有包含 '.','e' 或 'E' 并且其数字值在整型的范围之内(由 PHP_INT_MAX 所定义),该字符串 ...

  6. dojo 学习笔记之dojo.query - query(id) 与query(class)的差别

    考虑这个样例:动态创建一个页面的时候,用new listtem()生成多个listitem, 且每一个listitem中都生成一个按钮button. 假设想要给每一个按钮都绑定一个click事件,用d ...

  7. Js 插件修改及优化总结

    1. ajaxfileupload 上传插件版本问题以及数据处理问题 参考链接: http://liwx2000.iteye.com/blog/1540321 现在大家至少也在用jquery1.9以上 ...

  8. (转) C# Activator.CreateInstance()方法使用

    C#在类工厂中动态创建类的实例,所使用的方法为: 1. Activator.CreateInstance (Type) 2. Activator.CreateInstance (Type, Objec ...

  9. 高仿QQ即时聊天软件开发系列之一开端

    前段时间在园子里看到一个大神做了一个GG2014IM软件,仿QQ的,那感觉···,赶快下载源码过来试试,还真能直接跑起来,效果也不错.但一看源码,全都给封装到了ESFramework里面了,音视频那部 ...

  10. spark原理介绍

    1.spark是一个基于内存计算的开源的集群计算系统,目的是让数据分析更加快速.因此运行spark的机器应该尽量的大内存,如96G以上. 2.spark所有操作均基于RDD,操作主要分成2大类:tra ...