简介
本文档介绍了为了从网络管理系统(NMS)获取思科交换机接口上的使用功率而对pethMainPseConsumentPower对象标识符(OID)进行轮询的混淆。
问题
简单网络管理协议(SNMP)OID - 1.3.6.1.2.1.105.1.3.1.1.4(pethMainPseConsumptionPower)在轮询以获得使用功率(瓦)时,返回的值与思科交换机上通常使用的CLI不匹配。
示例:
NMS>snmpwalk -c public -v2c 10.106.36.239 1.3.6.1.2.1.105.1.3.1.1.4
SNMPv2-SMI::mib-2.105.1.3.1.1.2.1 = Gauge32: 370
SNMPv2-SMI::mib-2.105.1.3.1.1.3.1 = INTEGER: 1
SNMPv2-SMI::mib-2.105.1.3.1.1.4.1 = Gauge32: 121
SNMPv2-SMI::mib-2.105.1.3.1.1.5.1 = INTEGER: 0
Switch#
Show power inline
Available:370.0(w)
Used:279.9(w) Remaining:90.1(w)
Interface Admin Oper Power Device Class Max
(Watts)
--------- ------ ---------- ------- ------------------- ----- ----
Fa0/1 auto off 0.0 n/a n/a 15.4
Fa0/2 auto off 0.0 n/a n/a 15.4
Fa0/3 auto off 0.0 n/a n/a 15.4
Fa0/4 auto off 0.0 n/a n/a 15.4
Fa0/5 auto on 3.3 IP Phone 7821 1 15.4
Fa0/6 auto off 0.0 n/a n/a 15.4
Fa0/7 auto off 0.0 n/a n/a 15.4
Fa0/8 auto off 0.0 n/a n/a 15.4
Fa0/9 auto on 3.3 IP Phone 7821 1 15.4
Fa0/10 auto off 0.0 n/a n/a 15.4
Fa0/11 auto off 0.0 n/a n/a 15.4
Fa0/12 auto off 0.0 n/a n/a 15.4
Fa0/13 auto on 3.3 IP Phone 7821 1 15.4
Fa0/14 auto on 13.7 IP Phone DX650 4 15.4
Fa0/15 auto on 3.3 IP Phone 7821 1 15.4
[an error occurred while processing this directive]
以前的行为在以下硬件和软件版本中出现:
Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 52 WS-C2960+48PST-S 15.0(2)SE6 C2960-LANLITEK9-M
--
Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 26 WS-C2960+24PC-S 15.0(2)SE6 C2960-LANLITEK9-M
--
Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 52 WS-C2960S-48LPS-L 15.0(2)EX5 C2960S-UNIVERSALK9-M
2 52 WS-C2960S-48LPS-L 15.0(2)EX5 C2960S-UNIVERSALK9-M
[an error occurred while processing this directive]
解决方案
OID pethMainPseConsumptionPower返回接口的以太网供电(PoE)消耗的功率。对于像2960这样的交换机,该对象标识符具有功率感应和管制功能,它为PoE设备提供实际功耗。通过show power inline police命令可以看到这一点,该命令提供实际功耗,以及端口单个功耗(在“操作电源”下以及末尾的“总计”下)。
NMS> snmpwalk -v 2c -c public 10.106.36.239 1.3.6.1.2.1.105.1.3.1.1
SNMPv2-SMI::mib-2.105.1.3.1.1.2.1 = Gauge32: 462
SNMPv2-SMI::mib-2.105.1.3.1.1.3.1 = INTEGER: 1
SNMPv2-SMI::mib-2.105.1.3.1.1.4.1 = Gauge32: 23
SNMPv2-SMI::mib-2.105.1.3.1.1.5.1 = INTEGER: 0
Switch#
show power inline police
Available:
462.0(w)
Used:43.6(w) Remaining:418.4(w)
Interface Admin Oper Admin Oper Cutoff Oper
State State Police Police Power Power
--------- ------ ---------- ---------- ---------- ------ -----
Gi0/1 auto on none n/a n/a 5.7
Gi0/2 auto on none n/a n/a 3.9
Gi0/3 auto on none n/a n/a 5.2
Gi0/4 auto on none n/a n/a 8.7
Gi0/5 auto off none n/a n/a n/a
Gi0/6 auto off none n/a n/a n/a
Gi0/7 auto off none n/a n/a n/a
Gi0/8 auto off none n/a n/a n/a
Gi0/9 auto off none n/a n/a n/a
Gi0/10 auto off none n/a n/a n/a
Gi0/11 auto off none n/a n/a n/a
Gi0/12 auto off none n/a n/a n/a
Gi0/13 auto off none n/a n/a n/a
Gi0/14 auto off none n/a n/a n/a
Gi0/15 auto off none n/a n/a n/a
Gi0/16 auto off none n/a n/a n/a
Gi0/17 auto off none n/a n/a n/a
Gi0/18 auto off none n/a n/a n/a
Gi0/19 auto off none n/a n/a n/a
Interface Admin Oper Admin Oper Cutoff Oper
State State Police Police Power Power
--------- ------ ---------- ---------- ---------- ------ -----
Gi0/20 auto off none n/a n/a n/a
Gi0/21 auto off none n/a n/a n/a
Gi0/22 auto off none n/a n/a n/a
Gi0/23 auto off none n/a n/a n/a
Gi0/24 auto off none n/a n/a n/a
Gi0/25 auto off none n/a n/a n/a
Gi0/26 auto off none n/a n/a n/a
Gi0/27 auto off none n/a n/a n/a
Gi0/28 auto off none n/a n/a n/a
Gi0/29 auto off none n/a n/a n/a
Gi0/30 auto off none n/a n/a n/a
Gi0/31 auto off none n/a n/a n/a
Gi0/32 auto off none n/a n/a n/a
Gi0/33 auto off none n/a n/a n/a
Gi0/34 auto off none n/a n/a n/a
Gi0/35 auto off none n/a n/a n/a
Gi0/36 auto off none n/a n/a n/a
Gi0/37 auto off none n/a n/a n/a
Gi0/38 auto off none n/a n/a n/a
Gi0/39 auto off none n/a n/a n/a
Gi0/40 auto off none n/a n/a n/a
Gi0/41 auto off none n/a n/a n/a
Interface Admin Oper Admin Oper Cutoff Oper
State State Police Police Power Power
--------- ------ ---------- ---------- ---------- ------ -----
Gi0/42 auto off none n/a n/a n/a
Gi0/43 auto off none n/a n/a n/a
Gi0/44 auto off none n/a n/a n/a
Gi0/45 auto off none n/a n/a n/a
Gi0/46 auto off none n/a n/a n/a
Gi0/47 auto off none n/a n/a n/a
Gi0/48 auto off none n/a n/a n/a
--------- ------ ---------- ---------- ---------- ------ -----
Totals: 23.4
[an error occurred while processing this directive]
USED功率列表示分配给端口的PoE量。
AVAILABLE电源列表示系统中PoE的总量。
剩余电源列表示(可用 — 已用)
因此,用于比较pethMainPseConsumentPower的SNMPWALK输出的正确命令是show power inline police。
相关信息
配置以太网供电