Cisco IOS Network Management Command Reference
show event manager detector through show event manager session cli username
Downloads: This chapterpdf (PDF - 248.0KB) The complete bookPDF (PDF - 18.93MB) | Feedback

show event manager detector

Table Of Contents

show event manager detector

show event manager directory user

show event manager environment

show event manager history events

show event manager history traps

show event manager metric processes

show event manager policy active

show event manager policy available

show event manager policy pending

show event manager policy registered

show event manager scheduler

show event manager version

show event manager session cli username


show event manager detector

To display information about Embedded Event Manager (EEM) event detectors, use the show event manager detector command in privileged EXEC mode.

show event manager detector [all | detector-name] [detailed]

Syntax Description

all

(Optional) Displays information about all available event detectors.

detector-name

(Optional) Name of event detector. The following values are valid:

application—Application event detector.

cli—Command-line interface (CLI) event detector.

config—Config event detector.

counter—Counter event detector.

env—Environmental event detector.

gold—Generic Online Diagnostic (GOLD) event detector.

interface—Interface event detector.

ioswdsysmon—Watchdog system monitor event detector.

none—No event detector.

oir—Online insertion and removal (OIR) event detector.

resource—Resource event detector.

rf—Redundancy Framework (RF) event detector.

rpc—Remote Procedure Call (RPC) event detector.

snmp—Simple Network Management Protocol (SNMP) event detector.

snmp-notification—SNMP notification event detector.

syslog—Syslog event detector.

test—Test event detector.

timer—Timer event detector.

track—Track event detector.

detailed

(Optional) Displays detailed information about a specified event detector.


Command Modes

Privileged EXEC (#)

Command History

Release
Modification

12.4(20)T

This command was introduced.

12.2(33)SRE

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

12.2(54)SG

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

15.1(3)T

This command was integrated into Cisco IOS Release 15.1(3)T.


Usage Guidelines

Use the show event manager detector command to display information about EEM event detectors. The all keyword displays information about all event detectors. The detailed keyword displays detailed information, including:

The event registration syntax for the Tool Command Language (Tcl) policies.

The available array variables for the Tcl policies after event_reqinfo() is called.

The event registration syntax for applet policies.

The built-in variables available when an applet policy is triggered by this event detector.

Examples

The following is sample output from the show event manager detector command specifying the counter value:

Router# show event manager detector counter 
No.  Name                Version   Node        Type    
1    counter             01.00     node5/1     RP      

Router# show event manager detector counter detailed
No.  Name                Version   Node        Type    
1    counter             01.00     node5/1     RP      

        Tcl Configuration Syntax: 
        ::cisco::eem::event_register_counter 
                 [tag <tag-val>] 
                 name <counter-name>
                 entry_val <entry-val>
                 entry_op {gt | ge | eq | ne | lt | le}
                 exit_val <exit-val>
                 exit_op {gt | ge | eq | ne | lt | le}
                 [queue_priority {normal | low | high | last}] 
                 [maxrun <sec.msec>] [nice {0 | 1}] 

        Tcl event_reqinfo Array Names: 
        event_id
        event_type
        event_type_string
        event_pub_time
        event_pub_sec
        event_pub_msec
        event_severity
        name 
        value 
          
        Applet Configuration Syntax: 
        [ no ] event [tag <tag-val>] counter 
                 name <counter-name> 
                 entry-val <entry-val>
                 entry-op {gt | ge | eq | ne | lt | le}
                 exit-val <exit-val>
                 exit-op {gt | ge | eq | ne | lt | le}
                 [maxrun <sec.msec>]
          
        Applet Built-in Environment Variables: 
        $_event_id
        $_event_type
        $_event_type_string
        $_event_pub_time
        $_event_pub_sec
        $_event_pub_msec
        $_event_severity
        $_counter_name 
        $_counter_value 

Table 51 describes the significant fields shown in the display.

Table 44 show event manager detector Field Descriptions 

Field
Description

No.

The number assigned to the event detector.

Name

Name of the event detector.

Version

Version number.

Node

Node name.

Type

Where the event detector resides.


show event manager directory user

To display the directory to use for storing user library files or user-defined Embedded Event Manager (EEM) policies, use the show event manager directory user command in privileged EXEC mode.

show event manager directory user [library | policy]

Syntax Description

library

(Optional) User library files.

policy

(Optional) User-defined EEM policies.


Command Default

The directories for both user library and user policy files are displayed.

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.


Usage Guidelines

Use the event manager directory user command to specify the directory to use for storing user library or user policy files.

Examples

The following example shows the /usr/fm_policies folder on disk 0 as the directory to use for storing EEM user library files:

Router# show event manager directory user library

disk0:/usr/fm_policies

Related Commands

Command
Description

event manager directory user

Specifies a directory to use for storing user library files or user-defined EEM policies.


show event manager environment

To display the name and value of Embedded Event Manager (EEM) environment variables, use the show event manager environment command in privileged EXEC mode.

show event manager environment [all | variable-name]

Syntax Description

all

(Optional) Displays information for all environment variables. This is the default.

variable-name

(Optional) Displays information about the specified environment variable.


Command Default

If no argument or keyword is specified, information for all environment variables is displayed.

Command Modes

Privileged EXEC

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.


Examples

The following is sample output from the show event manager environment command:

Router# show event manager environment

No.  Name                          Value
1    _cron_entry                   0-59/1 0-23/1 * * 0-7
2    _show_cmd                     show version
3    _syslog_pattern               .*UPDOWN.*Ethernet1/0.*
4    _config_cmd1                  interface Ethernet1/0
5    _config_cmd2                  no shutdown

Table 45 describes the significant fields shown in the display.

Table 45 show event manager environment Field Descriptions 

Field
Description

No.

The index number assigned to the EEM environment variable.

Name

The name given to the EEM environment variable when it was created.

Value

The text content defined for the EEM environment variable when it was created.


Related Commands

Command
Description

event manager environment

Sets an EEM environment variable.


show event manager history events

To display the Embedded Event Manager (EEM) events that have been triggered, use the show event manager history events command in privileged EXEC mode.

show event manager history events [detailed] [maximum number]

Syntax Description

detailed

(Optional) Displays detailed information about each EEM event.

maximum

(Optional) Specifies the maximum number of events to display.

number

(Optional) Number in the range from 1 to 50. The default is 50.


Command Modes

Privileged EXEC (#)

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 output was modified to include the Job ID and Status fields.


Usage Guidelines

Use the show event manager history events command to track information about the EEM events that have been triggered.

Examples

The following is sample output from the show event manager history events command showing that two types of events, Simple Network Management Protocol (SNMP) and application, have been triggered.

Router# show event manager history events

No.  Time of Event             Event Type          Name
1    Fri Aug13  21:42:57 2004  snmp                applet: SAAping1 
2    Fri Aug13  22:20:29 2004  snmp                applet: SAAping1 
3    Wed Aug18  21:54:48 2004  snmp                applet: SAAping1 
4    Wed Aug18  22:06:38 2004  snmp                applet: SAAping1 
5    Wed Aug18  22:30:58 2004  snmp                applet: SAAping1 
6    Wed Aug18  22:34:58 2004  snmp                applet: SAAping1 
7    Wed Aug18  22:51:18 2004  snmp                applet: SAAping1 
8    Wed Aug18  22:51:18 2004  application         applet: CustApp1

The following is sample output from the show event manager history events command that includes the Job ID and Status fields:

Router# show event manager history events

No. Job ID  Status   Time of Event             Event Type  Name
1   1       success  Thu Sep 7  02:54:04 2006  syslog      applet: two
2   2       success  Thu Sep 7  02:54:04 2006  syslog      applet: three 
3   3       success  Thu Sep 7  02:54:04 2006  syslog      applet: four 
4   4       abort    Thu Sep 7  02:54:04 2006  syslog      applet: five
5   5       abort    Thu Sep 7  02:54:04 2006  syslog      applet: six 
6   6       abort    Thu Sep 7  02:54:04 2006  syslog      applet: seven 
7   7       abort    Thu Sep 7  02:54:04 2006  syslog      applet: eight 
8   8       cleared  Thu Sep 7  02:54:04 2006  syslog      applet: nine 
9   9       cleared  Thu Sep 7  02:54:04 2006  syslog      applet: ten 
10  10      cleared  Thu Sep 7  02:54:04 2006  syslog      applet: eleven 

The following is sample output from the show event manager history events command using the detailed keyword:

Router# show event manager history events detailed

No. Job ID  Status   Time of Event             Event Type          Name
1   1       success  Thu Sep 7  02:54:04 2006  syslog              applet: two 
 msg {23:13:29: %CLEAR-5-COUNTERS: Clear counter on all interfaces by console}
2   2       success  Thu Sep 7  02:54:04 2006  syslog              applet: three 
 msg {23:13:29: %CLEAR-5-COUNTERS: Clear counter on all interfaces by console}
3   3      success   Thu Sep 7  02:54:04 2006  syslog              applet: four 
 msg {23:13:29: %CLEAR-5-COUNTERS: Clear counter on all interfaces by console}
4   4      abort     Thu Sep 7  02:54:04 2006  syslog              applet: five 
 msg {23:13:29: %CLEAR-5-COUNTERS: Clear counter on all interfaces by console}
5   5      abort     Thu Sep 7  02:54:04 2006  syslog              applet: six 
 msg {23:13:29: %CLEAR-5-COUNTERS: Clear counter on all interfaces by console}
6   6      abort     Thu Sep 7  02:54:04 2006  syslog              applet: seven 
 msg {23:13:29: %CLEAR-5-COUNTERS: Clear counter on all interfaces by console}
7   7      cleared   Thu Sep 7  02:54:04 2006  syslog              applet: eight 
 msg {23:13:29: %CLEAR-5-COUNTERS: Clear counter on all interfaces by console}
8   8      cleared   Thu Sep 7  02:54:04 2006  syslog              applet: nine 
 msg {23:13:29: %CLEAR-5-COUNTERS: Clear counter on all interfaces by console}
9   9      cleared   Thu Sep 7  02:54:04 2006  syslog              applet: ten 
 msg {23:13:29: %CLEAR-5-COUNTERS: Clear counter on all interfaces by console}
10  10     success   Thu Sep 7  02:54:04 2006  syslog              applet: eleven 
 msg {23:13:29: %CLEAR-5-COUNTERS: Clear counter on all interfaces by console} 

Table 46 describes the significant fields shown in the displays.

Table 46 show event manager history events Field Descriptions 

Field
Description

No.

Event number.

Job ID

Unique internal EEM scheduler job identification number.

Status

Policy completion status for the policy scheduled for this event. There are three possible status values:

Success—Indicates that the policy for this event completed normally.

Abort—Indicates that the policy for this event terminated abnormally.

Cleared—Indicates that the policy for this event was removed from execution using the event manager scheduler clear command.

Time of Event

Day, date, and time when the event was triggered.

Event Type

Type of event.

Name

Name of the policy that was triggered.


Related Commands

Command
Description

event manager history size

Modifies the size of the EEM history tables.

event manager scheduler clear

Clears EEM policies that are executing or pending execution.


show event manager history traps

To display the Embedded Event Manager (EEM) Simple Network Management Protocol (SNMP) traps that have been sent, use the show event manager history traps command in privileged EXEC mode.

show event manager history traps [server | policy]

Syntax Description

server

(Optional) Displays SNMP traps that were triggered from the EEM server.

policy

(Optional) Displays SNMP traps that were triggered from within an EEM policy.


Command Modes

Privileged EXEC

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.


Usage Guidelines

Use the show event manager history traps command to identify whether the SNMP traps were implemented from the EEM server or from an EEM policy.

Examples

The following is sample output from the show event manager history traps command:

Router# show event manager history traps policy

No.  Time                      Trap Type           Name
1    Wed Aug18  22:30:58 2004  policy              EEM Policy Director
2    Wed Aug18  22:34:58 2004  policy              EEM Policy Director
3    Wed Aug18  22:51:18 2004  policy              EEM Policy Director

Table 47 describes the significant fields shown in the display.

Table 47 show event manager history traps Field Descriptions 

Field
Description

No.

Trap number.

Time

Date and time when the SNMP trap was implemented.

Trap Type

Type of SNMP trap.

Name

Name of the SNMP trap that was implemented.


Related Commands

Command
Description

event manager history size

Modifies the size of the EEM history tables.


show event manager metric processes

To display Embedded Event Manager (EEM) reliability metric data for Cisco IOS Software Modularity processes, use the show event manager metric processes command in privileged EXEC mode.

show event manager metric processes {all | process-name}

Syntax Description

all

Displays the process metric data for all Cisco IOS Software Modularity processes.

process-name

Specific process name.


Command Modes

Privileged EXEC

Command History

Release
Modification

12.2(18)SXF4

This command was introduced.


Usage Guidelines

Use this command to display the reliability metric data for Cisco IOS Software Modularity processes. The system keeps a record of when processes start and end, and this data is used as the basis for reliability analysis.

The information provided by this command allows you to get availability information for a process or group of processes. A process is considered available when it is running.

Examples

The following is partial sample output from the show event manager metric processes command. In this partial example, the first and last entries showing the metric data for the processes on all the cards inserted in the system are displayed.

Router# show event manager metric processes all

=====================================
node name: node0
process name: devc-pty, instance: 1
sub_system: 0, version: 00.00.0000
--------------------------------
last event type: process start
recent start time: Fri Oct10  20:34:40 2003
recent normal end time: n/a
recent abnormal end time: n/a
number of times started: 1
number of times ended normally: 0
number of times ended abnormally: 0
most recent 10 process start times:
--------------------------
Fri Oct10  20:34:40 2003
--------------------------

most recent 10 process end times and types:

cumulative process available time: 6 hours 30 minutes 7 seconds 378 milliseconds
cumulative process unavailable time: 0 hours 0 minutes 0 seconds 0 milliseconds
process availability:  0.100000000
number of abnormal ends within the past 60 minutes (since reload): 0
number of abnormal ends within the past 24 hours (since reload): 0
number of abnormal ends within the past 30 days (since reload): 0
.
.
.
=====================================
node name: node0
process name: cdp2.iosproc, instance: 1
sub_system: 0, version: 00.00.0000
--------------------------------
last event type: process start
recent start time: Fri Oct10  20:35:02 2003
recent normal end time: n/a
recent abnormal end time: n/a
number of times started: 1
number of times ended normally: 0
number of times ended abnormally: 0
most recent 10 process start times:
--------------------------
Fri Oct10  20:35:02 2003
--------------------------

most recent 10 process end times and types:
          
cumulative process available time: 6 hours 29 minutes 45 seconds 506 milliseconds
cumulative process unavailable time: 0 hours 0 minutes 0 seconds 0 milliseconds
process availability:  0.100000000
number of abnormal ends within the past 60 minutes (since reload): 0
number of abnormal ends within the past 24 hours (since reload): 0
number of abnormal ends within the past 30 days (since reload): 0

Table 48 describes the significant fields shown in the display.

Table 48 show event manager metric processes Field Descriptions 

Field
Description

node name

Node name.

process name

Software Modularity process name.

instance

Instance number of the Software Modularity process.

sub_system

Subsystem number.

version

Version number.



show event manager policy active

To display Embedded Event Manager (EEM) policies that are executing, use the show event manager policy active command in privileged EXEC mode.

show event manager policy active [queue-type {applet | call-home | axp | script} | class class-options | detailed]

Syntax Description

queue-type

(Optional) Specifies the queue type of the EEM policy.

applet

(Optional) Specifies EEM applet policy.

call-home

(Optional) Specifies EEM Call-Home policy.

axp

(Optional) Specifies EEM axp policy.

script

(Optional) Specifies EEM script policy.

class

(Optional) Specifies EEM class policy.

class-options

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

class-letter—The class letter assigned for the EEM policy. Letters range from A to Z. Multiple instances of class letter can be specified.

default—Specifies policies registered with 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.

detailed

(Optional) Specifies the detailed content of the EEM policies.


Command Modes

Privileged EXEC (#)

Command History

Release
Modification

12.4(22)T

This command was introduced.

12.2(33)SRE

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


Usage Guidelines

Use the show event manager policy active command to display the running policies.

Examples

The following is sample output from the show event manager policy active command that includes the priority, scheduler node, and event type fields:

Router# show event manager policy active

no. job id   p s    status    time of event              event type        name
1    1       N A    wait      Wed Oct8 21:45:10 2008     syslog            continue.tcl
2    12609   N A    running   Mon Oct29 20:49:42 2007    timer watchdog    loop.tcl

Table 49 describes the significant fields shown in the displays.

Table 49 show event manager policy active Field Descriptions 

Field
Description

no.

Index number automatically assigned to the policy.

job id

Unique internal EEM scheduler job identification number.

p

Priority of the policy. There are four priorities:

L—Indicates that the policy is of low priority.

H—Indicates that the policy is of high priority.

N—Indicates that the policy is of normal priority.

Z—Indicates that the policy is of least priority.

s

Scheduler node of the policy. There are two nodes:

A—Indicates that the scheduler node of this policy is active.

S—Indicates that the scheduler node of this policy is standby.

status

Scheduling status for the policy. There are six possible status values:

pend—Indicates that the policy is awaiting execution.

runn—Indicates that the policy is executing.

exec—Indicates that the policy has completed executing and is awaiting scheduler cleanup tasks.

hold—Indicates that the policy is being held.

wait—Indicates that the policy is waiting for a new event.

continue—Indicates that the policy receives a new event and is ready to run.

time of event

Date and time when the policy was queued for execution in the EEM server.

event type

Type of event.

name

Name of the EEM policy file.


Related Commands

Command
Description

show event manager

Shows the event manager details of an EEM policy.


show event manager policy available

To display Embedded Event Manager (EEM) policies that are available to be registered, use the show event manager policy available command in privileged EXEC mode.

show event manager policy available [description [policy-name] | [detailed policy-filename] [system | user]]

Syntax Description

description

(Optional) Specifies a brief description of the available policy.

policy-name

(Optional) Name of the policy.

detailed

(Optional) Displays the actual sample policy for the specified policy-filename.

policy-filename

(Optional) Name of sample policy to be displayed.

system

(Optional) Displays all available system policies.

user

(Optional) Displays all available user policies.


Command Default

If no keyword is specified, information for all available system and user policies is displayed.

Command Modes

Privileged EXEC (#)

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

The detailed keyword and the policy-filename argument were added, and 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 output was modified to display bytecode scripts with a file extension of .tbc.

15.0(1)M

The command was modified. The description keyword and policy-name argument were added.


Usage Guidelines

This command is useful if you forget the exact name of a policy required for the event manager policy command.

The detailed keyword displays the actual specified sample policy. Use description policy-name to describe a policy. If policy-name is not specified, the output of show command displays the description of all the available policies.

In Cisco IOS Release 12.4(20)T, EEM 2.4 introduced bytecode support to allow storage of Tcl scripts in bytecode format, and the output of this command was modified to display files with a .tbc extension as well as the usual .tcl extension for Tcl scripts.

Examples

The following is sample output from the show event manager policy available command:

Router# show event manager policy available

No.  Type    Time Created                  Name
1    system  Tue Sep 12 09:41:32 2002      sl_intf_down.tcl
2    system  Tue Sep 12 09:41:32 2002      tm_cli_cmd.tcl

Table 50 describes the fields shown in the display.

Table 50 show event manager policy available Field Descriptions 

Field
Description

No.

Index number automatically assigned to the policy.

Type

Indicates whether the policy is a system policy.

Time Created

Time stamp indicating the date and time when the policy file was created.

Name

Name of the EEM policy file.


The following is sample output from the show event manager policy available command with the detailed keyword and a policy name specified:

Router# show event manager policy available detailed tm_cli_cmd.tcl

::cisco::eem::event_register_timer cron name crontimer2 cron_entry $_cron_entry maxrun 240
#------------------------------------------------------------------
# EEM policy that will periodically execute a cli command and email the
# results to a user.
#
# July 2005, Cisco EEM team
#
# Copyright (c) 2005 by cisco Systems, Inc.
# All rights reserved.
#------------------------------------------------------------------
### The following EEM environment variables are used:
###
### _cron_entry (mandatory)            - A CRON specification that determines 
###                                      when the policy will run. See the 
###                                      IOS Embedded Event Manager 
###                                      documentation for more information
###                                      on how to specify a cron entry.
### Example: _cron_entry                 0-59/1 0-23/1 * * 0-7 
###
### _email_server (mandatory)          - A Simple Mail Transfer Protocol (SMTP)
###                                      mail server used to send e-mail.
### Example: _email_server               mailserver.customer.com
###

The following is sample output from the show event manager policy available command showing a Tcl script with a .tcl filename extension and a bytecode script with a filename extension of .tbc. This example is for a Cisco IOS Release 12.4(20)T or later image.

Router# show event manager policy available

No.  Type    Time Created                  Name
1    system  Tue Jun 10 09:41:32 2008      sl_intf_down.tcl
2    system  Tue Jun 10 09:41:32 2008      tm_cli_cmd.tbc

Related Commands

Command
Description

event manager policy

Registers an EEM policy with the EEM.


show event manager policy pending

To display Embedded Event Manager (EEM) policies that are pending for execution, use the show event manager policy pending command in EXEC mode.

show event manager policy pending [queue-type {applet | call-home | javalin | script} | class class-options | detailed]

Syntax Description

queue-type

Specifies the queue type of the EEM policy.

applet

Specifies EEM applet policy.

call-home

Specifies EEM Call-Home policy.

javalin

Specifies EEM Javalin policy.

script

Specifies EEM script policy.

class

Specifies EEM class policy.

class-options

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

class-letter—Specifies the class letter assigned for the EEM policy. Letters range from A to Z. Multiple instances of class letter can be specified.

default—Specifies policies registered with 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.

detailed

Specifies the detailed content of the EEM policies.


Command Modes

EXEC

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 output was modified to include the Job ID and Status fields.

12.4(22)T

This command is supported with new options to qualify the policy queues reported in the output display and provides detailed policy information.


Usage Guidelines

Pending policies are policies that are pending execution in the EEM server execution queue. When an event is triggered, the policy that is registered to handle the event is queued for execution in the EEM server. Use the show event manager policy pending command to display the policies in this queue and to view the policy details.

Examples

The following is sample output from the show event manager policy pending command:

Router# show event manager policy pending

no. job id 			p s 		status    time of event                    event type     name
1    12851   N A    pend    Mon Oct29   20:51:18 2007   timer watchdog   loop.tcl
2    12868   N A    pend    Mon Oct29   20:51:24 2007   timer watchdog   loop.tcl
3    12873   N A    pend    Mon Oct29   20:51:27 2007   timer watchdog   loop.tcl
4    12907   N A    pend    Mon Oct29   20:51:41 2007   timer watchdog   loop.tcl
5    13100   N A    pend    Mon Oct29   20:52:55 2007   timer watchdog   loop.tcl

Table 51 describes the significant fields shown in the displays.

Table 51 show event manager policy pending Field Descriptions 

Field
Description

No.

Index number automatically assigned to the policy.

Job ID

Unique internal EEM scheduler job identification number.

Priority

Priority of the policy. There are four priorities:

L—Indicates that the policy is of low priority.

H—Indicates that the policy is of high priority.

N—Indicates that the policy is of normal priority.

Z—Indicates that the policy is of least priority.

Scheduler node

Scheduler node of the policy. There are two nodes:

A—Indicates that the scheduler node of this policy is active.

S—Indicates that the scheduler node of this policy is standby.

Status

Scheduling status for the policy. There are six possible status values:

pend—Indicates that the policy is awaiting execution.

runn—Indicates that the policy is executing.

exec—Indicates that the policy has completed executing and is awaiting scheduler cleanup tasks.

hold—Indicates that the policy is being held.

wait—Indicates that the policy is waiting for a new event.

continue—Indicates that the policy receives a new event and is ready to run.

Time of Event

Date and time when the policy was queued for execution in the EEM server.

Event Type

Type of event.

Name

Name of the EEM policy file.


Related Commands

Command
Description

show event manager

Shows the event manager details of an EEM policy.


show event manager policy registered

To display Embedded Event Manager (EEM) policies that are already registered, use the show event manager policy registered command in privileged EXEC mode.

show event manager policy registered [description [policy-name] | detailed policy-filename [system | user] | [event-type event-name] [system | user] [time-ordered | name-ordered]]

Syntax Description

description

(Optional) Displays a brief description about the registered policy.

policy-name

(Optional) Policy name for which the description should be displayed. If policy name is not provided, then description of all registered policies are displayed.

detailed

(Optional) Displays the contents of the specified policy.

system

(Optional) Displays the registered system policies.

user

(Optional) Displays the registered user policies.

policy-filename

(Optional) Name of policy whose contents are to be displayed.

event-type

(Optional) Displays the registered policies for the event type specified in the event-name argument. If the event type is not specified, all registered policies are displayed.

event-name

(Optional) Type of event. The following values are valid:

application—Application event type.

cli—Command-line interface (CLI) event type.

config—Configuration change event type.

counter—Counter event type.

env—Environmental event type.

interface—Interface event type.

ioswdsysmon—Watchdog system monitor event type.

none—Manually run policy event type.

oir—OIR event type.

rf—Redundancy facility event type.

snmp—Simple Network Management Protocol (SNMP) event type.

snmp-object—Snmp object event type.

syslog—Syslog event type.

test—Test event type.

timer-absolute—Absolute timer event type.

timer-countdown—Countdown timer event type.

timer-cron—Clock daemon (CRON) timer event type.

timer-watchdog—Watchdog timer event type.

time-ordered

(Optional) Displays the policies in the order of the time at which they were registered. This is the default.

name-ordered

(Optional) Displays the policies, in alphabetical order, by policy name.


Command Default

If this command is invoked with no optional keywords, it displays all registered EEM system and user policies for all event types. The policies are displayed according to the time at which they were registered.

Command Modes

Privileged EXEC (#)

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

Additional event types and the user keyword were 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

The detailed keyword and the policy-filename argument were added, and 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.

15.0(1)M

This command was modified. The description keyword and the policy-name argument were added.


Usage Guidelines

The output shows registered policy information in two parts. The first line in each policy description lists the index number assigned to the policy, the policy type (system), the type of event registered, the time when the policy was registered, and the name of the policy file. The remaining lines of each policy description display information about the registered event and how the event is to be handled; the information comes directly from the Tool Command Language (Tcl) command arguments that make up the policy file. Output of the show event manager policy registered command is most helpful to persons who are writing and monitoring EEM policies.

The detailed keyword displays the actual specified sample policy including details about the environment variables used by the policy and instructions for running the policy.

Examples

The following is sample output from the show event manager policy registered command:

Router# show event manager policy registered

No.  Class   Type    Event Type          Trap  Time Registered           Name
1    applet  system  snmp                Off   Fri Aug 13 17:42:52 2004  IPSLAping1
 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.000
 action 1.0 syslog priority critical msg Server IPecho Failed: OID=$_snmp_oid_val 
 action 1.1 snmp-trap strdata EEM detected server reachability failure to 10.1.88.9
 action 1.2 publish-event sub-system 88000101 type 1 arg1 10.1.88.9 arg2 IPSLAEcho arg3 
fail
 action 1.3 counter name _IPSLA1F value 1 op inc

Table 52 describes the significant fields shown in the display.

Table 52 show event manager policy registered Field Descriptions 

Field
Description

No.

Index number automatically assigned to the policy.

Class

Class of policy, either applet or script.

Type

Identifies whether the policy is a system policy.

Event Type

Type of event.

Trap

Identifies whether an SNMP trap is enabled.

Time Registered

Time stamp indicating the day, date, and time when the policy file was registered.

Name

Name of the EEM policy file.


The following is sample output from the show event manager policy registered command showing the use of the detailed keyword for the policy named tm_cli_cmd.tcl:

Router# show event manager policy registered detailed tm_cli_cmd.tcl

::cisco::eem::event_register_timer cron name crontimer2 cron_entry $_cron_entry maxrun 240
#------------------------------------------------------------------
# EEM policy that will periodically execute a cli command and email the
# results to a user.
#
# July 2005, Cisco EEM team
#
# Copyright (c) 2005 by cisco Systems, Inc.
# All rights reserved.
#------------------------------------------------------------------
### The following EEM environment variables are used:
###
### _cron_entry (mandatory)            - A CRON specification that determines 
###                                      when the policy will run. See the 
###                                      IOS Embedded Event Manager 
###                                      documentation for more information
###                                      on how to specify a cron entry.
### Example: _cron_entry                 0-59/1 0-23/1 * * 0-7 
###
### _email_server (mandatory)          - A Simple Mail Transfer Protocol (SMTP)
###                                      mail server used to send e-mail.
### Example: _email_server               mailserver.example.com
###

Related Commands

Command
Description

event manager policy

Registers an EEM policy with the EEM.


show event manager scheduler

To display the schedule activities of the scheduled Embedded Event Manager (EEM) policies, use the show event manager scheduler command in privileged EXEC mode.

show event manager scheduler thread [queue-type {applet | call-home | axp | script} [detailed]]

Syntax Description

thread

Specifies the thread for the scheduler.

queue-type

(Optional) Specifies the queue type of the EEM policy.

applet

(Optional) Specifies EEM applet policy.

call-home

(Optional) Specifies EEM Call-Home policy.

axp

(Optional) Specifies EEM axp policy.

script

(Optional) Specifies EEM script policy.

detailed

(Optional) Specifies the detailed content of the EEM policies.


Command Modes

Privileged EXEC (#)

Command History

Release
Modification

12.4(22)T

This command was introduced.

12.2(33)SRE

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


Usage Guidelines

Use the show event manager scheduler command to show the EEM's scheduler activities. This command shows all the EEM execution threads from the scheduler perspective and the details of the running policies.

You can specify one or all of the following options: applet, call-home, axp, script, and detailed.

Examples

The following is sample output from the show event manager scheduler command:

Router# show event manager scheduler thread

1 Script threads service class default
  total: 1 running: 1 idle: 0
2 Script threads service class range A-D
  total: 3 running: 0 idle: 3
3 Applet threads service class default
  total: 32 running: 0 idle: 32
4 Applet threads service class W X
  total: 5 running: 0 idle: 5

Router# show event manager scheduler script thread detailed

1 Script threads service class default
  total: 1 running: 1 idle: 0
1 job id: 1, pid: 215, name: continue.tcl
2 Script threads service class range A-D
  total: 3 running: 0 idle: 3
3 Applet threads service class default
  total: 32 running: 0 idle: 32
4 Applet threads service class W X
  total: 5 running: 0 idle: 5

Related Commands

Command
Description

show event manager

Shows the event manager details of an EEM policy.


show event manager version

To display the version of Embedded Event Manager (EEM) software running on the device, use the show event manager version command in privileged EXEC mode.

show event manager version

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC (#)

Command History

Release
Modification

12.4(20)T

This command was introduced.

12.2(33)SRE

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


Usage Guidelines

Use the show event manager version command to display details about the EEM software running on the device. The following values are listed:

The version of the EEM software.

The version of the EEM software components.

The version of each available EEM event detector.

Examples

The following is sample output from the show event manager version command:


Router#show event manager version

Embedded Event Manager Version 2.40
Component Versions:
eem: (v240_throttle)2.21.49
eem-gold: (v240_throttle)1.2.34
eem-call-home: (v240_throttle)2.0.0

Event Detectors:
Name                Version   Node        Type    
appl                01.00     node0/0     RP      
syslog              01.00     node0/0     RP      
track               01.00     node0/0     RP      
cli                 01.00     node0/0     RP      
counter             01.00     node0/0     RP      
interface           01.00     node0/0     RP      
ioswdsysmon         01.00     node0/0     RP      
none                01.00     node0/0     RP      
oir                 01.00     node0/0     RP      
snmp                01.00     node0/0     RP      
snmp-notification   01.00     node0/0     RP      
timer               01.00     node0/0     RP      
test                01.00     node0/0     RP      
config              01.00     node0/0     RP      
env                 01.00     node0/0     RP 

Table 53 describes the significant fields shown in the display.

Table 53 show event manager version Field Descriptions 

Field
Description

Embedded Event Manager Version 2.40

Version of EEM software.

Component Versions:

Software components.

Event Detectors

Each available event detector.

Name

Name of the event detector.

Version

Version number.

Node

Node name.

Type

Where the event detector resides.

appl

Application event detector.

syslog

Syslog event detector.

track

Track event detector.

cli

Command-line interface (CLI) event detector.

counter

Counter event detector.

interface

Interface event detector.

ioswdsysmon

Watchdog system monitor event detector.

none

No event detector.

oir

Online insertion and removal (OIR) event detector.

snmp

Simple Network Management Protocol (SNMP) event detector.

snmp-notification

SNMP notification event detector.

timer

Timer event detector.

test

Test event detector.

config

Config event detector.

env

Environmental event detector.


Related Commands

Command
Description

show event manager detector

Displays information about EEM event detectors.


show event manager session cli username

To display the username associated with Embedded Event Manager (EEM) policies that use the command-line interface (CLI) library, use the show event manager session cli username command in privileged EXEC mode.

show event manager session cli username

Syntax Description

This command has no arguments or keywords.

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.


Usage Guidelines

Use this command to display the username associated with a Tool Command Language (Tcl) EEM policy. 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 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 shows that the username of eemuser is associated with a Tcl session:

Router# show event manager session cli username

eemuser

Related Commands

Command
Description

event manager session cli username

Associates a username with EEM policies that use the CLI library.