S e n d c o m m e n t s t o n e x u s 3 k - d o c f e e d b a c k @ c i s c o . c o m
-SM-6
Cisco Nexus 3000 Series NX-OS System Management Command Reference
OL-29557-04
Chapter System Management Commands
action counter
action counter
To set or modify a named counter when an Embedded Event Manager (EEM) applet is triggered, use the
action
counter
command. To restore the default value to the counter, use the
no
form of this command.
action
label num1
[.
num2
]
counter name
name
value
value
op
{
dec
|
inc
|
nop
|
set
}
no action
label num1
[.
num2
]
counter name
name
Syntax Description
Defaults
None
Command Modes
Embedded event manager configuration mode
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to set the counter
count1
to the value in
$variable
when the EEM
counter-applet is triggered:
switch#
configure terminal
switch(config)#
event manager applet counter-applet
switch(config-applet)#
action 1.2 counter name count1 value $variable op dec
switch(config-applet)#
label num1
[.
num2
] Unique identifier that can be any string value. Actions are sorted and run in an
ascending alphanumeric sequence using the
label
as the sort key. The range for
num1 is from 1 to 16 and the range for num2 is from 0 to 9.
name
name
Specifies the name of the counter. This identifier can be any string value up to 28
characters.
value
value
Specifies the value of the counter. This identifier must be an integer value and can
be in the range of 0 to 2147483647 or a $-prefixed name (for parameter
substitution).
op
Specifies the operation to perform upon the counter.
dec
Decrements the counter by the specified value.
inc
Increments the counter by the specified value.
nop
Does nothing; using this keyword just displays the specified value.
set
Sets the counter to the specified value.
Release
Modification
5.0(3)U3(1)
This command was introduced.