E Commands

This chapter describes the Cisco NX-OS system management commands that begin with the letter E.

erspan-id

To configure the flow ID for an Encapsulated Remote Switched Port Analyzer (ERSPAN)) session, use the erspan-id command.

erspan-id flow_id

 
Syntax Description

flow_id

ERSPAN flow ID. The range is from 1 to 1023.

 
Defaults

None

 
Command Modes

config-erspan-src

 
Supported User Roles

network-admin
network-operator

 
Command History

Release
Modification

5.1(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to configure the flow ID for an ERSPAN session:

switch# configure terminal
switch(config)# monitor session 5 type erspan-source
switch(config-erspan-src)# erspan-id 100
switch(config-erspan-src)#

 
Related Commands

Command
Description

ip dscp

Configures the DSCP value of the packets in the ERSPAN traffic.

ip ttl

Configures the IP time-to-live (TTL) value of the ERSPAN traffic.

vrf

Configures the VRF for ERSPAN traffic forwarding.

monitor-session

Enters the monitor configuration mode for configuring an ERSPAN or SPAN session for analyzing traffic between ports.

ethanalyzer local interface

To capture packets to or from the supervisor or management interface, use the ethanalyzer local interface command. To stop packet capture, use the no form of this command.

ethanalyzer local interface { inband | mgmt } [[ capture-filter capt-expression ] [capture-ring-buffer duration seconds write bootflash | files files write bootflash |

filesize kilobytes write bootflash [ display-filter disp-expression ] [ limit-captured-frames limit ] [ limit-frame-size bytes ] [ write location ]] [ brief ]

no ethanalyzer local interface { inband | mgmt } [[ capture-filter capt-expression ] [capture-ring-buffer duration seconds write bootflash | files files write bootflash | filesize kilobytes write bootflash [ display-filter disp-expression ] [ limit-captured-frames limit ] [ limit-frame-size bytes ] [ write location ]] [ brief ]

 
Syntax Description

inband

Captures packets going between the supervisor module and the interface modules.

mgmt

Captures packets going to or from the mgmt0 port.

capture-filter capt-expression

(Optional) Filters the display of output based on the expression. The expression is a quoted string.

capture-ring-buffer

(Optional) Captures ring buffer option.

duration

Stop writing to the file or switch to the next file after value seconds have elapsed.

seconds

Duration in seconds. The range is from 0-2147483647.

write

Filename to save capture to.

files

Stop writing to capture files after value number of files were written or begin again with the first file after value number of files were written (form a ring buffer).

files

Number of files. The range is from 2 to 64.

bootflash

Specifies the bootflash file name.

filesize

Stop writing to a capture file or switch to the next file after it reaches a size of value kilobytes.

kilobytes

Size in kilobytes. The range is from 1to 65536.

display-filter disp-expression

(Optional) Filters the display of output based on the expression. The expression is a quoted string.

limit-captured-frames limit

(Optional) Configures the maximum number of frames to capture. The range is from 0 to 2147483647. The default is 100.

limit-frame-size bytes

(Optional) Captures the configured number of bytes from a frame. The range is from 64 to 65535.

write location

(Optional) Saves the captured information to the configured location. The location can be any case-sensitive, alphanumeric string up to 64 characters.

brief

(Optional) Displays the protocol summary of the captured packets.

 
Defaults

No packets captured.

 
Command Modes

Any command mode

 
Supported User Roles

network-admin
network-operator
vdc-admin
vdc-operator

 
Command History

Release
Modification

4.2(5) and 5.0(1)

Added the option capture-ring-buffer to the syntax description.

4.0(1)

This command was introduced.

 
Usage Guidelines

Cisco Ethanalyzer is based on the Wireshark open source code.

This command does not require a license.

Examples

This example shows how to capture all packets on the mgmt 0 port:

switch# ethanalyzer local interface mgmt
#

 
Related Commands

Command
Description

ethanalyzer local read

Reads the captured packet data from an Ethanalyzer capture.

ethanalyzer local read

To read packets captured by Ethanalyzer, use the ethanalyzer local read command. To stop reading the packet capture, use the no form of this command.

ethanalyzer local read location

no ethanalyzer local read location

 
Syntax Description

location

Location to read captured packets from. The location can be any case-sensitive, alphanumeric string up to 64 characters.

 
Defaults

None

 
Command Modes

Any command mode

 
Supported User Roles

network-admin
network-operator
vdc-admin
vdc-operator

 
Command History

Release
Modification

4.0(1)

This command was introduced.

 
Usage Guidelines

Cisco Ethanalyzer is based on the Wireshark open source code.

This command does not require a license.

Examples

This example shows how to capture all packets on the mgmt 0 port:

switch# ethanalyzer local read bootflash:test-mgmt0
#

 
Related Commands

Command
Description

ethanalyzer local interface

Captures packets to or from the supervisor or mgmt0 port.

event cli

To specify the event criteria for an Embedded event manager (EEM) applet that is run by matching a Cisco NX-OS command-line interface (CLI) command, use the event cli command. To remove the CLI command event criteria, use the no form of this command.

event cli [ tag tag] match regex [ count countnum ] [ time interval ]

no event cli match regex [ count countnum ] [ time interval ]

 
Syntax Description

tag tag

(Optional) Identifies this specific event when multiple events are included in the policy.

match regex

Specifies the regular expression ( regex) 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. If the expression contains embedded blanks, enclose it in double quotation marks.

count countnum

(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. The countnum argument must be an integer greater than 0.

time interval

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

The interval argument is an integer that represents seconds in the range from 0 to 4294967295.

 
Defaults

None

 
Command Modes

Applet configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

5.2.(1)

Added the tag tag keywords.

4.0(1)

This command was introduced.

 
Usage Guidelines

The event cli match regex command must meet the following criteria:

1.blank.gif It must be a fully qualified CLI string that must include the complete, not relative, path. For example, to describe the shutdown command under interface mode, the command should be:

switch(config-applet)# event cli match “conf t ; interface * ; shutdown”
 

2.blank.gif The delimiter between the modes must be “ ; ”, which is a space followed by a semi-colon and followed by another space.

This command does not require a license.

Examples

This example shows how to specify a CLI command for the EEM applet to match:

switch# configure terminal
switch(config)# event manager applet eventcli-applet
switch(config-applet)# event cli match "write memory.*" time 13
switch(config-applet)#
 

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. To remove the counter event criteria, use the no form of this command.

event counter [ tag tag] name name entry-val value entry-op { gt | ge | eq | ne | lt | le } [ exit-val value exit-op { gt | ge | eq | ne | lt | le }]

no event counter name name

 
Syntax Description

tag tag

(Optional) Identifies this specific event when multiple events are included in the policy.

name name

Specifies the name of the counter that will be monitored. The name identifier can be any string value.

entry-val value

Specifies the value with which the contents of the current counter are compared to decide if a counter event should be raised. The range is from —2147483648 to 2147483647, inclusive.

entry-op op

Compares the contents of the current counter value with the entry value using the specified operator:

  • 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

If there is a match, an event is triggered and event monitoring is disabled until the exit criteria are met.

exit-val value

(Optional) Specifies the value with which the contents of the current counter are compared to decide whether the exit criteria are met. The range is from —2147483648 to 2147483647, inclusive.

exit-op op

(Optional) Compares the contents of the current counter with the exit value using a specified operator:

  • 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

If there is a match, an event is triggered and event monitoring is reenabled.

 
Defaults

None

 
Command Modes

Applet configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

5.2.(1)

Added the tag tag keywords.

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to specify an event criteria for an EEM applet that is run when the defined critical_errors counter exceeds the entry value:

switch# configure terminal
switch(config)# event manager applet eventcntr-applet
switch(config-applet)# event counter name critical_errors entry-val 3 entry-op gt
switch(config-applet)#
 

event fanabsent

To specify an event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of a fan absent event, use the event fanabsent command. To remove the fan absent event criteria, use the no form of this command.

event fanabsent [ fan number ] time interval

no event fanabsent [ fan number ] time interval

 
Syntax Description

fan number

(Optional) Specifies a fan number to monitor for a fan absent event. The range is from 1 to 4.

time interval

Specifies the time interval (in seconds) within which the fan can stay absent. The range is from 0 to 4294967295.

 
Defaults

None

 
Command Modes

Applet configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to specify that an EEM applet runs when a fan absent event occurs:

switch# configure terminal
switch(config)# event manager applet absent-applet
switch(config-applet)# event fanabsent time 42
switch(config-applet)#
 

event fanbad

To specify an event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of a fan bad event, use the event fanbad command. To remove the fan bad event criteria, use the no form of this command.

event fanbad [ fan number ] time interval

no event fanbad [ fan number ] time interval

 
Syntax Description

fan number

(Optional) Specifies a fan number to monitor for a fan bad event. The range is from 1 to 4.

time interval

Specifies the time interval (in seconds) within which the fan can stay bad. The range is from 0 to 4294967295.

 
Defaults

None

 
Command Modes

Applet configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to specify that an EEM applet runs when a fan bad event occurs:

switch# configure terminal
switch(config)# event manager applet bad-applet
switch(config-applet)# event fanbad time 42
switch(config-applet)#
 

event gold

To specify an event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of a Generic Online Diagnostic (GOLD) failure event when monitoring one or more modules, use the event gold command. To remove the GOLD failure event criteria, use the no form of this command.

event gold [failure-type {sup | fabric | lc | port}] module { module | all } test { name | test-id } [ severity { minor | moderate | major }] testing-type { bootup | ondemand | scheduled | monitoring } consecutive-failure cnt

no event gold [failure-type {sup | fabric | lc | port}] module {module | all} test { name | test-id }

 
Syntax Description

failure-type

Specifies the GOLD failure event type:

  • sup —Specifies the supervisor failure event (default action is switchover).
  • fabric —Specifies the fabric card failure event (default action is fabric reload or poweroff).
  • lc —Specifies the linecard failure event (default action is module reload or poweroff).
  • port —Specifies the port failure event (default action is port error disable).

module

Specifies that one module or all modules must be monitored:

Note The module keyword is required to complete the event gold command.

module

Number of a specific module to be monitored.

all

Specifies that all modules are to be monitored.

test name

Specifies the test name of the event criteria. The range is

test-id

Specifies the test ID of the event criteria. The test ID is in the range of 1 to 30.

severity

(Optional) Specifies the event criteria match for the diagnostic result matches with the GOLD diagnostic error:

  • minor —Specifies to match to minor GOLD diagnostic errors.
  • moderate —Specifies to match moderate GOLD diagnostic errors.
  • major —Specifies to match major GOLD diagnostic errors.

testing-type

Specifies the event criteria based on the testing types of diagnostic from GOLD:

  • bootup —Specifies the diagnostic tests running on system bootup.
  • ondemand —Specifies the diagnostic tests running from CLI after the module is online.
  • schedule —Specifies the scheduled diagnostic tests.
  • monitoring —Specifies the diagnostic tests that are running periodically in the background to monitor the health of the system.

consecutive-failure cnt

Specifies the event criteria based on consecutive test failure information from GOLD.

 
Defaults

None

 
Command Modes

Applet configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to specify that an EEM applet runs when a new GOLD failure event occurs for any module:

switch# configure terminal
switch(config)# event manager applet gold-match
switch(config-applet)# event gold module all test atBoot testing-type bootup
switch(config-applet)#
 

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. To remove the applet command from the configuration, use the no form of this command.

event manager applet applet-name [override policy-name ] [ class class-options ]

no event manager applet applet-name

 
Syntax Description

applet-name

Unique identifier for the applet. This identifier can be any string value.

override policy - name

(Optional) Specifies this policy will override a system policy. policy - name is the name of the system policy to override. It should begin with a double underscore.

class class-options

(Optional) Specifies the EEM policy class. class-options can be either one of the following:

  • class-letter : Letter from A to Z that identifies each policy class. Specify any one class-letter.
  • default : Policies registered with the default class.

 
Defaults

None

 
Command Modes

Global configuration

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0(1)

This command was introduced.

7.2(0)D1(1)

This command was modified to add class options

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to register an applet with EEM and to enter applet configuration mode:

switch# configure terminal
switch(config)# event manager applet eem-applet
switch(config-applet)#
 

event manager clear counter

To specify an Embedded Event Manager (EEM) counter to clear, use the event manager clear counter command.

event manager clear counter counter-name

 
Syntax Description

counter-name

Name of the counter to clear.

 
Defaults

None

 
Command Modes

Applet configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear an EEM counter:

switch# configure terminal
switch(config)# event manager clear counter eem-counter
switch(config)#
 

event manager clear history events

To clear all Embedded Event Manager (EEM) event history, use the event manager clear history events command.

event manager clear history events

 
Syntax Description

This command has no arguments or keywords.

 
Defaults

None

 
Command Modes

Applet configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear all of the EEM event history:

switch# configure terminal
switch(config)# event manager clear history events
switch(config)#
 

event manager environment

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

event manager environment varname varvalue

no event manager environment varname

 
Syntax Description

varname

Name of the EEM environment variable.

varvalue

String of characters, including embedded spaces, to be placed in the environment variable varname.

 
Defaults

None

 
Command Modes

Embedded event manager

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to set an EEM environment variable:

switch# configure terminal
switch(config)# event manager environment _cron_entry 0-59/2 0-23/1 * * 0-7
switch(config)#
 

event manager policy

To register an Embedded Event Manager (EEM) policy with the EEM, use the event manager policy command. To remove the event manager policy command from the configuration file, use the no form of this command.

event manager policy VSHscriptfilename

no event manager policy VSHscriptfilename

 
Syntax Description

VSHscriptfilename

Name of the VSH script file to register with the EEM. This name becomes the name of the EEM policy.

Note System policy names begin with two underscore characters (__).

 
Defaults

None

 
Command Modes

Applet configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

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.

Examples

This example shows how to register a policy:

switch# configure terminal
switch(config)# event manager policy fanpolicy.vsh
switch(config)#
 

event manager run

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

event manager run policy-name

 
Syntax Description

policy-name

Name of the registered EEM policy to run.

Note System policy names begin with two underscore characters (__).

 
Defaults

None

 
Command Modes

Applet configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to manually run a registered EEM policy:

switch# configure terminal
switch(config)# event manager run fanpolicy.vsh
switch(config)#
 

event manager scheduler

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

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

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

 
Syntax Description

applet

Specifies the EEM applet policy

thread

Specifies the thread for the class

class class-options

Specifies the EEM policy class.

class-options can be one or a combination 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 policy registered with default class.
  • range class-letter-range : Specifies a range of EEM policy class. Multiple instances of range class-letter-range can be specified. The letters used in class-letter-range must be in uppercase.

number thread-number

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

thread-number is in the range of 1 to 65535.

 
Defaults

Policy scheduling is active.

 
Command Modes

Global Configuration (config#).

 
Command History

Release
Modification

7.2(0)D1(1)

This command was introduced.

 
Usage Guidelines

During registration, EEM policies will be assigned a class if class class-letter is specified by the event manager applet or event manager policy commands. EEM policies registered without a class will be assigned 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.

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.

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

To schedule 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.

Examples

The following example shows how to create two EEM scheduling threads to run applets of the default class:

switch# configure terminal
switch(config)# event manager scheduler applet thread class default number 2
 

The following example shows how to create one EEM execution thread to run Tcl scripts of class A, B, D and E.

switch(config)# event manager scheduler script thread class A B range D-E number 1
 

 
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 manager scheduler hold

Holds the EEM policy scheduling execution.

event manager scheduler script

Sets the options for EEM script scheduling.

debug event manager scheduler suspend

Suspends the EEM policy scheduling execution.

 

event manager scheduler clear

To clear Embedded Event Manager (EEM) policies that are executing or pending execution, use the event manager scheduler clear command in privileged EXEC mode.

event manager scheduler clear { all | policy job-id | queue-type applet [ class class-options ]} [ processor { rp_primary | rp_standby }]

 
Syntax Description

all

Clears all policies that are currently executing or pending execution.

policy job-id

Clears the EEM policy specified by the job-id.

job-id is a number in the range of 1 to 4294967295 that identifies each policy in the queue.

queue-type

Clears the queue type of the EEM policy.

applet

Specifies the EEM queue type, applet.

class class-options

(Optional) Clears the EEM policies of a specified class.

class-options can be one or a combination 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 policy registered with default class.
  • range class-letter-range : Specifies a range of EEM policy class. Multiple instances of range class-letter-range can be specified. The letters used in class-letter-range must be in uppercase.

processor

(Optional) Specifies the processor to execute the command.

rp_primary

(Optional) Indicates the default Route Processor (RP). The policy runs on the primary RP when an event correlation causes the policy to be scheduled.

rp_standby

(Optional) Indicates the standby RP. The policy runs on the standby RP when an event correlation causes the policy to be scheduled.

 
Defaults

None.

 
Command Modes

Privileged EXEC.

 
Command History

Release
Modification

7.2(0)D1(1)

This command was introduced.

 
Usage Guidelines

For class, specify atleast one of the options: class-letter, default, or range class-letter-range. You can specify all these options in the same CLI statement.

Examples

The following example shows how to clear EEM policies that are pending execution. The show commands display sample output before and after the policy is cleared.

switch# show event manager policy pending
no. job id status time of event event type name
1 1 pend Thu Sep 7 02:54:04 2006 syslog applet: one
2 2 pend Thu Sep 7 02:54:04 2006 syslog applet: two
3 3 pend Thu Sep 7 02:54:04 2006 syslog applet: three
 
switch# event manager scheduler clear policy 2
switch# show event manager policy pending
no. job id status time of event event type name
1 1 pend Thu Sep 7 02:54:04 2006 syslog applet: one
3 3 pend Thu Sep 7 02:54:04 2006 syslog applet: three
 

 
Related Commands

Command
Description

event manager policy

Registers an EEM policy with the EEM.

show event manager policy pending

Displays EEM policies that are pending execution.

 

event manager scheduler hold

To hold a scheduled Embedded Event Manager (EEM) policy event or event queue in the EEM scheduler, use the event manager scheduler hold command in the privileged EXEC mode. To resume the policy event or event queue, use the event manager scheduler release command.

event manager scheduler hold { all | policy job-id | queue-type applet [ class class-options ]}

 
Syntax Description

all

Holds all the EEM policy event or event queue in the EEM scheduler.

policy job-id

Holds the EEM policy event or event queue in the EEM scheduler as specified by the job-id.

job-id is a number in the range of 1 to 4294967295 that identifies each policy in the queue.

queue-type

Holds the EEM policy event or event based on the EEM queue type.

applet

Specifies the EEM queue type, applet.

class class-options

(Optional) Specifies the EEM policy class.

class-options can be 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 policy registered with default class.
  • range class-letter-range : Specifies a range of EEM policy class. Multiple instances of range class-letter-range can be specified. The letters used in class-letter-range must be in uppercase.

 
Defaults

None.

 
Command Modes

Privileged EXEC.

 
Command History

Release
Modification

7.2(0)D1(1)

This command was introduced.

 
Usage Guidelines

Use the show event manager policy pending command to display the policies pending in the server execution queue.

Use the event manager scheduler hold command to hold a policy or a policy queue in the server.

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

Examples

The following example shows how to hold a scheduled policy event in the EEM scheduler. The show commands display sample output before and after the policy event is held.

switch# show event manager policy pending
no. job id status time of event event type name
1 1 pend Thu Sep 7 02:54:04 2006 syslog applet: one
2 2 pend Thu Sep 7 02:54:04 2006 syslog applet: two
3 3 pend Thu Sep 7 02:54:04 2006 syslog applet: three
switch# event manager scheduler hold policy 2
switch# show event manager policy pending
no. job id status time of event event type name
1 1 pend Thu Sep 7 02:54:04 2006 syslog applet: one
2 2 held Thu Sep 7 02:54:04 2006 syslog applet: two
3 3 pend Thu Sep 7 02:54:04 2006 syslog applet: three

 
Related Commands

Command
Description

event manager policy

Registers an EEM policy with the EEM.

event manager scheduler release

Resumes the policy event or event queue.

show event manager policy pending

Displays EEM policies that are pending execution.

 

event manager scheduler modify

To modify the scheduling parameters of the Embedded Event Manager (EEM) policies, use the event manager scheduler modify command in the privileged EXEC mode.

event manager scheduler modify { all | policy job-id | queue-type applet } { class class-options [ queue-priority { high | last | low |normal }] | queue-priority { high | last | low | normal } [ class class-options ] }

 
Syntax Description

all

Changes all EEM policies that are currently executing or in the pending execution mode.

policy job-id

Changes the EEM policy specified by the job-id.

job-id is a number in the range of 1 to 4294967295 that identifies each policy in the queue.

queue-type

Changes the queue type of EEM policy.

applet

Specifies the EEM queue type, applet.

class class-options

Specifies the EEM policy class.

class-options can be 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 policy registered with default class.

queue-priority

(Optional) Changes the priority of the queuing order of the EEM policies.

high

(Optional) Specifies the queue priority as high.

last

(Optional) Specifies the queue priority as last.

low

(Optional) Specifies the queue priority as low.

normal

(Optional) Specifies the queue priority as normal.

 
Defaults

None.

 
Command Modes

Privileged EXEC.

 
Command History

Release
Modification

7.2(0)D1(1)

This command was introduced.

 
Usage Guidelines

Use the show event manager policy pending command to display the policies pending in the server execution queue.

Use the event manager scheduler modify command to modify the scheduling parameters of a policy.

For class, specify any of the options- class-letter or default. You can specify all these options in the same CLI statement..

Examples

The following example shows how to modify the scheduling parameters of EEM policies. The show commands display sample output before and after the scheduling parameters are modified.

switch# show event manager policy pending
no. job id status time of event event type name
1 default pend Thu Sep 7 02:54:04 2006 syslog applet: one
2 default pend Thu Sep 7 02:54:04 2006 syslog applet: two
3 B pend Thu Sep 7 02:54:04 2006 syslog applet: three
switch# event manager scheduler modify all class A
switch# show event manager policy pending
no. job id status time of event event type name
1 A pend Thu Sep 7 02:54:04 2006 syslog applet: one
2 A pend Thu Sep 7 02:54:04 2006 syslog applet: two
3 A pend Thu Sep 7 02:54:04 2006 syslog applet: three

 
Related Commands3 A pend Thu Sep 7 02:54:04 2006 syslog applet: three 3 A pend Thu Sep 7 02:54:04 2006 syslog applet: three

Command
Description

event manager policy

Registers an EEM policy with the EEM.

show event manager policy pending

Displays EEM policies that are pending execution.

 

event manager scheduler release

To resume execution of the specified Embedded Event Manager (EEM) policies, use the event manager scheduler release command in the privileged EXEC mode.

event manager scheduler release { all | policy job-id | queue-type applet [ class class-options ]}

 
Syntax Description

all

Resumes execution of all EEM policies.

policy job-id

Resumes the EEM policy specified by the job-id.

job-id is a number in the range of 1 to 4294967295 that identifies each policy in the queue.

queue-type

Resumes execution of policies based on EEM queue type.

applet

Specifies the EEM applet.

class class-options

Specifies the EEM policy class.

class-options can be 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 policy registered with default class.
  • range class-letter-range : Specifies a range of EEM policy class. Multiple instances of range class-letter-range can be specified. The letters used in class-letter-range must be in uppercase.

 
Defaults

By default the command is disabled.

 
Command Modes

Privileged EXEC.

 
Command History

Release
Modification

7.2(0)D1(1)

This command was introduced.

 
Usage Guidelines

To release the EEM policies held using the event manager scheduler hold command, use the event manager scheduler release command.

For class, specify any of the options: class-letter, default or range class-letter-range. You can specify all these options in the same CLI statement.

Examples

The following example shows how to resume the execution of all EEM policies.

switch# show event manager release all
 

The following example shows how to resume the execution for policies of class A to E.

switch# event manager scheduler release queue-type applet class range A-E

 

 
Related Commands

Command
Description

event manager scheduler hold

Holds the policy event or event queue.

event module-failure

To specify an event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of a module failure event, use the event module-failure command. To remove the module failure event criteria, use the no form of this command.

event module-failure type err-name module { all | module } count count [ time interval ]

no event module-failure type err-name module { all | module } count count

 
Syntax Description

type err-name

Specifies the type of failure condition. Select one of the err-name conditions:

any —Any failure

addon-sequence-failure —Addon sequence failure

hitless-upgrade-diag-failure —Runtime diagnostic failure after hitless upgrade

hitless-upgrade-failure —Hitless upgrade failure

hitless-upgrade-procmgr-notif —LC software failure after hitless upgrade

hitless-upgrade-reg-failure —Registration failure after hitless upgrade

hitless-upgrade-seq-timeout —Hitless upgrade sequence timeout

image-download-failed —Image download failure

image-upgrade-failed —Image upgrade failed

insertion-seq-failure —Insertion sequence failure

lc-failed —LC failed

lc-not-responding —LC not responding

lc-ready-timeout —LC ready timeout

lc-sw-failure —LC software failure

registration-failure —Registration failure

registration-timeout —Registration timeout

runtime-diag-failure —Runtime diag failure

runtime-diag-timeout —Runtime diag timeout

sequence-timeout —Sequence timeout

srg-info-resp-timeout —SRG info response timeout

unexpected-registration —Unexpected registration received

upgrade-srg-not-compatible —Upgrade SRG not compatible

module

Specifies that one module or all modules must be monitored.

module

Number of a specific module to be monitored.

all

Specifies that all modules are to be monitored.

count count

Specifies the number of matching occurrences before a module failure event is triggered. The range is from 0 to 4294967295.

time interval

(Optional) Specifies the time interval (in seconds) within which the events need to happen. The range is from 0 to 4294967295.

 
Defaults

None

 
Command Modes

Embedded event manager

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

5.2.(1)

Added the tag tag keywords.

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to specify that an EEM applet runs when a module failure event occurs:

switch# configure terminal
switch(config)# event manager applet modfail-applet
switch(config-applet)# event module-failure type unexpected-registration module 6 count 2
switch(config-applet)#

event module status

To configure a status event on a module, use the event module status command. To remove the status event configuration, use the no form of this command.

event module status { online | offline | any } module { all | module-number}

no event module status { online | offline | any } module { all | module-number}

 
Syntax Description

online

Specifies the online status.

offline

Specifies the offline status.

any

Specifies the online or offline status.

module

Specifies a module.

all

Specifies all modules.

module-number

Module number. The range is from 1 to 18.

 
Defaults

None

 
Command Modes

Applet Configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to configure a status event on a module:

switch(config)# event manager applet EVM1
switch(config-applet)# event module status any module 10
switch(config-applet)#
 

This example shows how to remove the status event configuration:

switch(config-applet)# no event module status any module 10
switch(config-applet)#

 
Related Commands

Command
Description

event manager applet

Registers an applet with the Embedded Event Manager (EEM).

event manager policy

Registers an Embedded Event Manager (EEM) policy with the EEM.

event oir

To specify that an Embedded Event Manager (EEM) applet be run on the basis of an event raised when a hardware online insertion and removal (OIR) occurs, use the event oir command. This command has three forms; fan, module, and powersupply. To remove the OIR specification from the configuration, use the no form of this command.

event oir [tag tag ] { fan | module | powersupply } { insert | remove | anyoir } [ number ]

no event oir [tag tag ] { fan | module | powersupply } { insert | remove | anyoir } [ number ]

 
Syntax Description

tag tag

(Optional) Identifies this specific event when multiple events are included in the policy.

fan

Specifies the system fans. Optionally, specify an individual fan.

module

Specifies the system modules. Optionally, specify an individual module.

powersupply

Specifies the system power supplies. Optionally, specify an individual power supply.

insert

Specifies to insert OIR.

remove

Specifies to remove OIR.

anyoir

Specifies to either insert or remove OIR.

number

(Optional) If you selected fan, enter a fan number to monitor for an OIR event. The range is from 1 to 4. If you selected module, enter a module number to monitor for an OIR event. The range is from 1 to 10. If you selected powersupply, enter a power supply number to monitor for an OIR event. The range is from 1 to 3.

 
Defaults

None

 
Command Modes

Applet Configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

5.2.(1)

Added the tag tag keywords.

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to specify that an EEM applet be run on the basis of an event raised when a module OIR occurs:

switch# configure terminal
switch(config)# event manager applet oir-applet
switch(config-applet)# event oir module anyoir
switch(config-applet)#
 

event policy-default

To use the event if a system policy is being overridden, use the event policy-default command. To use the overridden policy, use the no form of this command.

event policy-default count count [ time interval ]

no event policy-default count count

 
Syntax Description

count count

Specifies the number of matching occurrences before a default event is triggered. The range is from 0 to 4294967295.

time interval

(Optional) Specifies the time interval (in seconds) within which the events need to happen. The range is from 0 to 4294967295.

 
Defaults

None

 
Command Modes

Applet Configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to use the event in the system policy being overridden:

switch# configure terminal
switch(config)# event policy-default count 6
switch(config)#
 

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. To remove the SNMP event criteria, use the no form of this command.

event snmp [tag tag] oid value get-type {exact | next} entry-op {gt | ge | eq | ne | lt | le} entry-val value [{ exit-comb {or | and} exit-op {gt | ge | eq | ne | lt | le} exit-val value exit-time time } | {exit-op {gt | ge | eq | ne | lt | le} exit-val value }] poll-interval value

no event snmp [tag tag] oid value get-type {exact | next} entry-op {gt | ge | eq | ne | lt | le} entry-val value [{ exit-comb {or | and} exit-op {gt | ge | eq | ne | lt | le} exit-val value exit-time time } | {e xit-op {gt | ge | eq | ne | lt | le} exit-val value }] poll-interval value

 
Syntax Description

tag tag

(Optional) Identifies this specific event when multiple events are included in the policy.

oid value

Specifies the SNMP object identifier (object ID) values in the value argument as the event criteria. The value of the data element must be in SNMP dotted notation. An OID is defined as a type in the associated 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 op

Compares the contents of the current object ID value with the entry value using the specified operator:

  • 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

If there is a match, an event is triggered and event monitoring is disabled until the exit criteria are met.

entry-val value

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

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 op

(Optional) Compares the contents of the current object ID with the exit value using the specified operator:

  • 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

If there is a match, an event is triggered and event monitoring is reenabled.

Note This keyword and its argument are not optional if the exit-comb keyword is defined.

exit-val value

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

Note This keyword and its argument are not optional if the exit-comb keyword is defined.

poll-interval value

Specifies the time interval between consecutive polls. The value argument is an integer that represents seconds in the range from 1 to 4294967295. The minimum polling interval is 1 second.

 
Defaults

None

 
Command Modes

Applet Configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

5.2.(1)

Added the tag tag keywords.

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to specify the event criteria for an EEM applet that is run by sampling SNMP object identifier values:

switch# configure terminal
switch(config)# event manager applet snmp-applet
switch(config-applet)# event snmp oid 4.2.1.6 get-type next entry-op eq entry-val 42 poll-interval 2
switch(config-applet)#
 

event storm-control

To specify an event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of a storm control event, use the event storm-control command. To remove the storm control event criteria, use the no form of this command.

event storm-control

no event storm-control

 
Syntax Description

This command has no arguments or keywords.

 
Defaults

None

 
Command Modes

Applet Configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to specify that an EEM applet runs when a storm control event occurs:

switch# configure terminal
switch(config)# event manager applet storm-applet
switch(config-applet)# event storm-control
switch(config-applet)#
 

event syslog

To configure Cisco NX-OS Embedded Event Manager (EEM) to monitor an event, use the event syslog command. To remove the syslog configuration, use the no form of this command.

event syslog [ tag tag] [ occurs | pattern msg-text | period | priority [ 0-7 | emergencies | alerts | critical | errors | warnings | notifications | informational | debugging ]]

no event syslog [tag tag] [ occurs | pattern msg-text | period | priority [ 0-7 | emergencies | alerts | critical | errors | warnings | notifications | informational | debugging ]]

 
Syntax Description

tag tag

(Optional) Identifies this specific event when multiple events are included in the policy.

occurs

(Optional) Specifies the number of occurrences. The range is from 1 to 65000.

pattern msg-text

(Optional) Specifies the matching regular expression (regex). The pattern can contain character text, an environment variable, or a combination of the two. If the string contains embedded blanks, it is enclosed with double quotation marks.

period

(Optional) Specifies the time interval during which the event occurs. The range is from 0 to 4294967295.

priority

(Optional) Specifies the priority level of the syslog messages. If this keyword is not selected, all syslog messages are set at the informational priority level. If this keyword is selected, the priority level argument must be defined.

0-7

(Optional) Enters the priority of the log message.

emergencies

(Optional) Specifies that the system is unusable.

alerts

(Optional) Specifies that immediate action is needed.

critical

(Optional) Specifies critical conditions.

errors

(Optional) Specifies error conditions.

warnings

(Optional) Specifies warning conditions.

notifications

(Optional) Specifies normal but significant conditions.

informational

(Optional) Specifies informational messages. This is the default.

debugging

(Optional) Specifies debugging messages.

 
Defaults

None

 
Command Modes

Embedded event manager

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

5.2.(1)

Added the tag tag keywords.

5.1(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to configure a syslog message to monitor when an EEM applet is triggered:

switch# configure terminal
switch(config-applet)# event syslog occurs 10 pattern "authentication failed"
Configuration accepted successfully
 

This example shows how to remove the syslog message monitor configuration:

switch# configure terminal
switch(config-applet)# event syslog occurs 10 pattern "authentication failed"
Configuration accepted successfully

 
Related Commands

Command
Description

action syslog

Configures a syslog message to generate when an Embedded Event Manager (EEM) applet is triggered.

event temperature

To specify an event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of a temperature event, use the event temperature command. To remove the temperature event criteria, use the no form of this command.

event temperature [ module module ] [ sensor number ] threshold {major | minor | any}

no event temperature threshold {major | minor | any}

 
Syntax Description

module module

(Optional) Specifies that a specific module must be monitored.The range is from 1 to 10.

sensor number

(Optional) Specify that a specific sensor must be monitored. The range is from 1 to 18.

threshold

Specifies the threshold event that triggers the EEM applet. Choose either major, minor, or any (major or minor).

major

Specifies a major event.

minor

Specifies a minor event.

any

Specifies any event.

 
Defaults

None

 
Command Modes

Applet Configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to specify that an EEM applet runs when a temperature event occurs:

switch# configure terminal
switch(config)# event manager applet temp-applet
switch(config-applet)# event temperature threshold major
switch(config-applet)#
 

event track

To specify the event criteria for an Embedded Event Manager (EEM) applet that is run on the basis of an object tracking subsystem report for the specified object number, use the event track command. To remove the report event criteria, use the no form of this command.

event track [tag tag] object-id state {any | up | down}

no event track [tag tag] object-id

 
Syntax Description

tag tag

(Optional) Identifies this specific event when multiple events are included in the policy.

object-id

Tracked object number. The range from 1 to 500.

state

Specifies that the tracked object transition causes an event to be raised.

up

Specifies an event is to be raised when the tracked object transitions from a down state to an up state.

down

Specifies an event is to be raised when the tracked object transitions from an up state to a down state.

any

Specifies an event is to be raised when the tracked object transitions to or from any state.

 
Defaults

None

 
Command Modes

Applet Configuration (config-applet)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

5.2.(1)

Added the tag tag keywords.

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to specify that an EEM applet runs when the state of a tracked object changes:

switch# configure terminal
switch(config)# event manager applet tracking-applet
switch(config-applet)# event track 42 state down
switch(config-applet)#
 

 

exporter

To specify a NetFlow exporter to use for a NetFlow monitor, use the exporter command. To remove a NetFlow exporter, use the no form of this command.

exporter name

no exporter name

 
Syntax Description

name

Name of the exporter.

 
Defaults

None

 
Command Modes

NetFlow monitor configuration (config-flow-monitor)

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

4.0(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to configure a NetFlow exporter for a NetFlow monitor:

switch(config)# flow monitor Custom-Flow-Monitor-1
switch(config-flow-monitor)# exporter Custom-Flow-Exporter-1
switch(config-flow-monitor)#
 

This example shows how to remove a NetFlow exporter:

switch(config-flow-monitor)# no exporter
 

 
Related Commands

Command
Description

show flow sw-monitor

Displays information about NetFlow monitors.