Cisco IOS High Availability Command Reference
debug mpls ldp graceful-restart through event wdsysmon

Table Of Contents

debug mpls ldp graceful-restart

debug mpls traffic-eng lsd-client

debug mpls vpn ha

debug ppp redundancy

debug pppatm redundancy

debug pppoe redundancy

debug qos ha

debug redundancy

debug redundancy (RP)

debug snmp sync

debug standby events

debug vrrp all

debug vrrp error

debug vrrp events

debug vrrp packets

debug vrrp state

destination (call home)

event application

event cli

event counter

event interface

event ioswdsysmon

event manager applet

event manager directory user

event manager environment

event manager history size

event manager policy

event manager run

event manager scheduler script

event manager scheduler suspend

event manager session cli username

event none

event oir

event process

event snmp

event syslog

event timer

event wdsysmon


debug mpls ldp graceful-restart

To display debugging information for Multiprotocol (MPLS) Label Distribution Protocol (LDP) stateful switchover (SSO) nonstop forwarding (NSF) support and Graceful Restart, use the debug mpls ldp graceful-restart command in privileged EXEC mode. To disable the display of this debugging information, use the no form of this command.

debug mpls ldp graceful-restart

no debug mpls ldp graceful-restart

Syntax Description

This command has no arguments or keywords.

Defaults

The display of debugging information is not enabled.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.0(29)S

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB and implemented on the Cisco 10000 series routers.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.


Usage Guidelines

This command shows events and errors related to LDP Graceful Restart.

Examples

The following example shows sample output from the debug mpls ldp graceful-restart command. The output shows that a session was lost. The status message show the events that happen during recovery of the bindings.

Router# debug mpls ldp graceful-restart

LDP GR: GR session 10.110.0.10:0:: lost
LDP GR: down nbr 10.110.0.10:0:: created [1 total]
LDP GR: GR session 10.110.0.10:0:: bindings retained
LDP GR: down nbr 10.110.0.10:0:: added all 7 addresses [7 total]
LDP GR: down nbr 10.110.0.10:0:: state change (None -> Reconnect-Wait)
LDP GR: down nbr 10.110.0.10:0:: reconnect timer started [120000 msecs]
LDP GR: down nbr 10.110.0.10:0:: added to bindings task queue [1 entries]
LDP GR: searching for down nbr record (10.110.0.10:0, 10.2.0.10)
LDP GR: search for down nbr record (10.110.0.10:0, 10.2.0.10) returned 10.110.0.10:0
LDP GR: Added FT Sess TLV (Rconn 120000, Rcov 120000) to INIT msg to 10.110.0.10:0
LDP GR: Tagcon querying for up to 12 bindings update tasks
LDP GR: down nbr 10.110.0.10:0:: requesting bindings MARK for {10.110.0.10:0, 1}
LDP GR: down nbr 10.110.0.10:0:: removed from bindings task queue [0 entries]
LDP GR: Requesting 1 bindings update tasks [0 left in queue]
LDP GR: 10.1.0.0/8:: updating binding from 10.110.0.10:0, inst 1:: marking stale; 
LDP GR: 10.2.0.0/16:: updating binding from 10.110.0.10:0, inst 1:: marking stale; 
LDP GR: 10.0.0.14/32:: updating binding from 10.110.0.10:0, inst 1:: marking stale; 
LDP GR: searching for down nbr record (10.110.0.10:0, 10.2.0.10)
LDP GR: search for down nbr record (10.110.0.10:0, 10.2.0.10) returned 10.110.0.10:0
LDP GR: Added FT Sess TLV (Rconn 120000, Rcov 120000) to INIT msg to 10.110.0.10:0
LDP GR: searching for down nbr record (10.110.0.10:0, 10.2.0.10)
LDP GR: search for down nbr record (10.110.0.10:0, 10.2.0.10) returned 10.110.0.10:0
LDP GR: Added FT Sess TLV (Rconn 120000, Rcov 120000) to INIT msg to 10.110.0.10:0
LDP GR: searching for down nbr record (10.110.0.10:0, 10.2.0.10)
LDP GR: search for down nbr record (10.110.0.10:0, 10.2.0.10) returned 10.110.0.10:0
LDP GR: Added FT Sess TLV (Rconn 120000, Rcov 120000) to INIT msg to 10.110.0.10:0
LDP GR: searching for down nbr record (10.110.0.10:0, 10.2.0.10)
LDP GR: search for down nbr record (10.110.0.10:0, 10.2.0.10) returned 10.110.0.10:0
LDP GR: Added FT Sess TLV (Rconn 120000, Rcov 120000) to INIT msg to 10.110.0.10:0
LDP GR: searching for down nbr record (10.110.0.10:0, 10.2.0.10)
LDP GR: search for down nbr record (10.110.0.10:0, 10.2.0.10) returned 10.110.0.10:0
LDP GR: Added FT Sess TLV (Rconn 120000, Rcov 120000) to INIT msg to 10.110.0.10:0
LDP GR: Received FT Sess TLV from 10.110.0.10:0  (fl 0x1, rs 0x0, rconn 120000, rcov 
120000)
LDP GR: GR session 10.110.0.10:0:: allocated instance, 2
LDP GR: GR session 10.110.0.10:0:: established
LDP GR: GR session 10.110.0.10:0:: found down nbr 10.110.0.10:0
LDP GR: down nbr 10.110.0.10:0:: reconnect timer stopped
LDP GR: down nbr 10.110.0.10:0:: state change (Reconnect-Wait -> Recovering)
LDP GR: down nbr 10.110.0.10:0:: recovery timer started [120000 msecs]
%LDP-5-GR: GR session 10.110.0.10:0 (inst. 2): starting graceful recovery
%LDP-5-NBRCHG: LDP Neighbor 10.110.0.10:0 is UP
LDP GR: 10.1.0.0//8:: refreshing stale binding from 10.110.0.10:0, inst 1 -> inst 2
LDP GR: 10.43.0.0//16:: refreshing stale binding from 10.110.0.10:0, inst 1 -> inst 2
LDP GR: down nbr 10.110.0.10:0:: recovery timer expired
%LDP-5-GR: GR session 10.110.0.10:0 (inst. 2): completed graceful recovery
LDP GR: down nbr 10.110.0.10:0:: destroying record [0 left]
LDP GR: down nbr 10.110.0.10:0:: state change (Recovering -> Delete-Wait)
LDP GR: down nbr 10.110.0.10:0:: added to bindings task queue [1 entries]
LDP GR: Tagcon querying for up to 12 bindings update tasks
LDP GR: down nbr 10.110.0.10:0:: requesting bindings DEL for {10.110.0.10:0, 1}
LDP GR: down nbr 10.110.0.10:0:: removed from bindings task queue [0 entries]
LDP GR: Requesting 1 bindings update tasks [0 left in queue]
LDP GR: GR session 10.110.0.10:0:: released instance, 1

The debug output is formatted in three general ways.

LDP GR: GR session 10.110.0.10:0:: found down nbr 10.110.0.10:0

down nbr 10.110.0.10:0:: removed from bindings task queue [0 entries]

LDP GR: 2.0.0.0/8:: updating binding from 10.110.0.10:0, inst 1:: marking stale;

Table 18 describes the fields for the debug command output.

Table 18 debug mpls ldp graceful-restart Command Field Descriptions 

Field
Description

LDP GR

Identifies LDP Graceful Restart application

GR session 10.110.0.10:0

ID of the LDP session that is enabled for Graceful Restart.

found down nbr 10.110.0.10:0

Describes the event that is happening to that LDP session.

down nbr 10.110.0.10:0::

Identifies the Down Neighbor record, which logs the state of a recently lost Graceful Restart session.

removed from bindings task queue [0 entries]

Describes the event that is happening to the recently lost Graceful Restart session.

2.0.0.0/8::

Identifies the Forwarding Equivalence Class (FEC) associated with the remote label binding being modified. The FEC identifies the Label Information Base (LIB) entry.

updating binding

Lists the operation being performed on the remote label binding.

10.110.0.10:0, inst 1:: marking stale;

Identifies the LDP session during which the remote label binding was learned.


:

Related Commands

Command
Description

show mpls ldp graceful-restart

Displays a summary of the LDP Graceful Restart status.


debug mpls traffic-eng lsd-client

To display the Application Programming Interface (API) messages sent to the Label Switching Database (LSD) from the Traffic Engineering (TE) client, use the debug mpls traffic-eng lsd-client command in privileged EXEC mode. To disable the display of these messages, use the no form of this command.

debug mpls traffic-eng lsd-client

no debug mpls traffic-eng lsd-client

Syntax Description

This command has no arguments or keywords.

Defaults

Debugging is not enabled.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.2(25)S

This command was introduced.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB and implemented on the Cisco 10000 series routers.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(28)SRA.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(28)SXH.


Examples

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command and enable TE globally:

00:10:23: TE-LSD-CLIENT: register with LSD OK; conn_id = 23, recov time = 60000 s
00:10:23: TE-LSD-CLIENT: LSD is now up

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command and disable TE globally:

00:09:50: TE-LSD-CLIENT: unregister LSD client; result = OK; conn_id 23

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command and enable TE on specific interfaces on Cisco 7500 series routers:

00:10:23: TE-LSD-CLIENT: enabled TE LSD client on Ethernet1/0; status = OK
00:10:23: TE-LSD-CLIENT: enabled TE LSD client on Serial2/0; status = OK
00:10:23: TE-LSD-CLIENT: enabled TE LSD client on Serial3/0; status = OK

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command and disable TE on specific interfaces on Cisco 7500 series routers:

00:09:50: TE-LSD-CLIENT: disabled TE LSD client on Ethernet1/0; status = OK
00:09:50: TE-LSD-CLIENT: disabled TE LSD client on Serial2/0; status = OK
00:09:50: TE-LSD-CLIENT: disabled TE LSD client on Serial3/0; status = OK

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command and enable TE on specific interfaces on Cisco 10000 series routers:

00:10:23: TE-LSD-CLIENT: enabled TE LSD client on GigabitEthernet1/0/0; status = OK
00:10:23: TE-LSD-CLIENT: enabled TE LSD client on Serial2/0/0; status = OK
00:10:23: TE-LSD-CLIENT: enabled TE LSD client on Serial3/0/0; status = OK

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command and disable TE on specific interfaces on Cisco 10000 series routers:

00:09:50: TE-LSD-CLIENT: disabled TE LSD client on GigabitEthernet1/0/0; status = OK
00:09:50: TE-LSD-CLIENT: disabled TE LSD client on Serial2/0/0; status = OK
00:09:50: TE-LSD-CLIENT: disabled TE LSD client on Serial3/0/0; status = OK

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command, allocate labels on tunnel midpoints, and create tunnel midpoint rewrites on Cisco 7500 series routers:

00:14:04: TE-LSD-CLIENT: label alloc OK; label = 16, conn_id = 23
00:14:04: TE-LSD-CLIENT: Create TE mid rewrite for 10.100.100.100 1 [5], Result: OK
00:14:04:          In: Serial3/0, 16 Out: Serial2/0, 3

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command, allocate labels on tunnel midpoints, and create tunnel midpoint rewrites on a Cisco 10000 series router:

00:14:04: TE-LSD-CLIENT: label alloc OK; label = 16, conn_id = 23
00:14:04: TE-LSD-CLIENT: Create TE mid rewrite for 10.100.100.100 1 [5], Result: OK
00:14:04:          In: Serial3/0/0, 16 Out: Serial2/0/0, 3

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command, free labels on tunnel midpoints, and delete tunnel midpoints on a Cisco 7500 series router:

00:13:13: TE-LSD-CLIENT: Delete TE mid rewrite for iou-100_t1, Result: OK
00:13:13: In: Serial3/0, 16 Out: Serial2/0, 1
00:13:13: TE-LSD-CLIENT: free label 16 result =  OK; conn_id = 23

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command, free labels on tunnel midpoints, and delete tunnel midpoints on a Cisco 10000 series router:

00:13:13: TE-LSD-CLIENT: Delete TE mid rewrite for iou-100_t1, Result: OK
00:13:13: In: Serial3/0/0, 16 Out: Serial2/0/0, 1
00:13:13: TE-LSD-CLIENT: free label 16 result =  OK; conn_id = 23

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command and create tunnel headend rewrites on a Cisco 7500 series router:

00:09:10: TE-LSD-CLIENT: Create TE he rewrite for iou-100_t1, Result = OK
00:09:10: tun_inst: 7  Out: Serial3/0, 16  Dest: 10.0.0.2  
ps_flags: 0x60003

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command and create tunnel headend rewrites on a Cisco 10000 series router:

00:09:10: TE-LSD-CLIENT: Create TE he rewrite for iou-100_t1, Result = OK
00:09:10: tun_inst: 7  Out: Serial3/0/0, 16  Dest: 10.0.0.2  
ps_flags: 0x60003

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command and delete tunnel headend rewrites on a Cisco 7500 series router:

00:09:15: TE-LSD-CLIENT: Delete TE he rewrite for iou-100_t1, Result: OK
00:09:15: tun_inst: 7  Out: Serial3/0, 16  ps_flags: 0x60003

The following messages are displayed when you issue the debug mpls traffic-eng lsd-client command and delete tunnel headend rewrites on a Cisco 10000 series router:

00:09:15: TE-LSD-CLIENT: Delete TE he rewrite for iou-100_t1, Result: OK
00:09:15: tun_inst: 7  Out: Serial3/0/0, 16  ps_flags: 0x60003

Related Commands

Command
Description

debug mpls ip iprm events

Displays events related to the MPLS IPRM.

debug mpls ip iprm ldm

Displays debugging information for interactions between the IP LDMs and the MPLS IPRM.

debug mpls ip iprm mfi

Displays debugging information for interactions between the MFI and the MPLS IPRM.


debug mpls vpn ha

To enable the display of Virtual Private Network (VPN) high availability (HA) debugging information, use the debug mpls vpn ha command in privileged EXEC mode. To disable the display of VPN HA debugging information, use the no form of this command.

debug mpls vpn ha

no debug mpls vpn ha

Syntax Description

This command has no arguments or keywords.

Defaults

VPN HA debugging is not enabled.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.2(33)SRA

This command was introduced.

12.2(31)SB

This command was integrated into Cisco IOS Release 12.2(31)SB.


Examples

The following example shows sample output from the debug mpls vpn ha command:

Router# debug mpls vpn ha

VPN HA debugging is on.

debug ppp redundancy

To debug PPP synchronization on the networking device, use the debug ppp redundancy command in privileged EXEC mode. To disable the display of debugging output, use the no form of this command.

debug ppp redundancy [detailed | event]

no debug ppp redundancy [detailed | event]

Syntax Description

detailed

(Optional) Displays detailed debug messages related to specified PPP redundancy events.

event

(Optional) Displays information about protocol actions and transitions between action states (pending, waiting, idle) on the link.


Command Modes

Privileged EXEC

Command History

Release
Modification

12.0(22)S

This command was introduced on the Cisco 7500, 10000, and 12000 series Internet routers.

12.2(18)S

This command was integrated into Cisco IOS Release 12.2(18)S on
Cisco 7500 series routers.

12.2(20)S

Support was added for the Cisco 7304 router. The Cisco 7500 series router is not supported in Cisco IOS Release 12.2(20)S.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.


Examples

The following example displays detailed debug messages related to specified PPP redundancy events:

Router# debug ppp redundancy detailed


debug pppatm redundancy

To debug PPP over ATM (PPPoA) redundancy events on a dual route processor, high availability (HA) system and display Cluster Control Manager (CCM) events and messages, use the debug pppatm redundancy command in privileged EXEC mode. To disable the display of debugging output, use the no form of this command.

debug pppatm redundancy

no debug pppatm redundancy

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.2(31)SB2

This command was introduced.


Usage Guidelines

The CCM provides the capability to facilitate and synchronize session bring up on the standby processor of a dual route processor HA system. Use the debug pppatm redundancy command to display CCM events and messages for PPPoA sessions on HA systems.


Note The debug pppatm redundancy command does not display output on the active processor during normal synchronization, that is, the command displays output on the active processor only during an error condition.


This command is used only by Cisco engineers for internal debugging of CCM processes.

Examples

The following is sample output for the debug pppatm redundancy command from a Cisco 10000 Series router standby processor. No field descriptions are provided because command output is used for Cisco internal debugging purposes only.

Router# debug pppatm redundancy

*Dec  3 02:58:40.784: PPPATM HA: [14000001]: Received the first SHDB 
*Dec  3 02:58:40.784: PPPATM HA: [14000001]: Base hwidb not created > yet, queuing SHDB 
*Dec  3 02:58:40.784: PPPATM HA: [14000001]: 
Requesting base vaccess creation

debug pppoe redundancy

To debug PPP over Ethernet (PPPoE) redundancy events on a dual Route Processor high availability (HA) system and display cluster control manager (CCM) events and messages, use the debug pppoe redundancy command in privileged EXEC mode. To disable the display of debugging output, use the no form of this command.

debug pppoe redundancy

no debug pppoe redundancy

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.2(31)SB2

This command was introduced.

12.2(33)SRC

This command was integrated into Cisco IOS Release 12.2(33)SRC.


Usage Guidelines

The CCM provides the capability to facilitate and synchronize session initiation on the standby processor of a dual route processor HA system. Use the debug pppoe redundancy command to display CCM events and messages for PPPoE sessions. This command is used only by Cisco engineers for internal debugging of CCM processes.

Examples

The following is sample output from the debug pppoe redundancy command from a Cisco 10000 series router active processor. No field descriptions are provided because command output is used for Cisco internal debugging purposes only.

Router# debug pppoe redundancy

Nov 22 17:21:11.327: PPPoE HA[0xBE000008] 9: Session ready to sync data 
Nov 22 17:21:11.351: PPPoE HA[0xBE000008] 9: code = PADR, length = 58 
Nov 22 17:21:11.351: PPPoE HA[0xBE000008] 9: code = SESSION ID, length = 2 
Nov 22 17:21:11.351: PPPoE HA[0xBE000008] 9: code = SWITCH HDL, length = 4 
Nov 22 17:21:11.351: PPPoE HA[0xBE000008] 9: code = SEGMENT HDL, length = 4 
Nov 22 17:21:11.351: PPPoE HA[0xBE000008] 9: code = PHY SWIDB DESC, length = 20 
Nov 22 17:21:11.351: PPPoE HA[0xBE000008] 9: code = VACCESS DESC, length = 28 
Nov 22 17:21:11.351: PPPoE HA[0xBE000008] 9: Sync collection for ready events 
Nov 22 17:21:11.351: PPPoE HA[0xBE000008] 9: code = PADR, length = 58 
Nov 22 17:21:11.351: PPPoE HA[0xBE000008] 9: code = SESSION ID, length = 2 
Nov 22 17:21:11.351: PPPoE HA[0xBE000008] 9: code = SWITCH HDL, length = 4 
Nov 22 17:21:11.351: PPPoE HA[0xBE000008] 9: code = SEGMENT HDL, length = 4 
Nov 22 17:21:11.351: PPPoE HA[0xBE000008] 9: code = PHY SWIDB DESC, length = 20 
Nov 22 17:21:11.351: PPPoE HA[0xBE000008] 9: code = VACCESS DESC, length = 28

The following is sample output from the debug pppoe redundancy command from a Cisco 10000 series router standby processor:

Router# debug pppoe redundancy

Nov 22 17:21:11.448: PPPoE HA[0x82000008]: Recreating session: retrieving data 
Nov 22 17:21:11.464: PPPoE HA[0x82000008] 9: Session ready to sync data

The following is sample output from the debug pppoe redundancy command from a Cisco 7600 series router active processor.

Router# debug pppoe redundancy

Dec 17 15:14:37.060: PPPoE HA[0x131B01B1] 28039: Session ready to sync data
Dec 17 15:14:37.076: PPPoE HA[0x131B01B1] 28039: code = PADR, length = 48
Dec 17 15:14:37.076: PPPoE HA[0x131B01B1] 28039: code = SESSION ID, length = 2
Dec 17 15:14:37.076: PPPoE HA[0x131B01B1] 28039: code = SWITCH HDL, length = 4
Dec 17 15:14:37.076: PPPoE HA[0x131B01B1] 28039: code = SEGMENT HDL, length = 4
Dec 17 15:14:37.076: PPPoE HA[0x131B01B1] 28039: code = PHY SWIDB DESC, length = 20
Dec 17 15:14:37.076: PPPoE HA[0x131B01B1] 28039: code = VACCESS DESC, length = 28
Dec 17 15:14:37.076: PPPoE HA[0x131B01B1] 28039: Sync collection for ready events
Dec 17 15:14:37.076: PPPoE HA[0x131B01B1] 28039: code = PADR, length = 48
Dec 17 15:14:37.076: PPPoE HA[0x131B01B1] 28039: code = SESSION ID, length = 2
Dec 17 15:14:37.076: PPPoE HA[0x131B01B1] 28039: code = SWITCH HDL, length = 4
Dec 17 15:14:37.076: PPPoE HA[0x131B01B1] 28039: code = SEGMENT HDL, length = 4
Dec 17 15:14:37.076: PPPoE HA[0x131B01B1] 28039: code = PHY SWIDB DESC, length = 20
Dec 17 15:14:37.076: PPPoE HA[0x131B01B1] 28039: code = VACCESS DESC, length = 28

The following is sample output from the debug pppoe redundancy command from a Cisco 7600 series router standby processor:

Router# debug pppoe redundancy

Dec 17 15:14:37.180: STDBY: PPPoE HA[0xE41B019B]: Recreating session: retrieving data
Dec 17 15:14:37.204: STDBY: PPPoE HA[0xE41B019B] 28039: Session ready to sync data

debug qos ha

To debug quality of service (QoS) information on the networking device, use the debug qos ha command in privileged EXEC mode. To disable the display of debugging output, use the no form of this command.

debug qos ha [detail]

no debug qos ha [detail]

Syntax Description

detail

(Optional) Displays detailed debug messages related to specified QoS information.


Command Modes

Privileged EXEC

Command History

Release
Modification

12.2(25)S

This command was introduced.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.


Usage Guidelines

Use to determine that QoS in running properly on your networking device.

Examples

The following example enables QoS debugging:

Router# debug qos ha

debug redundancy

To enable the display of events for troubleshooting redundant dial shelf controllers (DSCs), use the debug redundancy command in privileged EXEC mode. To disable debugging output, use the no form of this command.

debug redundancy {all | ui | clk | hub}

no debug redundancy {all | ui | clk | hub}

Syntax Description

all

Displays all available information on redundant DSCs, including that specified by the following options in this table.

ui

Displays information on the user interface of the redundant DSCs.

clk

Displays information on the clocks of the redundant DSCs.

hub

Displays information on the BIC hub of the redundant DSCs. The hub is the Fast Ethernet link between the router and the DSC.


Command Default

The command is disabled.

Command Modes

Privileged EXEC

Command History

Release
Modification

11.3(6)AA

This command was introduced.

12.2(18)S

This command was integrated into Cisco IOS Release 12.2(18)S on Cisco 7500 series routers.

12.2(20)S

Support was added for the Cisco 7304 router. The Cisco 7500 series router is not supported in Cisco IOS Release 12.2(20)S.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.


Usage Guidelines

This command is issued from the router shelf console.

Examples

The output from this command consists of event announcements that can be used by authorized troubleshooting personnel.

debug redundancy (RP)

To enable the display of events for troubleshooting dual Route Processors (RPs), use the debug redundancy command in privileged EXEC mode. To disable the display of debugging output, use the no form of this command.

debug redundancy {ehsa | errors | fsm | kpa | msg | progression | status | timer}

no debug redundancy {ehsa | errors | fsm | kpa | msg | progression | status | timer}

Syntax Description

ehsa

Displays redundancy facility (RF) enhanced high system availability (EHSA) information.

errors

Displays RF errors.

fsm

Displays RF feasible successor metrics (FSM) events.

kpa

Displays RF keepalive events.

msg

Displays RF messaging events.

progression

Displays RF progression events.

status

Displays RF status events.

timer

Displays RF timer events.


Command Modes

Privileged EXEC

Command History

Release
Modification

11.3(6)AA

This command was introduced.

12.0(15)ST

This command was introduced on Cisco 10000 series Internet routers.

12.0(22)S

This command was introduced on Cisco 7500, 10000, and 12000 series Internet routers.

12.2(18)S

This command was integrated into Cisco IOS Release 12.2(18)S on Cisco 7500 series routers.

12.2(20)S

Support was added for the Cisco 7304 router. The Cisco 7500 series router is not supported in Cisco IOS Release 12.2(20)S.

12.2(28)SB

Support for this command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.


Examples

The following example enables debugging information for RF keepalive events:

Router# debug redundancy kpa

debug snmp sync

To debug Simple Network Management Protocol (SNMP) synchronization and faults in synchronization, use the debug snmp sync command in privileged EXEC mode. To disable the display of debugging output, use the no form of this command.

debug snmp sync

no debug snmp sync

Syntax Description

This command has no arguments or keywords.

Defaults

Disabled.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.0(22)S

This command was introduced.

12.2(18)S

This command was integrated into Cisco IOS Release 12.2(18)S.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(31)SB2

This command was integrated into Cisco IOS Release 12.2(31)SB2.


Usage Guidelines

The debug snmp sync command can be used to debug SNMP synchronization and faults in synchronization. The standby Route Processor (RP) may sometimes reset as a result of synchronization faults. If the fault occurs when SNMP activities such as SNMP sets are in progress, enter the debug snmp sync command to identify whether a synchronization fault caused the reset.

SNMP synchronizations (dynamic and bulk) are performed only if the router is configured to be in stateful switchover (SSO) mode.

Examples

The following example enables debugging of SNMP synchronization activity:

Router# debug snmp sync 

Related Commands

Command
Description

debug snmp packets

Displays information about every SNMP packet sent or received by the networking device.

mode

Configures the redundancy mode of operation.


debug standby events

To display events related to Hot Standby Router Protocol (HSRP), use the debug standby events command in privileged EXEC mode. To disable debugging output, use the no form of this command.

debug standby events [all | api | arp | ha | internal {data | init | state | timer} | protocol | redundancy | terse | track] [detail]

no debug standby events [all | arp | ha | internal {api | data | init | state | timer} | protocol | redundancy | terse | track] [detail]

Syntax Description

all

(Optional) Displays all HSRP events.

api

(Optional) Displays HSRP application programming interface (API) events.

arp

(Optional) Displays HSRP Address Resolution Protocol (ARP) events.

ha

(Optional) Displays High availability (HA) events.

internal

(Optional) Displays Internal HSRP events.

data

(Optional) Displays HSRP data events.

init

(Optional) Displays HSRP startup and shutdown events.

state

(Optional) Displays HSRP state events.

timer

(Optional) Displays HSRP timer events.

protocol

(Optional) Displays HSRP protocol events.

redundancy

(Optional) Displays HSRP redundancy events.

terse

(Optional) Displays all HSRP packets, except hellos and advertisements.

track

(Optional) Displays HSRP tracking events.

detail

(Optional) Displays detailed debugging information.


Command Modes

Privileged EXEC (#)

Command History

Release
Modification

12.1

This command was introduced.

12.2(8)T

The api keyword was added.

12.4(4)T

The ha keyword was added.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.

12.2(33)SXI

The arp keyword was added.

12.4(24)T

This command was modified. The init keyword was added.

12.2(33)SXI1

This command was modified. The init keyword was added.

Cisco IOS XE Release 2.1

This command was integrated into Cisco IOS XE Release 2.1.


Usage Guidelines

You can filter the debug output using interface and HSRP group conditional debugging. To enable interface conditional debugging, use the debug condition interface command. To enable HSRP conditional debugging, use the debug condition standby command.

Examples

The following example shows how to enable the debugging of the active and standby Route Processors (RPs) on an active RP console. The HSRP group is configured on the active RP, and the HSRP state is active.

Router# debug standby events ha


!Active RP
*Apr 27 04:13:47.755: HSRP: Gi0/0/1 Grp 101 RF Encode state Listen into sync buffer
*Apr 27 04:13:47.855: HSRP: CF Sync send ok
*Apr 27 04:13:57.755: HSRP: Gi0/0/1 Grp 101 RF Encode state Speak into sync buffer
*Apr 27 04:13:57.855: HSRP: CF Sync send ok
*Apr 27 04:14:07.755: HSRP: Gi0/0/1 Grp 101 RF Encode state Standby into sync buffer
*Apr 27 04:14:07.755: HSRP: Gi0/0/1 Grp 101 RF Encode state Active into sync buffer
*Apr 27 04:14:07.863: HSRP: CF Sync send ok
*Apr 27 04:14:07.867: HSRP: CF Sync send ok

!Standby RP
*Apr 27 04:11:21.011: HSRP: RF CF client 32, entity 0 got msg len 24
*Apr 27 04:11:21.011: HSRP: Gi0/0/1 Grp 101 RF sync state Init -> Listen
*Apr 27 04:11:31.011: HSRP: RF CF client 32, entity 0 got msg len 24
*Apr 27 04:11:31.011: HSRP: Gi0/0/1 Grp 101 RF sync state Listen -> Speak
*Apr 27 04:11:41.071: HSRP: RF CF client 32, entity 0 got msg len 24
*Apr 27 04:11:41.071: HSRP: RF CF client 32, entity 0 got msg len 24
*Apr 27 04:11:41.071: HSRP: Gi0/0/1 Grp 101 RF sync state Speak -> Standby
*Apr 27 04:11:41.071: HSRP: Gi0/0/1 Grp 101 RF sync state Standby -> Active


Table 19 describes the significant fields shown in the display.

Table 19 debug standby events Field Descriptions 

Field
Description

RF

Redundancy facility—Internal mechanism that makes Stateful Switchover (SSO) work.

CF

Checkpoint facility—Internal mechanism that makes SSO work.


The following sample shows HSRP debug information when HSRP is configured to send gratuitous ARP packets every four seconds:

Router# debug standby event arp detail

HSRP Events debugging is on (arp) 

*Jun 27 14:15:51.795: HSRP: Et0/0 Grp 1 Send grat ARP 10.0.0.1 mac 0000.0c07.ac01 (use 
vMAC)
*Jun 27 14:15:55.755: HSRP: Et0/0 Grp 1 Send grat ARP 10.0.0.1 mac 0000.0c07.ac01 (use 
vMAC)
*Jun 27 14:15:59.407: HSRP: Et0/0 Grp 1 Send grat ARP 10.0.0.1 mac 0000.0c07.ac01 (use 
vMAC) 


Note Debug messages for gratuitous ARP packets are seen only if the detail keyword is entered.


Table 20 describes the significant fields shown in the display.

Table 20 debug standby events detail Field Descriptions 

Field
Description

Send grat ARP 10.0.0.1

IP address to which HSRP sends gratuitous ARP packets.

mac

MAC address of the host router to which HSRP sends gratuitous ARP packets.


The following examples show the output of the debug standby event internal init command when the IP address of an interface is changed and HSRP makes an internal evaluation to see if the added address permits the currently configured standby address to remain valid.

Router# debug standby events internal init

HSRP: Ethernet0/0 vIP intf primary subnet 172.24.1.0 added
.
.
.
HSRP: Ethernet0/0 vIP 172.24.1.254 matches intf primary subnet 172.24.1.0

Router# debug standby events internal init

HSRP: Ethernet0/0 vIP intf secondary subnet 172.24.1.0 added
.
.
.
HSRP: Ethernet0/0 vIP 172.24.1.254 matches intf secondary subnet 172.24.1.0
Router# debug standby events internal init

HSRP: Ethernet0/0 vIP intf secondary subnet 172.24.1.0 deleted
.
.
.
HSRP: Ethernet0/0 vIP 172.24.1.254 matches no intf subnets

Related Commands

Command
Description

debug condition interface

Limits output for some debug commands on the basis of the interface, VC, or VLAN.

debug condition standby

Filters the output of the debug standby command on the basis of HSRP group number.

debug standby

Displays HSRP state changes.

debug standby errors

Displays error messages related to HSRP.

debug standby events icmp

Displays debugging messages for the HSRP ICMP redirects filter.

debug standby packets

Displays debugging information for packets related to HSRP.


debug vrrp all

To display debugging messages for Virtual Router Redundancy Protocol (VRRP) errors, events, and state transitions, use the debug vrrp all command in privileged EXEC mode. To disable debugging output, use the no form of this command.

debug vrrp all

no debug vrrp all

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC (#)

Command History

Release
Modification

12.0(18)ST

This command was introduced.

12.0(22)S

This command was integrated into Cisco IOS Release 12.0(22)S.

12.2(15)T

This command was integrated into Cisco IOS Release 12.2(15)T.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(31)SB2

This command was integrated into Cisco IOS Release 12.2(31)SB2.

12.2(31)SG

This command was integrated into Cisco IOS Release 12.2(31)SG.

12.2(17d)SXB

This command was integrated into Cisco IOS Release 12.2(17d)SXB.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.

Cisco IOS XE Release 2.1

This command was integrated into Cisco IOS XE Release 2.1.


Examples

The following is sample output for the debug vrrp all command:

Router# debug vrrp all

00:15:30: %IP-4-DUPADDR: Duplicate address 10.18.0.2 on Ethernet1/0, sourced by 
0000.5e00.0101 
May 22 18:41:54.447: VRRP: Grp 1 Advertisement Primary address 10.18.0.2 
	        different from ours 10.18.0.1 
May 22 18:41:57.443: VRRP: Grp 1 Advertisement Primary address 10.18.0.2 
        different from ours 10.18.0.1 
May 22 18:42:00.443: VRRP: Grp 1 Advertisement Primary address 10.18.0.2 
        different from ours 10.18.0.1

May 22 18:48:41.521: VRRP: Grp 1 Event - Advert higher or equal priority
May 22 18:48:44.521: VRRP: Grp 1 Event - Advert higher or equal priority
May 22 18:48:47.521: VRRP: Grp 1 Event - Advert higher or equal priority

May 22 18:53:23.390: VRRP: Grp 1 changing to V_STATE_INIT 

May 22 18:54:26.143: VRRP: Grp 1 changing to V_STATE_BACKUP 
May 22 18:54:35.755: VRRP: Grp 1 changing to V_STATE_MASTER
May 22 18:53:23.390: VRRP: Grp 1 changing to V_STATE_INIT 

May 22 18:54:26.143: VRRP: Grp 1 changing to V_STATE_BACKUP 
May 22 18:54:35.755: VRRP: Grp 1 changing to V_STATE_MASTER

Related Commands

Command
Description

debug vrrp error

Displays debugging messages about VRRP error conditions.

debug vrrp events

Displays debugging messages about VRRP events.

debug vrrp state

Displays debugging messages about the VRRP state transitions.


debug vrrp error

To display debugging messages about Virtual Router Redundancy Protocol (VRRP) error conditions, use the debug vrrp error command in privileged EXEC mode. To disable debugging output, use the no form of this command.

debug vrrp error

no debug vrrp error

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC (#)

Command History

Release
Modification

12.0(18)ST

This command was introduced.

12.0(22)S

This command was integrated into Cisco IOS Release 12.0(22)S.

12.2(15)T

This command was integrated into Cisco IOS Release 12.2(15)T.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(31)SB2

This command was integrated into Cisco IOS Release 12.2(31)SB2.

12.2(31)SG

This command was integrated into Cisco IOS Release 12.2(31)SG.

12.2(17d)SXB

This command was integrated into Cisco IOS Release 12.2(17d)SXB.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.

Cisco IOS XE Release 2.1

This command was integrated into Cisco IOS XE Release 2.1.


Examples

The following is sample output from the debug vrrp error command:

Router# debug vrrp error

00:15:30: %IP-4-DUPADDR: Duplicate address 10.18.0.2 on Ethernet1/0, sourced by 
0000.5e00.0101 
May 22 18:41:54.447: VRRP: Grp 1 Advertisement Primary address 10.18.0.2 
	        different from ours 10.18.0.1 
May 22 18:41:57.443: VRRP: Grp 1 Advertisement Primary address 10.18.0.2 
        different from ours 10.18.0.1 
May 22 18:42:00.443: VRRP: Grp 1 Advertisement Primary address 10.18.0.2 
        different from ours 10.18.0.1

In the example, the error being observed is that the router has a virtual address of 10.18.0.1 for group 1, but it received a virtual address of 10.18.0.2 for group 1 from another router on the same LAN.

Related Commands

Command
Description

debug vrrp all

Displays debugging messages for VRRP errors, events, and state transitions.


debug vrrp events

To display debugging messages about Virtual Router Redundancy Protocol (VRRP) events that are occurring, use the debug vrrp events command in privileged EXEC mode. To disable debugging output, use the no form of this command.

debug vrrp events

no debug vrrp events

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC (#)

Command History

Release
Modification

12.0(18)ST

This command was introduced.

12.0(22)S

This command was integrated into Cisco IOS Release 12.0(22)S.

12.2(15)T

This command was integrated into Cisco IOS Release 12.2(15)T.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(31)SB2

This command was integrated into Cisco IOS Release 12.2(31)SB2.

12.2(31)SG

This command was integrated into Cisco IOS Release 12.2(31)SG.

12.2(17d)SXB

This command was integrated into Cisco IOS Release 12.2(17d)SXB.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.

Cisco IOS XE Release 2.1

This command was integrated into Cisco IOS XE Release 2.1.


Examples

The following is sample output from the debug vrrp events command:

Router# debug vrrp events

May 22 18:48:41.521: VRRP: Grp 1 Event - Advert higher or equal priority 
May 22 18:48:44.521: VRRP: Grp 1 Event - Advert higher or equal priority 
May 22 18:48:47.521: VRRP: Grp 1 Event - Advert higher or equal priority

In the example, the event being observed is that the router received an advertisement from another router for group 1 that has a higher or equal priority to itself.

Related Commands

Command
Description

debug vrrp all

Displays debugging messages for VRRP errors, events, and state transitions.


debug vrrp packets

To display summary information about Virtual Router Redundancy Protocol (VRRP) packets being sent or received, use the debug vrrp packets command in privileged EXEC mode. To disable debugging output, use the no form of this command.

debug vrrp packets

no debug vrrp packets

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.0(18)ST

This command was introduced.

12.0(22)S

This command was integrated into Cisco IOS Release 12.0(22)S.

12.2(15)T

This command was integrated into Cisco IOS Release 12.2(15)T.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.


12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(31)SB2

This command was integrated into Cisco IOS Release 12.2(31)SB2.

12.2(31)SG

This command was integrated into Cisco IOS Release 12.2(31)SG.

12.2(17d)SXB

This command was integrated into Cisco IOS Release 12.2(17d)SXB.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.

Cisco IOS XE Release 2.1

This command was integrated into Cisco IOS XE Release 2.1.


Examples

The following is sample output from the debug vrrp packets command. The output is on the master virtual router; the router for group 1 is sending an advertisement with a checksum of 6BE7.

Router# debug vrrp packets

VRRP Packets debugging is on

May 22 18:51:03.220: VRRP: Grp 1 sending Advertisement checksum 6BE7 
May 22 18:51:06.220: VRRP: Grp 1 sending Advertisement checksum 6BE7

In the following example, the router with physical address 10.18.0.3 is advertising a priority of 105 for VRRP group 1:

Router# debug vrrp packets

VRRP Packets debugging is on

May 22 18:51:09.222: VRRP: Grp 1 Advertisement priority 105, ipaddr 10.18.0.3
May 22 18:51:12.222: VRRP: Grp 1 Advertisement priority 105, ipaddr 10.18.0.3

debug vrrp state

To display debugging messages about the state transitions occurring for Virtual Router Redundancy Protocol (VRRP) groups, use the debug vrrp state command in privileged EXEC mode. To disable debugging output, use the no form of this command.

debug vrrp state

no debug vrrp state

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC (#)

Command History

Release
Modification

12.0(18)ST

This command was introduced.

12.0(22)S

This command was integrated into Cisco IOS Release 12.0(22)S.

12.2(15)T

This command was integrated into Cisco IOS Release 12.2(15)T.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(31)SB2

This command was integrated into Cisco IOS Release 12.2(31)SB2.

12.2(31)SG

This command was integrated into Cisco IOS Release 12.2(31)SG.

12.2(17d)SXB

This command was integrated into Cisco IOS Release 12.2(17d)SXB.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.

Cisco IOS XE Release 2.1

This command was integrated into Cisco IOS XE Release 2.1.


Examples

The following is sample output from the debug vrrp state command:

Router# debug vrrp state

May 22 18:53:23.390: VRRP: Grp 1 changing to V_STATE_INIT 

May 22 18:54:26.143: VRRP: Grp 1 changing to V_STATE_BACKUP 
May 22 18:54:35.755: VRRP: Grp 1 changing to V_STATE_MASTER

Related Commands

Command
Description

debug vrrp all

Displays debugging messages for VRRP errors, events, and state transitions.


destination (call home)

To configure the message destination parameters, use the destination command in profile configuration mode.

destination {address {email address | http url} | message-size-limit size | preferred-msg-format {long-text | short-text | xml} | transport-method {email | http}}

Syntax Description

address email address

Configures the destination e-mail address to which Call Home messages are sent.

address http url

Configures the destination URL to which Call Home messages are sent.

message-size-limit size

Specifies the message size limit for this profile; valid values are from 50 to 3145728 bytes.

preferred-msg-format

Specifies the message format for this profile.

long-text

Specifies long-text format.

short-text

Specifies short-text format.

xml

Specifies XML message format.

transport-method email

Specifies e-mail as the transport method for this profile.

transport-method http

Specifies HTTP as the transport method for this profile.


Command Default

The default settings are as follows:

address—This command has no default settings.

message-size-limit—3,145,728 bytes

preferred-msg-format—XML

transport-method—email

Command Modes

Profile configuration

Command History

Release
Modification

12.2(33)SXH

This command was introduced.

12.2(33)SRC

This command was integrated into Cisco IOS Release 12.2(33)SRC.


event application

To specify the event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of an event raised through the EEM Event Publish application programming interface (API), use the event application command in applet configuration mode. To remove the application event criteria, use the no form of this command.

event [tag event-tag] application subsystem subsystem-id type event-type [maxrun maxruntime-number]

no [tag event-tag] event application subsystem subsystem-id type event-type [maxrun maxruntime-number]

Syntax Description

tag

(Optional) Specifies a tag using the event-tag argument that can be used with the trigger command to support multiple event statements within an applet.

event-tag

(Optional) String that identifies the tag.

2subsystem

Specifies an identifier for the subsystem that will publish the application event.

subsystem-id

Number in the range from 1 to 4294967295 that identifies the subsystem. When an event is to be published by an EEM policy, the subsystem-id reserved for a policy is 798.

type

Specifies an event type within the specified event.

event-type

Integer in the range from 1 to 4294967295.

maxrun

(Optional) Specifies the maximum runtime of the applet. If the maxrun keyword is specified, the maxruntime-number value must be specified. If the maxrun keyword is not specified, the default applet run time is 20 seconds.

maxruntime-number

(Optional) Number of seconds specified in ssssssss[.mmm] format, where ssssssss must be an integer representing seconds between 0 and 31536000, inclusive, and where mmm must be an integer representing milliseconds between 0 and 999).


Command Default

No EEM event criteria are specified.

Command Modes

Applet configuration (config-applet)

Command History

Release
Modification

12.2(25)S

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(20)T

The tag and maxrun keywords were added to support multiple event statements within an applet.


Usage Guidelines

An EEM event is triggered when an application calls the EEM Event Publish API with an event specification that matches the subsystem ID and application event type.

Examples

The following example shows how a policy named EventPublish_A runs every 20 seconds and publishes an event to a well-known EEM event type numbered 1. A second policy named EventPublish_B is registered to run when the well-known EEM event type of 1 occurs. When policy EventPublish_B runs, it outputs a message to syslog containing data passed as an argument from EventPublish_A.

Router(config)# event manager applet EventPublish_A
Router(config-applet)# event timer watchdog time 20.0
Router(config-applet)# action 1.0 syslog msg "Applet EventPublish_A"
Router(config-applet)# action 2.0 publish-event sub-system 798 type 1 arg1 twenty
Router(config-applet)# exit
Router(config)# event manager applet EventPublish_B
Router(config-applet)# event application subsystem 798 type 1
Router(config-applet)# action 1.0 syslog msg "Applet EventPublish_B arg1 
$_application_data1"

Related Commands

Command
Description

event manager applet

Registers an event applet with the Embedded Event Manager and enters applet configuration mode.


event cli

To specify the event criteria for an Embedded Event Manager (EEM) applet that is run by matching a Cisco IOS command-line interface (CLI) command, use the event cli command in applet configuration mode. To remove the CLI command event criteria, use the no form of this command.

event [tag event-tag] cli pattern regular-expression {[default] [enter] [questionmark] [tab]} [sync {yes | no skip {yes | no}] [mode variable] [occurs num-occurrences] [period period-value] [maxrun maxruntime-number]

no event [tag event-tag] cli

Syntax Description

tag

(Optional) Specifies a tag using the event-tag argument that can be used with the trigger command to support multiple event statements within an applet.

event-tag

(Optional) String that identifies the tag.

pattern

Specifies the regular expression used to perform the CLI command pattern match. The CLI command must have been successfully parsed before the pattern match is attempted. The pattern match is compared with the fully expanded CLI command string.

regular-expression

Regular expression. If the expression contains embedded blanks, enclose it in double quotation marks.

default

(Optional) The time period during which the CLI event detector waits for the policy to exit (specified in ssssssssss[.mmm] format, where ssssssssss must be an integer representing seconds from 0 to 4294967295, and where mmm must be an integer representing milliseconds from 0 to 999). If the default time period expires before the policy exits, the default action will be executed. The default action is to run the command. If this argument is not specified, the default time period is set to 30 seconds.

enter

Specifies the event match when the user presses the Enter key.

questionmark

Specifies the event match when the user presses the Questionmark key.

tab

Specifies the event match when the user presses the Tab key.

sync

Indicates whether the policy should be executed synchronously before the CLI command executes.

If the yes keyword is specified, the policy will run synchronously with the CLI command.

If the no keyword is specified, the policy will run asynchronously with the CLI command.

skip

Indicates whether the CLI command should be executed. This keyword is required if the sync keyword is followed by the no keyword. If the sync keyword is followed by the yes keyword, the skip keyword should not be specified.

If the yes keyword is specified, the CLI command will not be executed.

If the no keyword is specified, the CLI command will be executed. This is the default.


Caution When the skip keyword is followed by the yes keyword, unintended results may be produced if the pattern match is made for configuration commands because the CLI command that matches the regular expression will not be executed.

mode variable

Specifies the CLI parser mode events for the keywords that follow.

occurs

(Optional) Specifies the number of matching occurrences before an EEM event is triggered. When a number is not specified, an EEM event is triggered after the first match.

num-occurrences

(Optional) Integer greater than 0 that specifies the number of occurrences.

period

(Optional) Specifies a backward looking time window in which all CLI events must occur (the occurs clause must be satisfied) in order for an event to be published (specified in SSSSSSSSSS[.MMM] format, where SSSSSSSSSS must be an integer representing seconds between 0 and 4294967295, inclusive, and where MMM must be an integer representing milliseconds between 0 and 999). If this argument is not specified, the most recent event is used.

period-value

(Optional) Integer that represents seconds and optional milliseconds in the format ssssssssss[.mmm]. Seconds is an integer in the range from 0 to 4294967295. Milliseconds is an integer in the range from 0 to 999. When you specify milliseconds only, use the format 0.mmm.

maxrun

(Optional) Specifies the maximum runtime of the applet. If the maxrun keyword is specified, the maxruntime-number value must be specified. If the maxrun keyword is not specified, the default applet run time is 20 seconds.

maxruntime-number

(Optional) Number of seconds specified in ssssssss[.mmm] format, where ssssssss must be an integer representing seconds from 0 to 31536000, and where mmm must be an integer representing milliseconds between 0 and 999.


Command Default

No EEM events are triggered on the basis of a match with a Cisco IOS CLI command.

Command Modes

Applet configuration (config-applet)

Command History

Release
Modification

12.3(14)T

This command was introduced.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(20)T

The tag and maxrun keywords were added to support multiple event statements within an applet.

12.4(22)T

The default, enter, mode, questionmark, and tab keywords were added to support CLI parser-based events.


Usage Guidelines

Use the event cli command to set up event criteria against which CLI commands are matched. CLI commands are compared against a specified regular expression. After a specified number of matches occurs within a specified time period, an EEM event is triggered. If multiple conditions exist, the EEM event is triggered when all the conditions are met.

When the sync keyword is used, the event detector is notified when the policy completes running. The exit status of the policy determines whether the CLI command will be executed. If the policy exit status is zero—the policy ran successfully—the CLI command is not executed; otherwise the CLI command runs.

The EEM applet can accept four keywords to add CLI parser-based events. The behavior of these keywords are as follows:

The default keyword is used to perform the action during which the CLI event detector waits for the policy to exit.

The tab keyword is used to expand abbreviated commands or parameters. A new prompt line is displayed with the expanded text.

The questionmark keyword is used to display a list with help of valid commands or parameters. Help is displayed first followed by a new prompt line.

The enter keyword will parse and run the command.

Regular Expression Match

The CLI event detector screens CLI commands for a regular expression match. When a match is found, an event is published. The match logic is performed on the fully expanded CLI command after the command is successfully parsed and before it is executed. The CLI event detector supports three publish modes:

Synchronous publishing of CLI events—The CLI command is not executed until the EEM policy exits, and the EEM policy can control whether the command is executed. The read/write variable, _exit_status, allows you to set the exit status at policy exit for policies triggered from synchronous events. If _exit_status is 0, the command is skipped, if _exit_status is 1, the command is run.

Asynchronous publishing of CLI events—The CLI event is published, and then the CLI command is executed.

Asynchronous publishing of CLI events with command skipping—The CLI event is published, but the CLI command is not executed.

Examples

The following configuration will prevent you to access the configuration mode. If the _exit_status is not set to 1, the EEM policy will disable functionality in the router. To remove this configuration, you may need to reload with unsaved configuration. It is possible to remove the event applet but all unsaved configuration will be lost and a complete reconfiguration will be necessary.

event manager applet test_cli1
  event cli pattern "config" sync yes
  action 1.0 syslog msg "Config command is entered"
end

Caution Failure to set the exit_status to 1 will cause the default action which is to skip executing the CLI command. This can lead to situations where the router has to be reloaded in order to continue operations.

The following example shows how to specify an EEM applet to run when the Cisco IOS write memory CLI command is run. The applet provides a notification via a syslog message that this event has occurred. The _exit_status is set to 1.

Router(config)# event manager applet cli-match
Router(config-applet)# event cli pattern "write memory.*" sync yes
Router(config-applet)# action 1.0 syslog msg "$_cli_msg Command Executed"
Router(config-applet)# set 2.0 _exit_status 1

The following example shows how unintended results can be produced when using the skip keyword followed by the yes keyword. When the skip keyword is followed by the yes keyword, unintended results may be produced if the pattern match is made for configuration commands because the CLI command that matches the regular expression will not be executed. In this example, the first applet (ap1) uses the skip keyword followed by the yes keyword to specify that any CLI command that contains the show ip interface pattern is not executed. This results in the second applet (ap2) being configured without an event statement because it contains the show ip interface pattern.

Router(config)# event manager applet ap1
Router(config-applet)# event cli pattern "show ip interface" sync no skip yes occurs 1 
period 5
Router(config-applet)# action 1 syslog msg "test 1"
Router(config-applet)# exit
Router(config)# event manager applet ap2
Router(config-applet)# event cli pattern "show ip interface" sync no skip no occurs 1 
period 5
Router(config-applet)# action 1 syslog msg "test 2"
Router(config-applet)# end

The following example shows how CLI parser-based events can be generated:

Router(config)# event manager applet ap1
Router(config-applet)# event cli pattern "show ip interface" 

The results are displayed on the screen. Note that the second line contains a message that no event is configured for the EEM applet ap2. Use command CLI pattern matching with caution when the skip and yes keywords are specified.

00:00:41: %HA_EM-6-LOG: ap1: test 1
00:00:41: %HA_EM-4-FMPD_NO_EVENT: No event configured for applet ap2  
router#show run | beg event event manager applet ap1 event cli pattern "show ip 
interface" sync no skip yes occurs 1 period 5 action 1 syslog msg "test 1"
event manager applet ap2
 action 1 syslog msg "test 2"
!
end

Related Commands

Command
Description

event manager applet

Registers an event applet with the EEM and enters applet configuration mode.


event counter

To specify the event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of a named counter crossing a threshold, use the event counter command in applet configuration mode. To remove the counter event criteria, use the no form of this command.

event [tag event-tag] counter name counter-name entry-op operator entry-val entry-value [exit-op operator] [exit-val exit-value] [maxrun maxruntime-number]

no event [tag event-tag] counter name counter-name entry-op operator entry-val entry-value [exit-op operator] [exit-val exit-value] [maxrun maxruntime-number]

Syntax Description

tag

(Optional) Specifies a tag using the event-tag argument that can be used with the trigger command to support multiple event statements within an applet.

event-tag

(Optional) String that identifies the tag.

name

Specifies that a counter will be monitored.

counter-name

Name of the counter that will be monitored.

entry-op

Compares the contents of the current counter value with the entry value using a specified operator. If there is a match, an event is triggered and event monitoring is disabled until the exit criteria are met.

operator

Value used with the entry-op and exit-op keywords that determines how the current counter value is compared to the entry value or the exit value. Valid values are:

gt—Greater than.

ge—Greater than or equal to.

eq—Equal to.

ne—Not equal to.

lt—Less than.

le—Less than or equal to.

entry-val

Specifies the value with which the contents of the current counter are compared to decide if a counter event should be raised.

entry-value

Number in the range from -2147483648 to 2147483647, inclusive.

exit-op

(Optional) Compares the contents of the current counter with the exit value using a specified operator. If there is a match, an event is triggered and event monitoring is reenabled.

exit-val

(Optional) Specifies the value with which the contents of the current counter are compared to decide whether the exit criteria are met.

exit-value

(Optional) Number in the range from -2147483648 to 2147483647, inclusive.

maxrun

(Optional) Specifies the maximum runtime of the applet. If the maxrun keyword is specified, the maxruntime-number value must be specified. If the maxrun keyword is not specified, the default applet run time is 20 seconds.

maxruntime-number

(Optional) Number of seconds specified in ssssssss [.mmm] format, where ssssssss must be an integer representing seconds between 0 and 31536000, inclusive, and where mmm must be an integer representing milliseconds between 0 and 999).


Command Default

No EEM events are triggered on the basis of a named counter crossing a threshold.

Command Modes

Event counter applet configuration (config-applet-event-counter)

Command History

Release
Modification

12.2(25)S

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(20)T

The tag and maxrun keywords were added to support multiple event statements within an applet.


Usage Guidelines

An EEM event is triggered when the value of a specified counter crosses a defined threshold. Depending on the operator, the threshold may be crossed when the value is greater than the threshold or when the value is less than the threshold.

Use the event counter command with the action counter command when an event occurs periodically and you want an action to be implemented after a specified number of occurrences of the event.

Exit criteria are optional. If exit criteria are not specified, event monitoring will be reenabled immediately. If exit criteria are specified, event monitoring is not reenabled until the criteria are met.

Examples

The following example shows that policy EventCounter_A is configured to run once a minute and to increment a well-known counter called critical_errors. A second policy—EventCounter_B—is registered to be triggered when the well-known counter called critical_errors exceeds a threshold of 3. When policy EventCounter_B runs, it resets the counter to 0.

Router(config)# event manager applet EventCounter_A
Router(config-applet)# event timer watchdog time 60.0
Router(config-applet)# action 1.0 syslog msg "EventCounter_A"
Router(config-applet)# action 2.0 counter name critical_errors value 1 op inc
Router(config-applet)# exit
Router(config)# event manager applet EventCounter_B
Router(config-applet)# event counter name critical_errors entry-op gt entry-val 3 exit-op 
lt exit-val 3
Router(config-applet)# action 1.0 syslog msg "EventCounter_B"
Router(config-applet)# action 2.0 counter name critical_errors value 0 op set 

Related Commands

Command
Description

action counter

Sets or modifies a named counter when an Embedded Event Manager applet is triggered.

event manager applet

Registers an event applet with the Embedded Event Manager and enters applet configuration mode.


event interface

To specify the event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of a generic interface counter crossing a threshold or reaching exit criteria, use the event interface command in applet configuration mode. To remove the interface event criteria, use the no form of this command.

event [tag event-tag] interface name interface-type interface-number parameter counter-name entry-op operator entry-val entry-value entry-type {value | increment | rate} poll-interval poll-int-value [exit-comb {or | and}] [exit-op operator exit-val exit-value] [exit-type {value | increment | rate}] [exit-time exit-time-value] [average-factor average-factor-value] [maxrun maxruntime-number]

no event [tag event-tag] interface name interface-type interface-number parameter counter-name entry-op operator entry-val entry-value entry-type {value | increment | rate} poll-interval poll-int-value [exit-comb {or | and}] [exit-op operator exit-val exit-value] [exit-type {value | increment | rate}] [exit-time exit-time-value] [average-factor average-factor-value] [maxrun maxruntime-number]

Syntax Description

tag

(Optional) Specifies a tag using the event-tag argument that can be used with the trigger command to support multiple event statements within an applet.

event-tag

(Optional) String that identifies the tag.

name

Specifies the type and number of the interface to monitor.

interface-type

String that identifies the type of interface.

interface-number

Integer value that identifies the interface.

parameter

Specifies the name of the counter to monitor.

counter-name

Name of the counter. Supported values for the counter-name argument are the following:

input_errors—Includes runts, giants, no buffer, cyclic redundancy checksum (CRC), frame, overrun, and ignored counts. Other input-related errors can also cause the input errors count to be increased. Some datagrams may have more than one error.

input_errors_crc—Number of packets with a CRC generated by the originating LAN station or remote device that do not match the checksum calculated from the data received.

input_errors_frame—Number of packets received incorrectly that have a CRC error and a noninteger number of octets.

input_errors_overrun—Number of times the receiver hardware was unable to hand over received data to a hardware buffer because the input rate exceeded the receiver's ability to handle the data.

input_packets_dropped—Number of packets dropped because of a full input queue.

interface_resets—Number of times an interface has been completely reset.

 

output_buffer_failures—Number of failed buffers and number of buffers swapped out.

output_buffer_swappedout—Number of packets swapped to Dynamic RAM (DRAM).

output_errors—Sum of all errors that prevented the final transmission of datagrams out of the interface being examined. This may not balance with the sum of the output errors because some datagrams may have more than one error and other datagrams may have errors that do not fall into any of the specifically tabulated categories.

output_errors_underrun—Number of times the transmitter has been running faster than the router can handle.

output_packets_dropped—Number of packets dropped because of a full output queue.

receive_broadcasts—Number of broadcast or multicast packets received by the interface.

receive_giants—Number of packets that are discarded because they exceed the maximum packet size of the medium.

receive_rate_bps—Interface receive rate, in bytes per second.

receive_rate_pps—Interface receive rate, in packets per second.

receive_runts—Number of packets that are discarded because they are smaller than the minimum packet size of the medium.

receive_throttle—Number of times the receiver on the port was disabled, possibly because of buffer or processor overload.

reliability—Reliability of the interface, as a fraction of 255 (255 out of 255 is 100 percent reliability), calculated as an exponential average over 5 minutes.

rxload—Receive rate of the interface, as a fraction of 255 (255 out of 255 is 100 percent).

transmit_rate_bps—Interface transmit rate, in bytes per second.

transmit_rate_pps—Interface transmit rate, in packets per second.

txload—Transmit rate of the interface, as a fraction of 255 (255 out of 255 is 100 percent).

entry-op

Compares the current interface counter value with the entry value using the specified operator. If there is a match, an event is triggered and event monitoring is disabled until the exit criteria are met.

operator

Value used with the entry-op and exit-op keywords that determines how the current counter value is compared with the entry value or the exit value. Valid values are:

gt—Greater than

ge—Greater than or equal to

eq—Equal to

ne—Not equal to

lt—Less than

le—Less than or equal to

entry-val entry-value

Specifies the value with which the current interface counter value is compared to decide if the interface event should be raised. Range is from -2147483648 to 2147483647.

entry-type

Specifies a type of operation to be applied to the object ID specified by the entry-value argument.

value

Value is defined as the actual value of the entry-value or exit-value argument.

increment

Increment uses the entry-value or exit-value field as an incremental difference. The entry-value or exit-value is compared with the difference between the current counter value and the value when the event was last triggered (or the first polled sample if this is a new event). A negative value checks the incremental difference for a counter that is decreasing.

rate

Rate is defined as the average rate of change over a period of time. The time period is the average-factor-value multiplied by the poll-int-value. At each poll interval the difference between the current sample and the previous sample is taken and recorded as an absolute value. An average of the previous average-factor-value samples is taken to be the rate of change.

poll-interval

Specifies the time interval between consecutive polls. The default is 1 second.

poll-int-value

Number that represents seconds and optional milliseconds in the format ssssss[.mmm]. The range for seconds is from 60 to 4294967295. The range for milliseconds is from 0 to 999. If using milliseconds, specify the milliseconds in the format s.mmm. The poll interval value must not be less than 1 second. The default is 1 second.

exit-comb

(Optional) Indicates the combination of exit conditions that must be met before event monitoring is reenabled.

or

Indicates that both exit-op or exit-val and exit-time values must exist

and

Indicates that either exit-op or exit-val or exit-time values must exist

exit-op

(Optional) Compares the contents of the current interface counter value with the exit value using the specified operator. If there is a match, an event is triggered and event monitoring is reenabled.

exit-val exit-value

(Optional) Specifies the value with which the contents of the current interface counter value are compared to decide whether the exit criteria are met. If an exit value is specified, you must configure an exit operator. Range is from -2147483648 to 2147483647.

exit-type

(Optional) Specifies a type of operation to be applied to the object ID specified by the exit-value argument.

exit-time

(Optional) Specifies the time period after which the event monitoring is reenabled. The timing starts after the event is triggered.

exit-time-value

(Optional) Number that represents seconds and optional milliseconds in the format ssssss[.mmm]. The range for seconds is from 0 to 4294967295. The range for milliseconds is from 0 to 999. If using milliseconds only, specify the milliseconds in the format 0.mmm.

average-factor

(Optional) Specifies a number used to calculate the period used for rate-based calculations. The average-factor-value is multiplied by the poll-int-value to derive the period in milliseconds.

average-factor-value

(Optional) Number in the range from 1 to 64. The minimum average factor value is 1.

maxrun

(Optional) Specifies the maximum runtime of the applet. If the maxrun keyword is specified, the maxruntime-number value must be specified. If the maxrun keyword is not specified, the default applet run time is 20 seconds.

maxruntime-number

(Optional) Number of seconds specified in ssssssss[.mmm] format, where ssssssss must be an integer representing seconds between 0 and 31536000, and where mmm must be an integer representing milliseconds between 0 and 999.


Command Default

No EEM events are triggered on the basis of a generic interface counter crossing a threshold or reaching exit criteria.

Command Modes

Applet configuration (config-applet)

Command History

Release
Modification

12.2(25)S

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(20)T

This command was modified. The tag, entry-type, value, increment, rate, exit-type, average-factor, and maxrun keywords and associated arguments were added. The entry-val-is-increment, true, false, and exit-val-is-increment keywords were removed.


Usage Guidelines

An EEM event is triggered when one of the fields specified by an interface counter crosses a defined threshold.


Note While registering a policy, an interface can be configured using this command without being physically present in the device but EEM does not begin any monitoring activity until the interface is physically present.


Exit criteria are optional. If you do not specify the exit criteria, event monitoring will be reenabled immediately. If you specify the exit criteria, on the basis of values or time periods, event monitoring is not reenabled until the exit criteria are met.

When you use the exit-comb keyword, the following criteria must be met:

If you specify the or operator, an exit comparison operator and an exit object ID value, or an exit time value must exist.

If you specify the and operator, an exit comparison operator, an exit object ID value, and an exit time value must exist.

Cisco IOS Releases 12.4(15)T, 12.2(33)SB, 12.2(33)SRA, and 12.2(33)SXH, and Prior Releases

The entry-val-is-increment keyword triggers one of the following actions:

If you specify the true keyword, the entry-value is an increment and the interface event is raised whenever the incremental value is reached.

If you specify the false keyword, the entry-value is an actual value and the interface event is raised whenever the actual value occurs. This is the default.

When the optional exit-val-is-increment keyword is used, the following occurs:

If you specify the true keyword, the exit-value is an increment value and the event monitoring is reenabled whenever the incremental value is reached.

If you specify the false keyword, the exit-value is an actual value and the event monitoring is reenabled whenever the actual value occurs. This is the default.

Cisco IOS Release 12.4(20)T and Later Releases

The entry-type keyword triggers one of the following actions:

If you specify the value keyword, the entry-value is an actual value and the interface event is raised whenever the actual value occurs.

If you specify the increment keyword, the entry-value is an increment and the interface event is raised whenever the incremental value is reached.

If you specify the rate keyword, the entry-value is a rate of change and the interface event is raised whenever the rate of change value is reached.

When you use the optional exit-type keyword, the following occurs:

If you specify the value keyword, the exit-value is an actual value and the event monitoring is reenabled whenever the actual value occurs. This is the default.

If you specify the increment keyword, the exit-value is an increment and the event monitoring is reenabled whenever the incremental value is reached.

If you specify the rate keyword, the exit-value is a rate of change and the event monitoring is reenabled whenever the rate of change value is reached.

Examples

The following example shows how a policy named EventInterface is triggered every time the receive_throttle counter for the FastEthernet interface 0/0 is incremented by 5. The polling interval to check the counter is specified to run once every 90 seconds.

Router(config)# event manager applet EventInterface
Router(config-applet)# event interface name FastEthernet0/0 parameter receive_throttle 
entry-op ge entry-val 5 entry-val-is-increment true poll-interval 90
Router(config-applet)# action 1.0 syslog msg "Applet EventInterface"

The following example shows how a policy named EventInterface_Load is triggered every time the receive_rate_bps counter for the FastEthernet interface 0/0 reaches a rate of change of 10,000 with an average factor of 10. The polling interval to check the counter is specified to run once every 120 seconds. This example is for a Cisco IOS Release 12.4(20)T or later image.

Router(config)# event manager applet EventInterface_Load
Router(config-applet)# event interface name FastEthernet0/0 parameter receive_rate_bps 
entry-op ge entry-val 10000 entry-type rate poll-interval 120 average-factor 10
Router(config-applet)# action 1.0 syslog msg "Applet EventInterface_Load"

Related Commands

Command
Description

event manager applet

Registers an event applet with the Embedded Event Manager and enters applet configuration mode.


event ioswdsysmon

To specify the event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of Cisco IOS system monitor counters crossing a threshold, use the event ioswdsysmon command in applet configuration mode. To remove the event criteria, use the no form of this command.

event [tag event-tag] ioswdsysmon sub1 subevent1 [timewin timewin-value] [sub12-op {and | or} sub2 subevent2] [maxrun maxruntime-number]

no [tag event-tag] event ioswdsysmon sub1 subevent1 [timewin timewin-value] [sub12-op {and | or} sub2 subevent2] [maxrun maxruntime-number]

Subevent Syntax (for the subevent1 and subevent2 Arguments) for Cisco IOS Images

cpu-proc taskname task-name op operator val value [period period-value]

mem-proc taskname task-name op operator val value [is-percent {true | false}] [period period-value]

Subevent Syntax (for the subevent1 and subevent2 Arguments) for Cisco IOS Software Modularity Images

cpu-proc taskname task-name path pid op operator val value [period period-value]

mem-proc taskname task-name path pid op operator val value [is-percent {true | false}] [period period-value]

Syntax Description

tag

(Optional) Specifies a tag using the event-tag argument that can be used with the trigger command to support multiple event statements within an applet.

event-tag

(Optional) String that identifies the tag.

sub1

Specifies the first subevent.

subevent1

First subevent. Use the syntax shown under the Subevent Syntax heading.

timewin

(Optional) Specifies the time window within which all the subevents must occur for an event to be generated.

timewin-value

(Optional) Number that represents seconds and optional milliseconds in the format ssssssssss[.mmm]. The range for seconds is from 0 to 4294967295. The range for milliseconds is from 0 to 999. If using milliseconds only, specify the milliseconds in the format 0.mmm.

sub12-op

(Optional) Indicates the combination operator for comparison between subevent 1 and subevent 2.

and

(Optional) Specifies that the results of both subevent 1 and subevent 2 must cross the specified thresholds.

or

(Optional) Specifies that the results of either subevent 1 or subevent 2 must cross the specified thresholds.

sub2

(Optional) Specifies the second subevent.

subevent2

(Optional) Second subevent. Use the syntax shown under the Subevent Syntax heading.

Subevent Syntax

cpu-proc

Specifies the use of a sample collection of CPU statistics.

mem-proc

Specifies the use of a sample collection of memory statistics.

taskname

Specifies a Cisco IOS task name.

Note In Cisco IOS Release 12.2(18)SXF4 and later releases, Software Modularity images contain POSIX processes, and Cisco IOS processes were renamed as tasks.

task-name

Name of the Cisco IOS task to be monitored. If the value of the task-name argument contains embedded blanks, enclose it in double quotation marks.

path

(Supported only in Software Modularity images) Specifies a Cisco IOS Software Modularity path and process name.

Note In Cisco IOS Release 12.2(18)SXF4 and later releases, Software Modularity images contain POSIX processes, and Cisco IOS processes were renamed as tasks.

pid

(Supported only in Software Modularity images) Process ID of the Software Modularity process to be monitored.

op

Compares the collected CPU or memory usage sample with the value specified in the value argument.

operator

Two-character string. The operator argument takes one of the following values:

gt—Greater than

ge—Greater than or equal to

eq—Equal to

ne—Not equal to

lt—Less than

le—Less than or equal to

val

Specifies the value with which the collected CPU or memory usage sample is compared to decide if the subevent should be raised.

value

Number in the range from 1 to 4294967295.

period

(Optional) Specifies the elapsed time period for the collection samples to be averaged.

period-value

(Optional) Number that represents seconds and optional milliseconds in the format ssssss[.mmm]. The range for seconds is from 0 to 4294967295. The range for milliseconds is from 0 to 999. If only milliseconds are used, the format is 0.mmm. If the time period is 0, the most recent sample is used.

is-percent

(Optional) Indicates whether the value argument is a percentage.

true

(Optional) Specifies that the value argument is a percentage.

false

(Optional) Specifies that the value argument is not a percentage.

maxrun

(Optional) Specifies the maximum runtime of the applet. If the maxrun keyword is specified, the maxruntime-number value must be specified. If the maxrun keyword is not specified, the default applet run time is 20 seconds.

maxruntime-number

(Optional) Number of seconds specified in ssssssss[.mmm] format, where ssssssss must be an integer representing seconds between 0 and 31536000, inclusive, and where mmm must be an integer representing milliseconds between 0 and 999).


Command Default

No EEM events are triggered on the basis of Cisco IOS system monitor counters.

Command Modes

Applet configuration (config-applet).

Command History

Release
Modification

12.2(25)S

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

The path keyword and pid argument were added and this command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(20)T

The tag and maxrun keywords were added to support multiple event statements within an applet.


Usage Guidelines

An EEM event is triggered when one of the Cisco IOS system monitor counters crosses a defined threshold. Depending on the operator, the threshold may be crossed when the value exceeds the threshold or when the value is less than the threshold.

If a match is found when the op keyword is used, a subevent is triggered.

Examples

The following example shows how to configure a policy to trigger an applet when the total amount of memory used by the process named "IP RIB Update" has increased by more than 50 percent over the sample period of 60 seconds:

Router(config)# event manager applet IOSWD_Sample3
Router(config-applet)# event ioswdsysmon sub1 mem-proc taskname "IP RIB Update" op gt val 
50 is-percent true period 60
Router(config-applet)# action 1 syslog msg "IOSWD_Sample3 Policy Triggered"

Related Commands

Command
Description

event manager applet

Registers an event applet with the Embedded Event Manager and enters applet configuration mode.


event manager applet

To register an applet with the Embedded Event Manager (EEM) and to enter applet configuration mode, use the event manager applet command in global configuration mode. To unregister the applet, use the no form of this command.

event manager applet applet-name [authorization bypass] [class class-options] [trap]

no event manager applet applet-name [authorization bypass] [class class-options] [trap]

Syntax Description

applet-name

Name of the applet file.

authorization

(Optional) Specifies AAA authorization type for applet.

bypass

(Optional) Specifies EEM AAA authorization type bypass.

class

(Optional) Specifies the EEM policy class.

class-options

(Optional) The EEM policy class. You can specify either one of the following:

class-letter—Letter from A to Z that identifies each policy class. You can specify any one class-letter.

default—Specifies the policies registered with the default class.

trap

(Optional) Generates a Simple Network Management Protocol (SNMP) trap when the policy is triggered.


Command Default

No EEM applets are registered.

Command Modes

Global configuration (config)

Command History

Release
Modification

12.0(26)S

This command was introduced.

12.3(4)T

This command was integrated into Cisco IOS Release 12.3(4)T.

12.3(2)XE

This command was integrated into Cisco IOS Release 12.3(2)XE.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(22)T

The class and trap keywords and the class-options argument were added.

15.0(1)M

The command was modified. The authorization and bypass keywords were added.


Usage Guidelines

An EEM applet is a concise method for defining event screening criteria and the actions to be taken when that event occurs.

Only one event configuration command is allowed within an applet configuration. When applet configuration submode is exited and no event command is present, a warning is displayed stating that no event is associated with this applet. If no event is specified, this applet is not considered registered and the applet is not displayed. When no action is associated with this applet, events are still triggered but no actions are performed. Multiple action applet configuration commands are allowed within an applet configuration. Use the show event manager policy registered command to display a list of registered applets.

Before modifying an EEM applet, use the no form of this command to unregister the applet because the existing applet is not replaced until you exit applet configuration mode. While you are in applet configuration mode modifying the applet, the existing applet may be executing. When you exit applet configuration mode, the old applet is unregistered and the new version is registered.

Action configuration commands are uniquely identified using the label argument, which can be any string value. Actions are sorted in ascending alphanumeric key sequence using the label argument as the sort key and are run using this sequence.

The EEM schedules and runs policies on the basis of an event specification that is contained within the policy itself. When applet configuration mode is exited, EEM examines the event and action commands that are entered and registers the applet to be run when a specified event occurs.

The EEM policies will be assigned a class when class class-letter is specified when they are registered. EEM policies registered without a class will be assigned to the default class. Threads that have default as the class will service the default class when the thread is available for work. Threads that are assigned specific class letters will service any policy with a matching class letter when the thread is available for work.

If there is no EEM execution thread available to run the policy in the specified class and a scheduler rule for the class is configured, the policy will wait until a thread of that class is available for execution. Synchronous policies that are triggered from the same input event should be scheduled in the same execution thread. Policies will be queued in a separate queue for each class using the queue_priority as the queuing order.

When a policy is triggered and if AAA is configured it will contact the AAA server for authorization. Using the authorization bypass keyword combination, you can skip to contact the AAA server and run the policy immediately. EEM stores AAA bypassed policy names in a list. This list is checked when policies are triggered. If a match is found, AAA authorization is bypassed.

To avoid authorization for commands configured through the EEM policy, EEM will use named method lists, which AAA provides. These named method lists can be configured to have no command authorization.

The following is a sample AAA configuration.

This configuration assumes a TACACS+ server at 192.168.10.1 port 10000. If the TACACS+ server is not enabled, configuration commands are permitted on the console; however, EEM policy and applet CLI interactions will fail.

enable password lab
aaa new-model
tacacs-server host 128.107.164.152 port 10000
tacacs-server key cisco
aaa authentication login consoleline none
aaa authorization exec consoleline none
aaa authorization commands 1 consoleline none
aaa authorization commands 15 consoleline none
line con 0
 exec-timeout 0 0
 login authentication consoleline
aaa authentication login default group tacacs+ enable
aaa authorization exec default group tacacs+
aaa authorization commands 1 default group tacacs+
aaa authorization commands 15 default group tacacs+

The authorization, class and trap keywords can be used in any combination.

Examples

The following example shows an EEM applet called IPSLAping1 being registered to run when there is an exact match on the value of a specified SNMP object ID that represents a successful IP SLA ICMP echo operation (this is equivalent to a ping command). Four actions are triggered when the echo operation fails, and event monitoring is disabled until after the second failure. A message that the ICMP echo operation to a server failed is sent to syslog, an SNMP trap is generated, EEM publishes an application-specific event, and a counter called IPSLA1F is incremented by a value of one.

Router(config)# event manager applet IPSLAping1
Router(config-applet)# event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.4 get-type exact 
entry-op eq entry-val 1 exit-op eq exit-val 2 poll-interval 5
Router(config-applet)# action 1.0 syslog priority critical msg "Server IP echo failed: 
OID=$_snmp_oid_val"
Router(config-applet)# action 1.1 snmp-trap strdata "EEM detected server reachability 
failure to 10.1.88.9"
Router(config-applet)# action 1.2 publish-event sub-system 88000101 type 1 arg1 10.1.88.9 
arg2 IPSLAEcho arg3 fail
Router(config-applet)# action 1.3 counter name _IPSLA1F value 1 op inc

The following example shows how to register an applet with the name one and class A and enter applet configuration mode where the timer event detector is set to trigger an event every 10 seconds. When the event is triggered, the action syslog command writes the message "hello world" to syslog.

Router(config)# event manager applet one class A
Router(config-applet)# event timer watchdog time 10
Router(config-applet)# action syslog syslog msg "hello world"
Router(config-applet)# exit

The following example shows how to bypass the AAA authorization when registering an applet with the name one and class A.

Router(config)# event manager applet one class A authorization bypass
Router(config-applet)#

Related Commands

Command
Description

show event manager policy registered

Displays registered EEM policies.


event manager directory user

To specify a directory to use for storing user library files or user-defined Embedded Event Manager (EEM) policies, use the event manager directory user command in global configuration command. To disable use of a directory for storing user library files or user-defined EEM policies, use the no form of this command.

event manager directory user {library path | policy path}

no event manager directory user {library path | policy path}

Syntax Description

library

Specifies using the directory to store user library files.

policy

Specifies using the directory to store user-defined EEM policies.

path

Absolute pathname to the user directory on the flash device.


Command Default

No directory is specified for storing user library files or user-defined EEM policies.

Command Modes

Global configuration

Command History

Release
Modification

12.3(14)T

This command was introduced.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.


Usage Guidelines

The user library directory is needed to store user library files associated with authoring EEM policies. If you have no plans to author EEM policies, you need not create a user library directory.

In Cisco IOS Release 12.3(14)T and later releases the software supports policy files created using the Tool Command Language (Tcl) scripting language. Tcl is provided in the Cisco IOS software image when the EEM is installed on the network device. Files with the .tcl extension can be EEM policies, Tcl library files, or a special Tcl library index file named "tclindex." The tclindex file contains a list of user function names and the library files that contain the user functions. The EEM searches the user library directory when Tcl starts up to process the tclindex file.

To create the user library directory before identifying it to the EEM, use the mkdir command in privileged EXEC mode. After creating the user library directory, you can use the copy command to copy .tcl library files into the user library directory.

The user policy directory is needed to store user-defined policy files. If you have no plans to author EEM policies, you need not create a user policy directory. The EEM searches the user policy directory when you enter the event manager policy policy-filename type user command.

To create the user policy directory before identifying it to the EEM, use the mkdir command in privileged EXEC mode. After creating the user policy directory, you can use the copy command to copy policy files into the user policy directory.

Examples

The following example shows how to specify disk0:/user_library as the directory to use for storing user library files:

Router(config)# event manager directory user library disk0:/user_library

Related Commands

Command
Description

copy

Copies any file from a source to a destination.

event manager policy

Registers an EEM policy with the EEM.

mkdir

Creates a new directory in a Class C flash file system.


event manager environment

To set an Embedded Event Manager (EEM) environment variable, use the event manager environment command in global configuration mode. To disable an EEM environment variable, use the no form of this command.

event manager environment variable-name string

no event manager environment variable-name

Syntax Description

variable-name

Name assigned to the EEM environment variable.

string

Series of characters, including embedded spaces, to be placed in the environment variable variable-name.


Command Default

No EEM environment variables are set.

Command Modes

Global configuration

Command History

Release
Modification

12.2(25)S

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.


Usage Guidelines

By convention, the names of all environment variables defined by Cisco begin with an underscore character to set them apart: for example, _show_cmd.

To support embedded white spaces in the string argument, this command interprets everything after the variable-name argument to the end of the line to be part of the string argument.

To display the name and value of all EEM environment variables after you have configured them, use the show event manager environment command.

Examples

The following example of the event manager environment command defines a set of EEM environment variables:

Router(config)# event manager environment _cron_entry 0-59/2 0-23/1 * * 0-7
Router(config)# event manager environment _show_cmd show version

Related Commands

Command
Description

show event manager environment

Displays the name and value of all EEM environment variables.


event manager history size

To change the size of Embedded Event Manager (EEM) history tables, use the event manager history size command in global configuration mode. To restore the default history table size, use the no form of this command.

event manager history size {events | traps} [size]

no event manager history size {events | traps}

Syntax Description

events

Changes the size of the EEM event history table.

traps

Changes the size of the EEM Simple Network Management Protocol (SNMP) trap history table.

size

(Optional) Integer in the range from 1 to 50 that specifies the number of history table entries. Default is 50.


Command Default

The size of the history table is 50 entries.

Command Modes

Global configuration

Command History

Release
Modification

12.2(25)S

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.


Examples

The following example of the event manager history size command changes the size of the SNMP trap history table to 30 entries:

Router(config)# event manager history size traps 30

Related Commands

Command
Description

show event manager history events

Displays the EEM events that have been triggered.

show event manager history traps

Displays the EEM SNMP traps that have been sent.


event manager policy

To register an Embedded Event Manager (EEM) policy with the EEM, use the event manager policy command in global configuration mode. To unregister the EEM policy, use the no form of this command.

event manager policy policy-filename [authorization bypass] [class class-options] [type {system | user}] [trap]

no event manager policy policy-filename [authorization bypass] [class class-options] [type {system | user}] [trap]

Syntax Description

policy-filename

Name of the policy file.

authorization

(Optional) Specifies AAA authorization type for policy.

bypass

(Optional) Specifies EEM AAA authorization type bypass.

class

(Optional) Specifies the EEM policy class.

class-options

(Optional) The EEM policy class. You can specify either one of the following:

class-letter—Letter from A to Z that identifies each policy class. You can specify any one class-letter.

default—Specifies the policies registered with the default class.

type

(Optional) Specifies the type of EEM policy to be registered.

system

(Optional) Registers a Cisco-defined system policy.

user

(Optional) Registers a user-defined policy.

trap

(Optional) Generates a Simple Network Management Protocol (SNMP) trap when the policy is triggered.


Command Default

No EEM policies are registered.

Command Modes

Global configuration (config)

Command History

Release
Modification

12.2(25)S

This command was introduced.

12.3(14)T

The user keyword was added, and this command was integrated into
Cisco IOS Release 12.3(14)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(22)T

The class keyword and the class-options argument were added.

15.0(1)M

The command was modified. The authorization and bypass keywords were added.


Usage Guidelines

The EEM schedules and runs policies on the basis of an event specification that is contained within the policy itself. When the event manager policy command is invoked, the EEM examines the policy and registers it to be run when the specified event occurs.

If you enter the event manager policy command without specifying the optional type keyword, the EEM first tries to locate the specified policy file in the system policy directory. If the EEM finds the file in the system policy directory, it registers the policy as a system policy. If the EEM does not find the specified policy file in the system policy directory, it looks in the user policy directory. If the EEM locates the specified file in the user policy directory, it registers the policy file as a user policy. If the EEM finds policy files with the same name in both the system policy directory and the user policy directory, the policy file in the system policy directory takes precedence and is registered as a system policy.

The EEM policies will be assigned a class when class class-letter is specified when they are registered. EEM policies registered without a class will be assigned to the default class. Threads that have default as the class will service the default class when the thread is available for work. Threads that are assigned specific class letters will service any policy with a matching class letter when the thread is available for work.

If there is no EEM execution thread available to run the policy in the specified class and a scheduler rule for the class is configured, the policy will wait until a thread of that class is available for execution. Synchronous policies that are triggered from the same input event should be scheduled in the same execution thread. Policies will be queued in a separate queue for each class using the queue_priority as the queuing order.

When a policy is triggered and if AAA is configured it will contact the AAA server for authorization. Using the authorization bypass keyword combination, you can skip to contact the AAA server and run the policy immediately. EEM stores aaa-bypassed policy names in a list. This list is checked when policies are triggered. If a match is found, AAA authorization is bypassed.

To avoid authorization for commands configured through the EEM policy, EEM will use named method lists, which AAA provides. These named method lists can be configured to have no command authorization.

The following is a sample AAA configuration.

This configuration assumes a TACACS+ server at 192.168.10.1 port 10000. If the TACACS+ server is not enabled, configuration commands are permitted on the console; however, EEM policy and applet CLI interactions will fail.

enable password lab
aaa new-model
tacacs-server host 128.107.164.152 port 10000
tacacs-server key cisco
aaa authentication login consoleline none
aaa authorization exec consoleline none
aaa authorization commands 1 consoleline none
aaa authorization commands 15 consoleline none
line con 0
 exec-timeout 0 0
 login authentication consoleline
aaa authentication login default group tacacs+ enable
aaa authorization exec default group tacacs+
aaa authorization commands 1 default group tacacs+
aaa authorization commands 15 default group tacacs+

The authorization, class, and type keywords can be used in any combination.

Examples

The following example shows how to use the event manager policy command to register a system-defined policy named tm_cli_cmd.tcl located in the system policy directory:

Router(config)# event manager policy tm_cli_cmd.tcl type system

The following example shows how to use the event manager policy command to register a user-defined policy named cron.tcl located in the user policy directory:

Router(config)# event manager policy cron.tcl type user

The following example shows how to use the event manager policy command to register a Tcl script named syslog.tcl with a class of default:

Router(config)# event manager policy syslog.tcl class default

The following example shows how to use the event manager policy command to register a Tcl script named syslog.tcl with with a class of default and bypass the AAA authorization:

Router(config)# event manager policy syslog.tcl class default authorization bypass

Related Commands

Command
Description

show event manager policy registered

Displays registered EEM policies.


event manager run

To manually run a registered Embedded Event Manager (EEM) policy, use the event manager run command in privileged EXEC mode.

event manager run policy-filename [[parameter1] [parameter2]...[parameter15]]

Syntax Description

policy-filename

Name of the policy file.

parameter

(Optional) Parameter to pass to the script. A maximum of 15 parameters can be specified. The parameters must be alphanumeric strings. Do not include quotation marks, embedded spaces, and special characters.


Command Default

No registered EEM policies are run.

Command Modes

Privileged EXEC (#)

Command History

Release
Modification

12.3(14)T

This command was introduced.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command was supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(20)T

The parameter argument was added. Up to 15 parameter values can be specified, and arguments can be specified in the registry call.


Usage Guidelines

This command also enables you to use the parameters in the event policy and to specify the arguments in the registry call.

EEM usually schedules and runs policies on the basis of an event specification that is contained within the policy itself. The event manager run command allows policies to be run manually. The event none command must first be configured to run the policy manually. The None Event Detector includes arguments when it publishes the none event. This command does not have a no form.

Examples

The following example shows how to manually run an EEM policy named policy-manual.tcl:

Router# event manager run policy-manual.tcl

Each parameter consists of the total number of built-ins ($_none_argc), followed by the list of built-ins ($_none_arg1, $_none_arg2, and $_none_arg3). The following examples show applets and Tool Tcl scripts.

Applet Example

event manager applet none_parameter_test 
 event none
 action 1 syslog msg "Number of Arguments is $_none_argc"
 action 2 syslog msg "Argument 1 is $_none_arg1"
 action 3 syslog msg "Argument 2 is $_none_arg2"
 action 4 syslog msg "Argument 3 is $_none_arg3"
end

Router# event manager run none_parameter_test 11 22 33
01:26:03: %HA_EM-6-LOG: none_parameter_test: Number of Arguments is 3
01:26:03: %HA_EM-6-LOG: none_parameter_test: Argument 1 is 11
01:26:03: %HA_EM-6-LOG: none_parameter_test: Argument 2 is 22
01:26:03: %HA_EM-6-LOG: none_parameter_test: Argument 3 is 33

For policies, event_reqinfo returns the optional parameters in a string, which are then handled by the policy.

Tcl Script Example

none_paramter_test.tcl
::cisco::eem::event_register_none

namespace import ::cisco::eem::*
namespace import ::cisco::lib::*

# query the event info
array set arr_einfo [event_reqinfo]
if {$_cerrno != 0} {
    set result [format "component=%s; subsys err=%s; posix err=%s;\n%s" \
        $_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
    error $result
}

action_syslog priority info msg "Number of Arguments is $arr_einfo(argc)"
if {$_cerrno != 0} {
    set result [format \
            "component=%s; subsys err=%s; posix err=%s;\n%s" \
            $_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
    error $result
}

action_syslog priority info msg "Argument 1 is $arr_einfo(arg1)"
if {$_cerrno != 0} {
    set result [format \
            "component=%s; subsys err=%s; posix err=%s;\n%s" \
            $_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
    error $result
}

action_syslog priority info msg "Argument 2 is $arr_einfo(arg2)"
if {$_cerrno != 0} {
    set result [format \
            "component=%s; subsys err=%s; posix err=%s;\n%s" \
            $_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
    error $result
}

action_syslog priority info msg "Argument 3 is $arr_einfo(arg3)"
if {$_cerrno != 0} {
    set result [format \
            "component=%s; subsys err=%s; posix err=%s;\n%s" \
            $_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
    error $result
}

jubjub#event manager run none_parameter_test.tcl 1 2 3
01:26:03: %HA_EM-6-LOG: tmpsys:/eem_policy/none_parameter_test.tcl: Number of Arguments is 
3
01:26:03: %HA_EM-6-LOG: tmpsys:/eem_policy/none_parameter_test.tcl: Argument 1 is 1
01:26:03: %HA_EM-6-LOG: tmpsys:/eem_policy/none_parameter_test.tcl: Argument 2 is 2
01:26:03: %HA_EM-6-LOG: tmpsys:/eem_policy/none_parameter_test.tcl: Argument 3 is 3

Related Commands

Command
Description

event manager applet

Registers an EEM applet with the EEM and enters applet configuration mode.

event manager policy

Registers an EEM policy with the EEM.

event none

Specifies that an EEM policy is to be registered with the EEM and can be run manually.

show event manager policy registered

Displays EEM policies that are already registered.


event manager scheduler script

To schedule Embedded Event Manager (EEM) policies and set the script scheduling options, use the event manager scheduler script command in global configuration mode. To remove the EEM script scheduling options and restore the default value, use the no form of this command.

event manager scheduler script thread class class-options number thread-number

no event manager scheduler script thread class class-options number thread-number

Syntax Description

thread

Specifies the thread for the class.

class

Specifies the EEM policy class.

class-options

The EEM policy class. You can specify either one or all of the following:

class-letter—Letter from A to Z that identifies each policy class. You can specify multiple instances of class-letter.

default—Specifies the policies registered with the default class.

range class-letter-range—Specifies the EEM policy class in a range. Multiple instances of range class-letter-range can be specified. The letters used in class-letter-range must be in uppercase.

number

Specifies the number of concurrent execution threads for the specified class.

thread-number

Number in the range 1 to 65535.


Command Default

Only one EEM policy can be run at a time.

Command Modes

Global configuration (config)

Command History

Release
Modification

12.3(14)T

This command was introduced.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(22)T

The range and number keywords and class-options argument were added.


Usage Guidelines

Use the event manager scheduler script command if you want to run more than one EEM policy concurrently.

You should specify any one of the options class-letter, default, and range class-letter-range. You can specify all these options in the same CLI statement.

To schedule EEM policies and set the policy scheduling options, use the event manager scheduler command in global configuration mode. To remove the scheduling of the EEM policies, use the no form of this command.

Examples

The following example shows how to specify two script execution threads to run concurrently:

Router(config)# event manager scheduler script thread class default number 2

event manager scheduler suspend

To immediately suspend Embedded Event Manager (EEM) policy scheduling execution, use the event manager scheduler suspend command in global configuration mode. To resume EEM policy scheduling, use the no form of this command.

event manager scheduler suspend

no event manager scheduler suspend

Syntax Description

This command has no arguments or keywords.

Command Default

Policy scheduling is active.

Command Modes

Global configuration

Command History

Release
Modification

12.2(25)S

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.


Usage Guidelines

Use the event manager scheduler suspend command to suspend all policy scheduling requests and do no scheduling until you enter the no form of the command. The no form of the command resumes policy scheduling and executes any pending policies.

You might want to suspend policy execution immediately instead of unregistering policies one by one for the following reasons:

For security—if you think the security of your system has been compromised.

For performance—if you want to suspend policy execution temporarily to make more CPU cycles available for other functions.

Examples

The following example of the event manager scheduler suspend command disables policy scheduling:

Router(config)# event manager scheduler suspend

May 19 14:31:22.439: fm_server[12330]: %HA_EM-6-FMS_POLICY_EXEC: fh_io_msg: Policy 
execution has been suspended

The following example of the event manager scheduler suspend command enables policy scheduling:

Router(config)# no event manager scheduler suspend

May 19 14:31:40.449: fm_server[12330]: %HA_EM-6-FMS_POLICY_EXEC: fh_io_msg: Policy 
execution has been resumed

Related Commands

Command
Description

event manager policy

Registers an EEM policy with the EEM.


event manager session cli username

To associate a username with Embedded Event Manager (EEM) policies that use the command-line interface (CLI) library, use the event manager session cli username command in global configuration mode. To remove the username association with EEM policies that use the CLI library, use the no form of this command.

event manager session cli username username

no event manager session cli username username

Syntax Description

username

Username assigned to EEM CLI sessions that are initiated by EEM policies.


Command Default

No username is associated with EEM CLI sessions.

Command Modes

Global configuration

Command History

Release
Modification

12.3(14)T

This command was introduced.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.


Usage Guidelines

Use the event manager session cli username command to assign a username for EEM policy CLI sessions when TACACS+ is used for command authorization.

If you are using authentication, authorization, and accounting (AAA) security and implement authorization on a command basis, you should use the event manager session cli username command to set a username to be associated with a Tool Command Language (Tcl) session. The username is used when a Tcl policy executes a CLI command. TACACS+ verifies each CLI command using the username associated with the Tcl session that is running the policy. Commands from Tcl policies are not usually verified because the router must be in privileged EXEC mode to register the policy.

Examples

The following example of the event manager session cli username command associates the username eemuser with EEM CLI sessions initiated by EEM policies:

Router(config)# event manager session cli username eemuser

Related Commands

Command
Description

show event manager session cli username

Displays the username associated with CLI sessions initiated by EEM policies that use the EEM CLI library.


event none

To specify that an Embedded Event Manager (EEM) policy is to be registered with the EEM and can be run manually, use the event none command in applet configuration mode. To remove the event none command from the configuration file, use the no form of this command.

event [tag event-tag] none [maxrun maxruntime-number]

no event none

Syntax Description

tag

(Optional) Specifies a tag using the event-tag argument that can be used with the trigger command to support multiple event statements within an applet.

event-tag

(Optional) String that identifies the tag.

maxrun

(Optional) Specifies the maximum runtime of the applet. If the maxrun keyword is specified, the maxruntime-number value must be specified. If the maxrun keyword is not specified, the default applet run time is 20 seconds.

maxruntime-number

(Optional) Number of seconds specified in ssssssss.mmm] format, where ssssssss must be an integer representing seconds between 0 and 31536000, inclusive, and where mmm must be an integer representing milliseconds between 0 and 999).


Command Default

No EEM events are triggered on the basis of Cisco IOS system monitor counters.

Command Modes

Applet configuration (config-applet).

Command History

Release
Modification

12.3(14)T

This command was introduced.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(20)T

The tag and maxrun keywords were added to support multiple event statements within an applet.


Usage Guidelines

EEM usually schedules and runs policies on the basis of an event specification that is contained within the policy itself. The event none command allows EEM to identify an EEM policy that can either be run manually or be run when an EEM applet is triggered. To run the policy, use either the action policy command in applet configuration mode or the event manager run command in global configuration mode.

Examples

The following example shows how to register a policy named manual-policy to be run manually and then how to execute the policy:

Router(config)# event manager applet manual-policy
Router(config-applet)# event none
Router(config-applet)# exit
Router(config)# event manager run manual-policy

Related Commands

Command
Description

action policy

Registers an EEM policy with EEM.

event manager applet

Registers an EEM applet with EEM and enters applet configuration mode.

event manager run

Manually runs a registered EEM policy.

show event manager policy registered

Displays registered EEM policies.


event oir

To specify that an Embedded Event Manager (EEM) applet be run on the basis of an event raised when a hardware card online insertion and removal (OIR) occurs, use the event oir command in applet configuration mode. To remove the event oir command from the configuration, use the no form of this command.

event [tag event-tag] oir [maxrun maxruntime-number]

no event [tag event-tag] oir [maxrun maxruntime-number]

Syntax Description

tag

(Optional) Specifies a tag using the event-tag argument that can be used with the trigger command to support multiple event statements within an applet.

event-tag

(Optional) String that identifies the tag.

maxrun

(Optional) Specifies the maximum runtime of the applet. If the maxrun keyword is specified, the maxruntime-number value must be specified. If the maxrun keyword is not specified, the default applet run time is 20 seconds.

maxruntime-number

(Optional) Number of seconds specified in ssssssss[.mmm] format, where ssssssss must be an integer representing seconds between 0 and 31536000, inclusive, and where mmm must be an integer representing milliseconds between 0 and 999).


Command Default

No EEM applets are run on the basis of an OIR event.

Command Modes

Applet configuration (config-applet)

Command History

Release
Modification

12.3(14)T

This command was introduced.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(20)T

The tag and maxrun keywords were added to support multiple event statements within an applet.


Examples

The following example shows how to configure an EEM applet to be run on the basis of an OIR event:

Router(config)# event manager applet oir-event
Router(config-applet)# event oir
Router(config-applet)# exit

Related Commands

Command
Description

event manager applet

Registers an EEM applet with EEM and enters applet configuration mode.


event process

To specify the event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of an event raised when a Cisco IOS Software Modularity process starts, restarts, or stops, use the event process command in applet configuration mode. To remove the process event criteria, use the no form of this command.

event process {abort | start | term | user-restart | user-shutdown} path process-name
[instance instance-value] [node node-value]

no event process {abort | start | term | user-restart | user-shutdown} path process-name
[instance instance-value] [node node-value]

Syntax Description

abort

Specifies that an event is triggered when the specified process aborts with one of the following abnormal conditions:

A nonzero exit status.

A kernel-generated signal is received.

A SIGTERM or SIGKILL signal is received but not as a result of a user request.

start

Specifies that an event is triggered when the specified process is started.

term

Specifies that an event is triggered when the specified process stops normally.

user-restart

Specifies that an event is triggered when there is a process restart request from the CLI command.

user-shutdown

Specifies that an event is triggered when there is a process stop request.

path process-name

Specifies the path of the process including the process name. If the value of the process-name argument contains embedded blanks, enclose it in double quotation marks.

instance instance-value

(Optional) Specifies the process instance ID. The ID must be a number in the range of 1 to 4294967295.

node node-value

(Optional) Specifies the node name which is a concatenation of the hardware slot number and the hardware CPU number.


Command Default

No EEM events are triggered on the basis of a Cisco IOS Software Modularity process starting, restarting, or stopping.

Command Modes

Applet configuration (config-applet)

Command History

Release
Modification

12.2(18)SXF4

This command was introduced.


Examples

The following example shows how to specify that an event is triggered when a Software Modularity process starts:

Router(config)# event manager applet process_term
Router(config-applet)# event process start path "cdp2.iosproc"

Related Commands

Command
Description

event manager applet

Registers an event applet with the Embedded Event Manager and enters applet configuration mode.


event snmp

To specify the event criteria for an Embedded Event Manager (EEM) applet that is run by sampling Simple Network Management Protocol (SNMP) object identifier values, use the event snmp command in applet configuration mode. To remove the SNMP event criteria, use the no form of this command.

event [tag event-tag] snmp oid oid-value get-type {exact | next} entry-op operator entry-val entry-value entry-type {value | increment | rate} [exit-comb {or | and}] [exit-op operator] [exit-val exit-value] [exit-type {value | increment | rate}] [exit-time exit-time-value] [exit-event {true | false}] [average-factor average-factor-value] poll-interval poll-int-value [maxrun maxruntime-number]

no event [tag event-tag] snmp oid oid-value get-type {exact | next} entry-op operator entry-val entry-value entry-type {value | increment | rate} [exit-comb {or | and}] [exit-op operator] [exit-val exit-value] [exit-type {value | increment | rate}] [exit-time exit-time-value] [exit-event {true | false}] [average-factor average-factor-value] poll-interval poll-int-value [maxrun maxruntime-number]

Syntax Description

tag

(Optional) Specifies a tag using the event-tag argument that can be used with the trigger command to support multiple event statements within an applet.

event-tag

(Optional) String that identifies the tag.

oid

Specifies the SNMP object identifier (object ID) value in the oid-value argument as the event criteria.

oid-value

Object ID value of the data element, in SNMP dotted notation. An OID is defined as a type in the associated MIB, CISCO-EMBEDDED-EVENT-MGR-MIB, and each type has an object value. Monitoring of some OID types is supported. When the oid keyword is used, an error message is returned if the OID is not one of the following:

INTEGER_TYPE

COUNTER_TYPE

GAUGE_TYPE

TIME_TICKS_TYPE

COUNTER_64_TYPE

OCTET_PRIM_TYPE

OPAQUE_PRIM_TYPE

get-type

Specifies the type of SNMP get operation to be applied to the object ID specified by the oid-value argument.

exact

Retrieves the object ID specified by the oid-value argument.

next

Retrieves the object ID that is the alphanumeric successor to the object ID specified by the oid-value argument.

entry-op

Compares the contents of the current object ID with the entry value using the specified operator. If there is a match, an event is triggered and event monitoring is disabled until the exit criteria are met.

operator

Two-character string. The operator argument takes one of the following values:

gt—Greater than.

ge—Greater than or equal to.

eq—Equal to.

ne—Not equal to.

lt—Less than.

le—Less than or equal to.

entry-val

Specifies the value with which the contents of the current object ID are compared to decide if an SNMP event should be raised.

entry-value

Entry object ID value of the data element.

entry-type

Specifies a type of operation to be applied to the object ID specified by the entry-value argument.

value

Value is defined as the actual value of the entry-value or exit-value argument.

increment

Increment uses the entry-value or exit-value field as an incremental difference and the entry-value or exit-value is compared with the difference between the current counter value and the value when the event was last triggered (or the first polled sample if this is a new event). A negative value checks the incremental difference for a counter that is decreasing.

rate

Rate is defined as the average rate of change over a period of time. The time period is the average-factor-value multiplied by the poll-int-value. At each poll interval the difference between the current sample and the previous sample is taken and recorded as an absolute value. An average of the previous average-factor-value samples is taken to be the rate of change.

exit-comb

(Optional) Indicates the combination of exit conditions that must be met before event monitoring is reenabled.

or

(Optional) Specifies that an exit comparison operator and an exit object ID value or an exit time value must exist.

and

(Optional) Specifies that an exit comparison operator, an exit object ID value, and an exit time value must exist.

exit-op

(Optional) Compares the contents of the current object ID with the exit value using the specified operator. If there is a match, an event is triggered and event monitoring is reenabled.

exit-val

(Optional) Specifies the value with which the contents of the current object ID are compared to decide whether the exit criteria are met.

exit-value

(Optional) Exit object ID value of the data element.

exit-type

(Optional) Specifies a type of operation to be applied to the object ID specified by the exit-value argument. If not specified, the value is assumed.

exit-time

(Optional) Specifies the time period after which the event monitoring is reenabled. The timing starts after the event is triggered.

exit-time-value

(Optional) Number that represents seconds and optional milliseconds in the format ssssss[.mmm]. The range for seconds is from 0 to 4294967295. The range for milliseconds is from 0 to 999. If only milliseconds are used, the format is 0.mmm.

exit-event

(Optional) Indicates whether a separate exit event is to be triggered when event monitoring is enabled after an initial event is triggered.

true

(Optional) Specifies that a separate exit event is triggered.

false

(Optional) Specifies that a separate exit event is not triggered. This is the default.

average-factor

(Optional) Specifies a number used to calculate the period used for rate-based calculations. The average-factor-value is multiplied by the poll-int-value to derive the period in milliseconds.

average-factor-value

(Optional) Number in the range from 1 to 64. The minimum average factor value is 1.

poll-interval

Specifies the time interval between consecutive polls.

poll-int-value

Number that represents seconds and optional milliseconds in the format ssssss[.mmm]. The range for seconds is from 1 to 4294967295. The range for milliseconds is from 0 to 999. The minimum polling interval is 1 second.

maxrun

(Optional) Specifies the maximum runtime of the applet. If the maxrun keyword is specified, the maxruntime-number value must be specified. If the maxrun keyword is not specified, the default applet run time is 20 seconds.

maxruntime-number

(Optional) Number of seconds specified in SSSSSSSSSS[.MMM] format, where SSSSSSSSSS must be an integer representing seconds between 0 and 4294967295, inclusive, and where MMM must be an integer representing milliseconds between 0 and 999.


Command Default

No EEM events are triggered on the basis of SNMP object identifier values.

Command Modes

Applet configuration (config-applet)

Command History

Release
Modification

12.0(26)S

This command was introduced.

12.3(4)T

This command was integrated into Cisco IOS Release 12.3(4)T.

12.3(2)XE

This command was integrated into Cisco IOS Release 12.3(2)XE.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.3(14)T

Optional keywords to support SNMP rate-based events were added.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(20)T

The tag and maxrun keywords and associated arguments were added.


Usage Guidelines

An EEM event is triggered when one of the fields specified by an SNMP object ID crosses a defined threshold. If multiple conditions exist, the SNMP event will be triggered when all the conditions are met.

Exit criteria are optional. If exit criteria are not specified, event monitoring will be reenabled immediately. If exit criteria are specified—on the basis of values or time periods—event monitoring is not reenabled until the criteria are met.

When the entry-op keyword is used and there is a match, an event is triggered and event monitoring is disabled until the exit criteria are met.

When the exit-op keyword is used and there is a match, an event is triggered and event monitoring is reenabled.

The entry-type keyword triggers one of the following actions:

If the value keyword is specified, the entry-value is an actual value and an SNMP event is raised whenever the absolute value occurs.

If the increment keyword is specified, the entry-value is an increment and an SNMP event is raised whenever the incremental value is reached.

If the rate keyword is specified, the entry-value is a rate of change and an SNMP event is raised whenever the rate of change value is reached.

When the optional exit-type keyword is used, the following occurs:

If the value keyword is specified, the exit-value is an actual value and the event monitoring is reenabled whenever the absolute value occurs. This is the default.

If the increment keyword is specified, the exit-value is an increment and the event monitoring is reenabled whenever the incremental value is reached.

If the rate keyword is specified, the exit-value is a rate of change and the event monitoring is reenabled whenever the rate of change value is reached.

The increment and rate types are supported only for the following OID types: INTEGER_TYPE, COUNTER_TYPE, and COUNTER_64_TYPE.

Examples

The following example shows how an EEM applet called memory-fail will run when there is an exact match on the value of a specified SNMP object ID that represents the amount of current process memory. A message saying that process memory is exhausted and noting the current available memory will be sent to syslog.

Router(config)# event manager applet memory-fail
Router(config-applet)# 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
Router(config-applet)# action 1.0 syslog msg "Memory exhausted; current available memory 
is $_snmp_oid_val bytes"

The following example shows an EEM applet called IPSLAping1 being registered to run when there is an exact match on the value of a specified SNMP object ID that represents a successful IP SLA ICMP echo operation (this is equivalent to a ping command). Four actions are triggered when the echo operation fails, and event monitoring is disabled until after the second failure.

A message saying that the ICMP echo operation to a server failed is sent to syslog, an SNMP trap is generated, EEM publishes an application-specific event, and a counter called IPSLA1F is incremented by a value of one.

Router(config)# event manager applet IPSLAping1
Router(config-applet)# event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.4 get-type exact 
entry-op eq entry-val 1 exit-op eq exit-val 2 poll-interval 5
Router(config-applet)# action 1.0 syslog priority critical msg "Server IP echo failed: 
OID=$_snmp_oid_val"
Router(config-applet)# action 1.1 snmp-trap strdata "EEM detected server reachability 
failure to 10.1.88.9"
Router(config-applet)# action 1.2 publish-event sub-system 88000101 type 1 arg1 10.1.88.9 
arg2 IPSLAEcho arg3 fail

Related Commands

Command
Description

event manager applet

Registers an event applet with the Embedded Event Manager and enters applet configuration mode.


event syslog

To specify the event criteria for an Embedded Event Manager (EEM) applet that is run by matching syslog messages, use the event syslog command in applet configuration mode. To remove the syslog message event criteria, use the no form of this command.

event [tag event-tag] syslog pattern regular-expression [occurs num-occurrences] [period period-value] [priority priority-level] [severity-level] [maxrun maxruntime-number]

no event [tag event-tag] syslog pattern regular-expression [occurs num-occurrences] [period period-value] [priority priority-level] [severity-level] [maxrun maxruntime-number]

Syntax Description

tag

(Optional) Specifies a tag using the event-tag argument that can be used with the trigger command to support multiple event statements within an applet.

event-tag

(Optional) String that identifies the tag.

pattern

Specifies that a regular expression is used to perform the syslog message pattern match.

regular-expression

String value that is the pattern to be matched.

occurs

(Optional) Specifies the number of matching occurrences before an EEM event is triggered. If a number is not specified, an EEM event is triggered after the first match.

num-occurrences

(Optional) Integer in the range of 1 to 32, inclusive.

period

(Optional) Specifies the time interval during which the one or more occurrences must take place. If the period keyword is not specified, no time-period check is applied.

period-value

(Optional) Number that represents seconds and optional milliseconds in the format ssssssssss[.mmm]. The range for seconds is from 0 to 4294967295. The range for milliseconds is from 0 to 999. If using milliseconds only, specify the milliseconds in the format 0.mmm.

priority

(Optional) Specifies the priority level of the syslog messages to be screened. If this keyword is selected, the priority-level argument must be defined. If this keyword is not specified, the software will use the default of priority all, and all priorities will be considered when log messages are screened.

priority-level

(Optional) Number or name of the desired priority level against which syslog messages are matched. Messages at or numerically lower than the specified level are matched.

Valid levels for the priority-level argument are as follows (enter the keyword or number, if available):

all—All priorities are considered when log messages are screened.

{0 | emergencies}—System is unusable.

{1 | alerts}—Immediate action is needed.

{2 | critical}—Critical conditions.

{3 | errors}—Error conditions.

 

{4 | warnings}—Warning conditions.

{5 | notifications}—Normal but significant conditions.

{6 | informational}—Informational messages.

{7 | debugging}—Debugging messages.

severity-level

(Optional) Specifies the severity level of the syslog messages to be screened. If no severity level is specified, the software will not use any severity filtering and all events will be considered when log messages are screened.

The severity-level argument may be one or more of the following keywords:

severity-critical—Critical conditions.

severity-debugging—Debugging messages.

severity-fatal—Fatal conditions.

severity-major—Major conditions.

severity-minor—Minor conditions.

severity-normal—Normal conditions.

severity-notification—Significant conditions.

severity-warning—Warning conditions.

maxrun

(Optional) Specifies the maximum runtime of the applet. If the maxrun keyword is specified, the maxruntime-number value must be specified. If the maxrun keyword is not specified, the default applet run time is 20 seconds.

maxruntime-number

(Optional) Number of seconds specified in ssssssss[.mmm] format, where ssssssss must be an integer representing seconds between 0 and 31536000, inclusive, and where mmm must be an integer representing milliseconds between 0 and 999).


Command Default

No EEM events are triggered on the basis of matches with syslog messages.

Command Modes

Applet configuration (config-applet)

Command History

Release
Modification

12.0(26)S

This command was introduced.

12.3(4)T

This command was integrated into Cisco IOS Release 12.3(4)T.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.3(14)T

Optional severity-level keywords were added.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(20)T

The tag and maxrun keywords were added were added to support multiple event statements within an applet.


Usage Guidelines

Use the event syslog command to set up event criteria against which syslog messages are matched. Syslog messages are compared against a specified regular expression. After a specified number of matches occurs within a specified time period, an EEM event is triggered. If multiple conditions exist, the EEM event is triggered when all the conditions are met.

Valid levels for the priority-level argument are as follows (enter the keyword or number, if available):

all—All priorities are considered when log messages are screened.

{0 | emergencies}—System is unusable.

{1 | alerts}—Immediate action is needed.

{2 | critical}—Critical conditions.

{3 | errors}—Error conditions.

{4 | warnings}—Warning conditions.

{5 | notifications}—Normal but significant conditions.

{6 | informational}—Informational messages.

{7 | debugging}—Debugging messages.

The severity-level argument may be one or more of the following keywords:

severity-critical—Critical conditions.

severity-debugging—Debugging messages.

severity-fatal—Fatal conditions.

severity-major—Major conditions.

severity-minor—Minor conditions.

severity-normal—Normal conditions.

severity-notification—Significant conditions.

severity-warning—Warning conditions.

Examples

The following example shows how to specify an EEM applet to run when syslog identifies that Ethernet interface 1/0 is down. The applet sends a message about the interface to syslog.

Router(config)# event manager applet interface-down
Router(config-applet)# event syslog pattern {.*UPDOWN.*Ethernet1/0.*} occurs 4

Related Commands

Command
Description

event manager applet

Registers an event applet with the Embedded Event Manager and enters applet configuration mode.


event timer

To specify the event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of time-specific events, use the event timer command in applet configuration mode. To remove the time-specific event criteria, use the no form of this command.

event [tag event-tag] timer {absolute time time-value | countdown time time-value | cron cron-entry cron-entry | watchdog time time-value} [name timer-name]

no event [tag event-tag] timer {absolute time time-value | countdown time time-value | cron cron-entry cron-entry | watchdog time time-value} [name timer-name]

Syntax Description

tag

(Optional) Specifies a tag using the event-tag argument that can be used with the trigger command to support multiple event statements within an applet.

event-tag

(Optional) String that identifies the tag.

absolute

Specifies that an event is triggered when the specified absolute time of day occurs.

time

Specifies the time interval during which the event must take place.

time-value

Integer that specifies, in seconds and optional milliseconds, the time interval during which the event must take place. The range for seconds is from 0 to 4294967295 and the range for milliseconds is from 0 to 999. The format is ssssss[.mmm]. When only milliseconds are specified, use the format 0.mmm.

countdown

Specifies that an event is triggered when the specified time counts down to zero. The timer does not reset.

cron

Specifies that an event is triggered when the CRON string specification matches the current time.

cron-entry

Specifies the first five fields of a UNIX crontab entry as used with the UNIX CRON daemon.

cron-entry

Text string that consists of five fields separated by spaces. The fields represent the times and dates when CRON timer events will be triggered. Fields and corresponding values are as follows:

minute—A number in the range from 0 to 59 that specifies when a CRON timer event is triggered.

hour—A number in the range from 0 to 23 that specifies when a CRON timer event is triggered.

day-of-month—A number in the range from 1 to 31 that specifies the day of the month when a CRON timer event is triggered.

month—A number in the range from 1 to 12 or the first three letters (not case-sensitive) of the name of the month in which a CRON timer event is triggered.

day-of-week—A number in the range from 0 to 6 (Sunday is 0) or the first three letters (not case-sensitive) of the name of the day when a CRON timer event is triggered.

Instead of the first five fields, special strings can be entered. See the "Usage Guidelines" section for details.

watchdog

Specifies that an event is triggered when the specified time counts down to zero. The timer automatically resets to the initial value and continues to count down.

name

(Optional) Specifies that the timer is named.

timer-name

(Optional) Name of the timer.

maxrun

(Optional) Specifies the maximum runtime of the applet. If the maxrun keyword is specified, the maxruntime-number value must be specified. If the maxrun keyword is not specified, the default applet run time is 20 seconds.

maxruntime-number

(Optional) Number of seconds specified in ssssssss[.mmm] format, where ssssssss must be an integer representing seconds between 0 and 31536000, inclusive, and where mmm must be an integer representing milliseconds between 0 and 999).


Command Default

No EEM events are triggered on the basis of time-specific events.

Command Modes

Applet configuration

Command History

Release
Modification

12.2(25)S

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF4

This command was integrated into Cisco IOS Release 12.2(18)SXF4 to support Software Modularity images only.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(18)SXF5

This command was integrated into Cisco IOS Release 12.2(18)SXF5.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(20)T

The tag and maxrun keywords were added were added to support multiple event statements within an applet.


Usage Guidelines

For the cron-entry argument, the following special strings also are allowed in syntax:

Range of numbers—The specified range is inclusive, and a hyphen separates the numbers. For example, 8-11 after the hour field specifies execution of a CRON timer event at hours 8, 9, 10, and 11.

Asterisk (*)—Indicates that a field is not specified and can be any value.

List—A list is a set of numbers or ranges separated by a comma but no space. For example, 1,2,5,9 or 0-4,8-12.

Step value in conjunction with a range—Following a range with /number specifies skips of the number value through the range. For example, 0-23/2 in the hour field specifies that an event is triggered every second hour. Steps are permitted after an asterisk, for example */2 means every two hours.

Instead of the five fields of a UNIX crontab entry for the cron-entry argument, one of the following seven special strings can be entered:

@yearly—An event is triggered once a year. This is the equivalent of specifying 0 0 1 1 * for the first five fields.

@annually—Same as @yearly.

@monthly—An event is triggered once a month. This is the equivalent of specifying 0 0 1 * * for the first five fields.

@weekly—An event is triggered once a week. This is the equivalent of specifying 0 0 * * 0 for the first five fields.

@daily—An event is triggered once a day. This is the equivalent of specifying 0 0 * * * for the first five fields.

@midnight—Same as @daily.

@hourly—An event is triggered once an hour. This is the equivalent of specifying 0 * * * * for the first five fields.

A CRON timer may not produce the intended result if the time-of-day clock is not set to the correct time. Network Time Protocol (NTP) services can be used to facilitate keeping an accurate time-of-day clock setting. For more details on NTP configuration, see the "Performing Basic System Management" chapter of the Cisco IOS Network Management Configuration Guide, Release 12.4.

Examples

The following example shows how to specify that an event is triggered one time after 5 hours:

Router(config)# event manager applet timer-absolute
Router(config-applet)# event timer absolute time 18000

The following example shows how to specify that an event is triggered once after 6 minutes and 6 milliseconds:

Router(config)# event manager applet timer-set
Router(config-applet)# event timer countdown time 360.006 name six-minutes

The following example shows how to specify that an event is triggered at 1:01 a.m. on January 1 each year:

Router(config)# event manager applet timer-cron1
Router(config-applet)# event timer cron cron-entry 1 1 1 1 * name Jan1

The following example shows how to specify that an event is triggered at noon on Monday through Friday of every week:

Router(config)# event manager applet timer-cron2
Router(config-applet)# event timer cron cron-entry 0 12 * * 1-5 name MonFri

The following example shows how to specify that an event is triggered at midnight on Sunday every week:

Router(config)# event manager applet timer-cron3
Router(config-applet)# event timer cron cron-entry @weekly name Sunday

The following example shows how to specify that an event is triggered every 5 hours:

Router(config)# event manager applet timer-watch
Router(config-applet)# event timer watchdog time 18000 

Related Commands

Command
Description

event manager applet

Registers an event applet with the Embedded Event Manager and enters applet configuration mode.


event wdsysmon

To specify the event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of Cisco IOS Software Modularity watchdog system monitor (WDSysMon) counters crossing a threshold, use the event wdsysmon command in applet configuration mode. To remove the event criteria, use the no form of this command.

event wdsysmon sub1 subevent1 [timewin timewin-value] [sub12-op {and | or | andnot}
sub2 subevent2] [node node-name]

no event wdsysmon sub1 subevent1 [timewin timewin-value] [sub12-op {and | or | andnot}
sub2 subevent2] [node node-name]

Subevent Syntax (for the subevent1 and subevent2 Arguments)

cpu-proc procname process-name op operator val value [period period-value]

cpu-tot op operator val value [period period-value]

deadlock procname process-name

dispatch-mgr procname process-name op operator val value [period period-value]

mem-proc procname process-name op operator val value [is-percent {true | false}] [period period-value]

mem-tot-avail op operator val value [is-percent {true | false}] [period period-value]

mem-tot-used op operator val value [is-percent {true | false}] [period period-value]

Syntax Description

sub1

Specifies the first subevent.

subevent1

First subevent. Use one of the seven forms of syntax shown above under the Subevent Syntax heading.

timewin

(Optional) Specifies the time window within which all the subevents must occur for an event to be generated.

timewin-value

(Optional) Number that represents seconds and optional milliseconds in the format ssssss[.mmm]. The range for seconds is from 0 to 4294967295. The range for milliseconds is from 0 to 999. If using milliseconds only, specify the milliseconds in the format 0.mmm.

sub12-op

(Optional) Indicates the combination operator for comparison between subevent 1 and subevent 2.

and

(Optional) Specifies that the results of both subevent 1 and subevent 2 must cross the specified thresholds.

or

(Optional) Specifies that the results of either subevent 1 or subevent 2 must cross the specified thresholds.

andnot

(Optional) Specifies that the results from subevent 1 must cross the specified threshold and the results from subevent 2 must not cross the specified threshold.

sub2

(Optional) Specifies the second subevent.

subevent2

(Optional) Second subevent. Use one of the seven forms of syntax shown above under the Subevent Syntax heading.

node

(Optional) Specifies the node.

node-name

(Optional) Node name.

Subevent Syntax

cpu-proc

Specifies the use of a sample collection of CPU process statistics.

cpu-tot

Specifies the use of a sample collection of CPU total statistics.

deadlock

Specifies the use of a sample collection of deadlock statistics.

dispatch-mgr

Specifies the use of a sample collection of dispatch manager statistics.

mem-proc

Specifies the use of a sample collection of process memory statistics.

mem-tot-avail

Specifies the use of a sample collection of total available memory statistics.

mem-tot-used

Specifies the use of a sample collection of total used memory statistics.

procname

Specifies a Cisco IOS Software Modularity process name.

process-name

Name of the Software Modularity process to be monitored. If the process name contains embedded blanks, enclose it in double quotation marks.

op

Compares the collected CPU, deadlock, dispatch manager, or memory statistics sample with the value specified in the value argument. If there is a match, the subevent is triggered.

operator

Two-character string. The operator argument takes one of the following values:

gt—Greater than.

ge—Greater than or equal to.

eq—Equal to.

ne—Not equal to.

lt—Less than.

le—Less than or equal to.

val

Specifies the value with which the collected CPU, deadlock, dispatch manager, or memory statistics sample is compared to decide if the subevent should be raised.

value

Number in the range from 1 to 4294967295.

period

(Optional) Specifies the elapsed time period for the collection samples to be averaged.

period-value

(Optional) Number that represents seconds and optional milliseconds in the format ssssss[.mmm]. The range for seconds is from 0 to 4294967295. The range for milliseconds is from 0 to 999. If only milliseconds are used, the format is 0.mmm. If the time period is 0, the most recent sample is used.

is-percent

(Optional) Indicates whether the value argument is a percentage.

true

(Optional) Specifies that the value argument is a percentage.

false

(Optional) Specifies that the value argument is not a percentage.


Command Default

No EEM events are triggered on the basis of Cisco IOS Software Modularity WDSysMon counters.

Command Modes

Applet configuration (config-applet)

Command History

Release
Modification

12.2(18)SXF4

This command was introduced.


Usage Guidelines

An EEM event is triggered when one of the Cisco IOS Software Modularity WDSysMon counters crosses a defined threshold. Depending on the operator, the threshold may be crossed when the value is greater than the threshold or when the value is less than the threshold.

Examples

The following example shows how to configure a Cisco IOS Software Modularity policy to trigger an applet when the total amount of memory used by the process named "tcp.proc" has increased by more than 50 percent over the sample period of 60 seconds:

Router(config)# event manager applet WD_Sample
Router(config-applet)# event wdsysmon sub1 mem-proc procname "tcp.proc" op gt val 50 
is-percent true period 60
Router(config-applet)# action 1 syslog msg "WD_Sample Policy Triggered"

Related Commands

Command
Description

event manager applet

Registers an event applet with the Embedded Event Manager and enters applet configuration mode.