网络常用 OID

 网络产品常用 OID

snmpwalk -v 1/2    hostname -c oid


IF-MIB::ifIndex .1.3.6.1.2.1.2.2.1.1
IF-MIB::ifDescr .1.3.6.1.2.1.2.2.1.2
IF-MIB::ifType .1.3.6.1.2.1.2.2.1.3
IF-MIB::ifMtu .1.3.6.1.2.1.2.2.1.4
IF-MIB::ifSpeed .1.3.6.1.2.1.2.2.1.5
IF-MIB::ifPhysAddress .1.3.6.1.2.1.2.2.1.6
IF-MIB::ifAdminStatus .1.3.6.1.2.1.2.2.1.7
IF-MIB::ifOperStatus .1.3.6.1.2.1.2.2.1.8
IF-MIB::ifLastChange .1.3.6.1.2.1.2.2.1.9
IF-MIB::ifInOctets .1.3.6.1.2.1.2.2.1.10
IF-MIB::ifInUcastPkts .1.3.6.1.2.1.2.2.1.11
IF-MIB::ifInNUcastPkts .1.3.6.1.2.1.2.2.1.12
IF-MIB::ifInDiscards .1.3.6.1.2.1.2.2.1.13
IF-MIB::ifInErrors .1.3.6.1.2.1.2.2.1.14
IF-MIB::ifInUnknownProtos .1.3.6.1.2.1.2.2.1.15
IF-MIB::ifOutOctets .1.3.6.1.2.1.2.2.1.16
IF-MIB::ifOutUcastPkts .1.3.6.1.2.1.2.2.1.17
IF-MIB::ifOutNUcastPkts .1.3.6.1.2.1.2.2.1.18
IF-MIB::ifOutDiscards .1.3.6.1.2.1.2.2.1.19
IF-MIB::ifOutErrors .1.3.6.1.2.1.2.2.1.20
IF-MIB::ifOutQLen .1.3.6.1.2.1.2.2.1.21
SNMPv2-SMI::enterprises .1.3.6.1.4.1
SNMPv2-SMI::enterprises. .1.3.6.1.4.1.9.7.129


ifIndex 1.3.6.1.2.1.2.2.1.1 A unique value for each interface.
ifDescr 1.3.6.1.2.1.2.2.1.2 A textual string containing information about the interface.This string should include the name of the manufacturer, the product name and the version of the hardware interface.
ifType 1.3.6.1.2.1.2.2.1.3 The type of interface, distinguished according to the physical/link protocol(s) immediately 'below' the network layer in the protocol stack.
ifMtu 1.3.6.1.2.1.2.2.1.4 The size of the largest datagram which can be sent / received on the interface, specified in octets.
ifSpeed 1.3.6.1.2.1.2.2.1.5 An estimate of the interface's current bandwidth in bits per second.
ifPhysAddress 1.3.6.1.2.1.2.2.1.6 The interface's address at the protocol layer immediately `below' the network layer in the protocol stack.
ifAdminStatus 1.3.6.1.2.1.2.2.1.7 The current administrative state of the interface.
ifOperStatus 1.3.6.1.2.1.2.2.1.8 The current operational state of the interface.
ifInOctets 1.3.6.1.2.1.2.2.1.10 The total number of octets received on the interface, including framing characters.
ifInUcastPkts 1.3.6.1.2.1.2.2.1.11 The number of subnetwork-unicast packets delivered to a higher-layer protocol.
ifInNUcastPkts 1.3.6.1.2.1.2.2.1.12 The number of non-unicast (i.e., subnetwork- broadcast or subnetwork-multicast) packets delivered to a higher-layer protocol.
ifInDiscards 1.3.6.1.2.1.2.2.1.13 The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space.
ifInErrors 1.3.6.1.2.1.2.2.1.14 The number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol.
ifInUnknownProtos 1.3.6.1.2.1.2.2.1.15 The number of packets received via the interface which were discarded because of an unknown or unsupported protocol.
ifOutOctets 1.3.6.1.2.1.2.2.1.16 The total number of octets transmitted out of the interface, including framing characters.
ifOutUcastPkts 1.3.6.1.2.1.2.2.1.17 The total number of packets that higher-level protocols requested be transmitted, and which were not addressed to a multicast or broadcast address at this sub-layer, including those that were discarded or not sent.
ifOutNUcastPkts 1.3.6.1.2.1.2.2.1.18 The total number of packets that higher-level protocols requested be transmitted, and which were addressed to a multicast or broadcast address at this sub-layer, including those that were discarded or not sent.
ifOutDiscards 1.3.6.1.2.1.2.2.1.19 The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space.
ifOutErrors 1.3.6.1.2.1.2.2.1.20 The number of outbound packets that could not be transmitted because of errors.
ifOutQLen 1.3.6.1.2.1.2.2.1.21 The length of the output packet queue (in packets).

 

 

一般查询及示例使用CCO账户登录 mib locator网址:
http://tools.cisco.com/ITDIT/MIBS/servlet/index

点击
CiscoIOS MIB Locator
可以从下拉菜单选择release的版本,

选择platformfamily硬件平台

选择 featuresset
特性集
从列出的支持相关mib库名称可以得到对应选项的完整V1,V2的库。
如BGP4-MIB
ENTITY-MIB
CISCO-PROCESS-MIB等。
点击相关的V2可以打开另一个窗口:
其中可以查到相关参数的object名称,如cpmCPUTotal1min
cpmCPUTotal5min等
从中可以得到object的cpmCPUTotal1min : 1.3.6.1.4.1.9.9.109.1.1.1.1.4
从中还可以看到此参数的描述等其他信息,如type,status,range,Description等
1.3.6.1.4.1.9.9
其中1.9.9是Enterprise.cisco.ciscoMgmt (企业-思科-思科网管)
1.3.6.1.4.1.9.9.109.1.1.1.1
其中109.1.1.1.1是
ciscoProcessMIB . ciscoProcessMIBObjects. cpmCPU .cpmCPUTotalTable . cpmCPUTotalEntry
如果输入oid值,同样可以得到对应的树型结构:

登陆http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en
输入object的名称如cpmCPUTotal1min,点击translate可以得到oid的树形结构:
对于有多个板卡cpu的设备,可以使用递归查询将取得的mib值与相关板卡对应起来:
利用CISCO-PROCESS-MIB 和ENTITY-MIB 2个mib库对应关系:
例如:查询GSR的cpmCPUTotal1min
./snmpwalk x.x.x.x
public .1.3.6.1.4.1.9.9.109.1.1.1.1.4
得到如下值:
0
0
1
20
1
查询对应物理板卡的index
cpmCPUTotalPhysicalIndex
./snmpwalk x.x.x.x
public.1.3.6.1.4.1.9.9.109.1.1.1.1.2
39
55
42
50
46
查询ENTITY-MIB库中的entPhysicalName :
./snmpget
x.x.x.x
public
.1.3.6.1.2.1.47.1.1.1.1.7.39
slot 0 (PRP)
./snmpget
x.x.x.x
public
.1.3.6.1.2.1.47.1.1.1.1.7.55
slot 4
./snmpget
x.x.x.x
public
.1.3.6.1.2.1.47.1.1.1.1.7.42
slot 5
./snmpget
x.x.x.x
public
.1.3.6.1.2.1.47.1.1.1.1.7.50
slot 7
./snmpget
x.x.x.x
public
.1.3.6.1.2.1.47.1.1.1.1.7.46
slot 6
在路由器上可以使用命令查看相应的板卡模块:
sh diag sum
SLOT 0
(RP/LC 0 ): Performance RouteProcessor
SLOT 4
(RP/LC 4 ): 4 port ATMOver SONET OC-3c/STM-1 Multi Mode
SLOT 5
(RP/LC 5 ): 3 Port GigabitEthernet
SLOT 6
(RP/LC 6 ): 3 Port GigabitEthernet
SLOT 7
(RP/LC 7 ): 4 Port PacketOver SONET OC-3c/STM-1 Multi Mode
于是可以得到各板卡cpu利用率为:
slot 0
--0%
slot 4---0%
slot 5---1%
slot 7---20%
slot 6---1%

如果是单CPU的,也可查询OLD-CISCO-CPU-MIB库中的.1.3.6.1.4.1.9.2.1.57,得到主RP或主引擎的cpu利用率。
查询IOS版本支持情况对于给定的oid或object也可查询支持的IOS版本:
点击view supporting images 可以得到其所支持的IOS版本汇集:
其他oid值1.
memory oid:1.3.6.1.4.1.9.9.48.1.1.1.5/snmpwalkx.x.x.x public .1.3.6.1.4.1.9.9.48.1.1.1.5
54727052
process
9646160
I/O
33401680
PCI
125648
Fast
2.
temperature oid:
1.3.6.1.4.1.9.9.13.1.3.1.3可以用search查询相关的object关键字:
如查找temperature的mib object:
找到相关的ciscoEnvMonTemperatureStatusValue点击可以得到温度的oid
1.3.6.1.4.1.9.9.13.1.3.1.3
示例:查看GSR的温度值:
./snmpwalk x.x.x.x public .1.3.6.1.4.1.9.9.13.1.3.1.3
31
37
42
32
42
30
42
32
39
27
33
35
38
33
39
34
38
33
36
32
32
31
31
31
查看GSR的对应板卡描述
./snmpwalk x.x.x.x public .1.3.6.1.4.1.9.9.13.1.3.1.2
Slot 0:Performance RouteProcessor Hot Sensor
Slot 0:Performance Route Processor Inlet Sensor
Slot 2:4 Port Packet Over SONET OC-3c/STM-1 HotSensor
Slot 2:4 Port Packet Over SONET OC-3c/STM-1 InletSensor
Slot 4:4 port ATM Over SONET OC-3c/STM-1 Hot Sensor
Slot 4:4 port ATM Over SONET OC-3c/STM-1 InletSensor
Slot 5:3 Port Gigabit Ethernet Hot Sensor
Slot 5:3 Port Gigabit Ethernet Inlet Sensor
Slot 6:3 Port Gigabit Ethernet Hot Sensor
Slot 6:3 Port Gigabit Ethernet Inlet Sensor
Slot 11:Performance RouteProcessor Hot Sensor
Slot 11:Performance Route Processor Inlet Sensor
Slot 16:Clock Scheduler Card Hot Sensor
Slot 16:Clock Scheduler Card Inlet Sensor
Slot 17:Clock Scheduler Card Hot Sensor
Slot 17:Clock Scheduler Card Inlet Sensor
Slot 18:Switch Fabric Card Hot Sensor
Slot 18:Switch Fabric Card Inlet Sensor
Slot 19:Switch Fabric Card Hot Sensor
Slot 19:Switch Fabric Card Inlet Sensor
Slot 24:DC Power Supply Inlet Sensor
Slot 26:DC Power Supply Inlet Sensor
Slot 28:Blower Module(12) Inlet Sensor
Slot 29:Blower Module(12) Inlet Sensor
从而可以得到对应板卡的温度值


同样可以得到风扇、电压等的mib值
1.
voltage oid:
1.3.6.1.4.1.9.9.13.1.2.1.32.
fan oid:
1.3.6.1.4.1.9.9.13.1.4.1.3温度、风扇、电压都属于 CISCO-ENVMON-MIB库。
3.
interface traffic oid:对于端口流量属于IF-MIB 库:
ifDescr:
1.3.6.1.2.1.2.2.1.2.2
ifInOctets
1.3.6.1.2.1.2.2.1.2.10
ifOutOctets
1.3.6.1.2.1.2.2.1.2.16
ifName
1.3.6.1.2.1.31.1.1.1.1(板卡描述)
ifHCInOctets (6)
1.3.6.1.2.1.31.1.1.1.6(64位计数器)
ifHCOutOctets(10)
1.3.6.1.2.1.31.1.1.1.10 (64位计数器)
4.
OSPF 相关:1.3.6.1.2.1.14 属于OSPF-MIB库另 CISCO-OSPF-MIB中扩展了一些参数信息
cospf
1.3.6.1.4.1.9.10.99
5.
BGP相关:1.3.6.1.2.1.15
属于BGP4-MIB另CISCO-BGP4-MIB 中扩展了一些参数信息
ciscoBgp4MIB
1.3.6.1.4.1.9.9.187

 

Load ## 机器负载
1 minute Load: .1.3.6.1.4.1.2021.10.1.3.1
5 minute Load: .1.3.6.1.4.1.2021.10.1.3.2
15 minute Load: .1.3.6.1.4.1.2021.10.1.3.3

CPU
percentage of user CPU time: .1.3.6.1.4.1.2021.11.9.0
raw user cpu time: .1.3.6.1.4.1.2021.11.50.0
percentages of system CPU time: .1.3.6.1.4.1.2021.11.10.0
raw system cpu time: .1.3.6.1.4.1.2021.11.52.0
percentages of idle CPU time: .1.3.6.1.4.1.2021.11.11.0
raw idle cpu time: .1.3.6.1.4.1.2021.11.53.0
raw nice cpu time: .1.3.6.1.4.1.2021.11.51.0

对应字符串是hrProcessorLoad

Memory Statistics

Total Swap Size snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.3.0
UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 489940 kB


Available Swap Space snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.4.0
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 284752 kB


Total RAM in machine snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.5.0
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 255672 kB


The available real memory snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.6.0
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 14456 kB


the Total free memory in the machine (free Swap memory + free RAM memory)

snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.11.0
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 298804 kB


Total RAM Shared snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.13.0
UCD-SNMP-MIB::memShared.0 = INTEGER: 0 kB


Total RAM Buffered snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.14.0
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 2888 kB


Total Cached Memory snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.15.0
UCD-SNMP-MIB::memCached.0 = INTEGER: 47816 kB

Disk Statistics

The snmpd.conf needs to be edited. Add the following (assuming a machine with a single ‘/’ partition):

disk / 100000 (or)

includeAllDisks 10% for all partitions and disks

The OIDs are as follows

Path where the disk is mounted: .1.3.6.1.4.1.2021.9.1.2.1
Path of the device for the partition: .1.3.6.1.4.1.2021.9.1.3.1
Total size of the disk/partion (kBytes): .1.3.6.1.4.1.2021.9.1.6.1
Available space on the disk: .1.3.6.1.4.1.2021.9.1.7.1
Used space on the disk: .1.3.6.1.4.1.2021.9.1.8.1
Percentage of space used on disk: .1.3.6.1.4.1.2021.9.1.9.1
Percentage of inodes used on disk: .1.3.6.1.4.1.2021.9.1.10.1

System Uptime: .1.3.6.1.2.1.1.3.0

Examples

These Commands you need to run on the SNMP server

Get available disk space for / on the target host

#snmpget -v 1 -c “community” target_name_or_ip .1.3.6.1.4.1.2021.9.1.7.1

this will return available disk space for the first entry in the ‘disk’ section of snmpd.conf; replace 1 with n for the nth entry

Get the 1-minute system load on the target host

#snmpget -v 1 -c “community” target_name_or_ip .1.3.6.1.4.1.2021.10.1.3.1

Get the 5-minute system load on the target host

#snmpget -v 1 -c “community” target_name_or_ip .1.3.6.1.4.1.2021.10.1.3.2

Get the 15-minute system load on the target host

#snmpget -v 1 -c “community” target_name_or_ip .1.3.6.1.4.1.2021.10.1.3.3

Get amount of available swap space on the target host

#snmpget -v 1 -c “community” target_name_or_ip .1.3.6.1.4.1.2021.4.4.0

本文出自 “莫长空” 博客,谢绝转载!

你可能感兴趣的:(职场,oid,休闲)