N5010# sh ver | in image|compile BIOS compile time: 09/08/09 kickstart image file is: bootflash:/n5000-uk9-kickstart.4.2.1.N2.1.bin kickstart compile time: 7/28/2010 18:00:00 [07/29/2010 01:10:19] system image file is: bootflash:/n5000-uk9.4.2.1.N2.1.bin system compile time: 7/28/2010 18:00:00 [07/29/2010 05:18:12] n5010# n5010# conf t Enter configuration commands, one per line. End with CNTL/Z. n5010(config)# snmp-server ? aaa-user Set duration for which aaa-cached snmp user exists community Set community string and access privs contact Modify sysContact context SNMP context to be mapped counter Set duration for which cached snmp counter cleared enable Enable SNMP Traps globalEnforcePriv Globally enforce privacy for all the users host Specify hosts to receive SNMP notifications location Modify sysLocation mib Mib access parameters protocol Snmp protocol operations source-interface Source interface to be used for sending out SNMP notifications tcp-session Enable one time authentication for snmp over tcp session. user Define a user who can access the SNMP engine n5010(config)# snmp-server host ? A.B.C.D|A:B::C:D|WORD IPv4 or IPv6 address or DNS Name of SNMP notification host n5010(config)# snmp-server host 10.10.10.10 ? WORD SNMPv1/v2c community string or SNMPv3 user name (Max Size 32) filter-vrf VRF whose notifications are to filtered informs Send Inform messages to this host source-interface Source interface to be used for sending out SNMP notifications to this host traps Send Traps messages to this host use-vrf VRF name on which notifications are to be sent version SNMP version to use for notification messages n5010(config)# snmp-server host 10.10.10.10 public ? <cr> udp-port The notification host's UDP port number n5010(config)# snmp-server host 10.10.10.10 public n5010(config)# n5010(config)# snmp-server host 10.10.10.10 use-vrf ? WORD VRF name (Max Size 32) n5010(config)# snmp-server host 10.10.10.10 use-vrf default ? <cr> udp-port The notification host's UDP port number n5010(config)# snmp-server host 10.10.10.10 use-vrf default n5010(config)# n5010(config)# snmp-server enable ? traps Enable SNMP traps n5010(config)# snmp-server enable traps ? <cr> aaa Module notifications enable bridge Enable SNMP STP Bridge MIB traps callhome Module notifications enable cfs Module notifications enable config Module notifications enable entity Module notifications enable feature-control Module notifications enable license Module notifications enable link Module notifications enable rf Module notifications enable rmon Module notifications enable snmp Module notifications enable stpx Enable SNMP STPX MIB traps upgrade Module notifications enable zone Module notifications enable n5010(config)# snmp-server enable traps rmon ? <cr> fallingAlarm Rmon falling alarm hcFallingAlarm High capacity Rmon falling alarm hcRisingAlarm High capacity Rmon rising alarm risingAlarm Rmon rising alarm n5010(config)# snmp-server enable traps rmon n5010(config)# n5010(config)# sh run | in snmp-server snmp-server host 10.10.10.10 traps version 1 public snmp-server host 10.10.10.10 use-vrf default n5010(config)# n5010(config)# sh snmp trap | in rmon rmon : risingAlarm Yes rmon : fallingAlarm Yes rmon : hcRisingAlarm Yes rmon : hcFallingAlarm Yes n5010(config)# -------------------------------------------------------------------------------- n5010(config)# rmon ? alarm Configure an RMON alarm event Configure an RMON event hcalarm Configure an High Capacity RMON alarm n5010(config)# rmon event ? <1-65535> Event number n5010(config)# rmon event 1 ? <cr> description Specify a description of the event log Generate RMON log when the event fires owner Specify an owner for the event trap Generate SNMP trap when event fires n5010(config)# rmon event 1 log ? <cr> description Specify a description of the event owner Specify an owner for the event trap Generate SNMP trap when event fires n5010(config)# rmon event 1 log trap ? WORD SNMP community string (Max Size 32) n5010(config)# rmon event 1 log trap public ? <cr> description Specify a description of the event owner Specify an owner for the event n5010(config)# rmon event 1 log trap public description ? WORD Event description n5010(config)# rmon event 1 log trap public description "High CPU Utilization" n5010(config)# n5010(config)# rmon alarm ? <1-65535> Alarm number n5010(config)# rmon alarm 1 ? WORD MIB object to monitor n5010(config)# rmon alarm 1 1.3.6.1.4.1.9.9.305.1.1.1.0 ? <1-700000> Sample interval n5010(config)# rmon alarm 1 1.3.6.1.4.1.9.9.305.1.1.1.0 30 ? absolute Test each sample directly delta Test delta between samples n5010(config)# rmon alarm 1 1.3.6.1.4.1.9.9.305.1.1.1.0 30 absolute ? rising-threshold Configure the rising threshold n5010(config)# rmon alarm 1 1.3.6.1.4.1.9.9.305.1.1.1.0 30 absolute rising-threshold ? <-2147483648-2147483647> Rising threshold value n5010(config)# rmon alarm 1 1.3.6.1.4.1.9.9.305.1.1.1.0 30 absolute rising-threshold 20 ? <0-65535> Event to fire on rising threshold crossing falling-threshold Configure the falling threshold n5010(config)# rmon alarm 1 1.3.6.1.4.1.9.9.305.1.1.1.0 30 absolute rising-threshold 20 1 ? falling-threshold Configure the falling threshold n5010(config)# rmon alarm 1 1.3.6.1.4.1.9.9.305.1.1.1.0 30 absolute rising-threshold 20 1 falling-threshold ? <-2147483648-2147483647> Falling threshold value n5010(config)# rmon alarm 1 1.3.6.1.4.1.9.9.305.1.1.1.0 30 absolute rising-threshold 20 1 falling-threshold 19 ? <cr> <0-65535> Event to fire on falling threshold crossing owner Specify an owner for the alarm n5010(config)# rmon alarm 1 1.3.6.1.4.1.9.9.305.1.1.1.0 30 absolute rising-threshold 20 1 falling-threshold 19 n5010(config)# n5010(config)# sh run | in rmon rmon event 1 log trap public description "High CPU Utilization" rmon alarm 1 1.3.6.1.4.1.9.9.305.1.1.1.0 30 absolute rising-threshold 20 1 falling-threshold 19 owner admin n5010(config)# n5010(config)# sh rmon events Event 1 is active, owned by Description is High CPU Utilization Event firing causes log and trap to community public, last fired never n5010(config)# n5010(config)# sh rmon alarms Alarm 1 is active, owned by admin Monitors 1.3.6.1.4.1.9.9.305.1.1.1.0 every 30 second(s) Taking absolute samples, last value was 7 Rising threshold is 20, assigned to event 1 Falling threshold is 19, assigned to event 0 On startup enable rising or falling alarm n5010(config)# n5010(config)# sh rmon log n5010(config)# -------------------------------------------------------------------------------- n5010(config)# sh proc cpu hist 1 1 1 1 333424333234332332835343233343442323352432333253033233534333 100 90 80 70 60 50 40 30 20 10 # # # # # # # # # 0....5....1....1....2....2....3....3....4....4....5....5.... 0 5 0 5 0 5 0 5 0 5 CPU% per second (last 60 seconds) # = average CPU% 11 0014111111 0070335325 100 ** 90 ** 80 ** 70 ** 60 ** 50 #* 40 #* * 30 #* * 20 ##** * * 10 ##******** 0....5....1....1....2....2....3....3....4....4....5....5.... 0 5 0 5 0 5 0 5 0 5 CPU% per minute (last 60 minutes) * = maximum CPU% # = average CPU% 100 90 80 70 60 50 40 30 20 10 0....5....1....1....2....2....3....3....4....4....5....5....6....6....7. 0 5 0 5 0 5 0 5 0 5 0 5 0 CPU% per hour (last 72 hours) * = maximum CPU% # = average CPU% n5010(config)# n5010(config)# sh run int e1/1 !Command: show running-config interface Ethernet1/1 !Time: Wed May 25 09:35:19 2011 version 4.2(1)N2(1) interface Ethernet1/1 spanning-tree port type edge spanning-tree bpdufilter enable speed 1000 n5010(config)# n5010(config)# sh run int e1/2 !Command: show running-config interface Ethernet1/2 !Time: Wed May 25 09:35:20 2011 version 4.2(1)N2(1) interface Ethernet1/2 spanning-tree port type edge spanning-tree bpdufilter enable speed 1000 n5010(config)# n5010(config)# sh spanning-tree VLAN0001 Spanning tree enabled protocol rstp Root ID Priority 32769 Address 0005.73af.fafc This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0005.73af.fafc Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Eth1/1 Desg FWD 4 128.129 Edge P2p Eth1/2 Desg FWD 4 128.130 Edge P2p n5010(config)# n5010(config)# feature interface-vlan n5010(config)# int vlan 1 n5010(config-if)# ip add 192.168.1.1/24 n5010(config-if)# no shut n5010(config-if)# 2011 May 25 09:38:01 n5010 %$ VDC-1 %$ %ARP-2-DUP_SRC_IP: arp [4043] Source address of packet received from 0005.73af.fafc on Vlan1(Ethernet 1/1) is duplicate of local, 192.168.1.1 n5010(config-if)# exit n5010(config)# 2011 May 25 09:38:11 n5010 %$ VDC-1 %$ %ARP-2-DUP_SRC_IP: arp [4 043] Source address of packet received from 0005.73af.fafc on Vlan1(Ethernet1/2 ) is duplicate of local, 192.168.1.1 n5010(config)# n5010(config)# sh proc cpu hist 1 1 1 15 32232333222223332222 324243392253333333362323232353422120394309909071868872019988 100 90 80 70 60 50 # 40 # # 30 # #################### 20 # #################### 10 # # # # # # # ### #################### 0....5....1....1....2....2....3....3....4....4....5....5.... 0 5 0 5 0 5 0 5 0 5 CPU% per second (last 60 seconds) # = average CPU% 11 00141111111975 00703353253753 100 ** * 90 ** * 80 ** ** 70 ** ** 60 ** ** 50 #* *** 40 #* * *** 30 #* * *** 20 ##** * * *** 10 ##*********### 0....5....1....1....2....2....3....3....4....4....5....5.... 0 5 0 5 0 5 0 5 0 5 CPU% per minute (last 60 minutes) * = maximum CPU% # = average CPU% 100 90 80 70 60 50 40 30 20 10 0....5....1....1....2....2....3....3....4....4....5....5....6....6....7. 0 5 0 5 0 5 0 5 0 5 0 5 0 CPU% per hour (last 72 hours) * = maximum CPU% # = average CPU% n5010(config)# n5010(config)# sh rmon log Event 1 1 High CPU UtilizationRising alarm 1, fired at 2011/05/25-09:38:20 iso.3.6.1.4.1.9.9.305.1.1.1.0=26 >= 20 n5010(config)# n5010(config)# sh clock Wed May 25 09:38:32 UTC 2011 n5010(config)# n5010(config)# sh rmon alarms Alarm 1 is active, owned by admin Monitors 1.3.6.1.4.1.9.9.305.1.1.1.0 every 30 second(s) Taking absolute samples, last value was 26 Rising threshold is 20, assigned to event 1 Falling threshold is 19, assigned to event 0 On startup enable rising or falling alarm n5010(config)# n5010(config)# sh rmon events Event 1 is active, owned by Description is High CPU Utilization Event firing causes log and trap to community public, last fired 2011/05/25-09:25:01 n5010(config)#
Reference:
CISCO-SYSTEM-EXT-MIB
RMON-MIB
IF-MIB
1.3.6.1.4.1.9.9.305.1.1.1 | CISCO-SYSTEM-EXT-MIB - cseSysCPUUtilization |
1.3.6.1.2.1.16 | RMON-MIB - rmon |
1.3.6.1.2.1.16.3.1.1.1 | RMON-MIB - alarmIndex |
1.3.6.1.2.1.16.3.1.1.3 | RMON-MIB - alarmVariable |
1.3.6.1.2.1.16.3.1.1.4 | RMON-MIB - alarmSampleType |
1.3.6.1.2.1.16.3.1.1.5 | RMON-MIB - alarmValue |
1.3.6.1.2.1.16.3.1.1.7 | RMON-MIB - alarmRisingThreshold |
1.3.6.1.2.1.2.2.1.2 | IF-MIB - ifDescr |
UPDATE: Cisco has published a document titled How to Collect CPU Utilization on Cisco IOS Devices Using SNMP (http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094a94.shtml) which provides some best practices upon monitoring network devices. It is recommending to monitor the CPU of network devices using the cpmCPUTotal5minRev MIB object to have a more accurate view of the performance of network devices.
No comments:
Post a Comment