Cisco Cisco IOS Software Release 12.2(25)S

Page de 68
      Embedded Event Manager 2.0
Configuration Examples for Embedded Event Manager 2.0
14
Cisco IOS Release 12.2(25)S
Figure 2
Dual RP Topology
The commands used to register the policy are shown below.
event manager applet memory-demo 
 event snmp oid 1.3.6.1.4.1.9.9.48.1.1.1.6.1 get-type exact entry-op lt entry-val 5120000 
poll-interval 10
 action 1.0 syslog priority critical msg "Memory exhausted; current available memory is 
$_snmp_oid_val bytes"
 action 2.0 force-switchover
The registered applet is displayed using the show event manager policy registered command:
Router# show event manager policy registered
No.  Type    Event Type          Time Registered           Name
1    applet  snmp                Thu Jan30  05:57:16 2003  memory-demo
 oid {1.3.6.1.4.1.9.9.48.1.1.1.6.1} get-type exact entry-op lt entry-val {5120000} 
poll-interval 10
 action 1.0 syslog priority critical msg Memory exhausted; current available memory is 
$_snmp_oid_val bytes
 action 2.0 force-switchover
For the purpose of this example, a memory depletion is forced on the router, and a series of show 
memory
 commands are executed to watch the memory deplete:
Router# show memory
                Head    Total(b)     Used(b)     Free(b)   Lowest(b)  Largest(b)
Processor   53585260   212348444   119523060    92825384    92825384    92365916
Fast        53565260      131080       70360       60720       60720       60668
Router# show memory
                Head    Total(b)     Used(b)     Free(b)   Lowest(b)  Largest(b)
Processor   53585260   212364664   164509492    47855172    47855172    47169340
Fast        53565260      131080       70360       60720       60720       60668
Router# show memory
                Head    Total(b)     Used(b)     Free(b)   Lowest(b)  Largest(b)
Processor   53585260   212369492   179488300    32881192    32881192    32127556
Fast        53565260      131080       70360       60720       60720       60668
When the threshold is reached, an EEM event is triggered. The applet named memory-demo runs, 
causing a syslog message to be written to the console and a switch to be made to the secondary RP. The 
following messages are logged:
00:08:31: %HA_EM-2-LOG: memory-demo: Memory exhausted; current available memory is 4484196 
bytes
00:08:31: %HA_EM-6-FMS_SWITCH_HARDWARE: fh_io_msg: Policy has requested a hardware 
switchover
95538
Ethernet
Ethernet
Primary RP
Secondary RP
Corporate
backbone