簡介
本文描述為從網路管理系統(NMS)取得Cisco交換器介面的使用電源,而對pethMainPseConsumptionPower物件識別碼(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命令看到此情況,該命令提供實際功耗以及埠單獨功耗(位於Oper Power下,結尾也是Totals下)。
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的總量。
REMAINING POWER列表示(可用 — 已使用)
因此,要比較pethMainPseConsumptionPower SNMPWALK的輸出,要使用的正確命令是show power inline police。
相關資訊
配置乙太網供電