Set _cerrno
Yes
Sample Usage
Here is a similar example as above using this single command:
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
set i 1
while {1 == 1} {
# Start high performance policy loop
array set arr_einfo [event_reqinfo]
if {$_cerrno != 0} {
set result [format "component=%s; subsys err=%s; posix err=%s;\n%s" \
$_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
error $result
}
action_syslog msg "event $i serviced" priority info
if {$i == 5} {
action_syslog msg "Exiting after servicing 5 events" priority info
exit 0
}
incr i
array set _event_state_arr [event_completion_with_wait status 0 refresh_vars 1]
if {$_event_state_arr(event_state) != 0} {
action_syslog msg "Exiting: failed event_state " \
" $event_state_arr(event_state)" priority info
exit 0
}
}
The running configuration output is the same as the event_publishTcl command.
Note
event_publish
Publishes an application-specific event.
Syntax
event_publish sub_system ? type ? [arg1 ?] [arg2 ?] [arg3 ?] [arg4 ?]
Arguments
(Mandatory) Number assigned to the EEM policy that
published the application-specific event. Number is
set to 798 because all other numbers are reserved for
Cisco use.
sub_system
(Mandatory) Event subtype within the specified
component. The sub_system and type arguments
uniquely identify an application event. Must be an
integer between 1 and 4294967295, inclusive.
type
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1979
event_publish
Summary of Contents for Catalyst 2960 Series
Page 96: ......
Page 196: ......
Page 250: ......
Page 292: ......
Page 488: ......
Page 589: ...P A R T VI Cisco Flexible NetFlow Configuring NetFlow Lite page 509 ...
Page 590: ......
Page 619: ...P A R T VII QoS Configuring QoS page 539 Configuring Auto QoS page 645 ...
Page 620: ......
Page 750: ......
Page 1604: ......
Page 1740: ......
Page 2105: ...P A R T XII Configuring Cisco IOS IP SLAs Configuring Cisco IP SLAs page 2025 ...
Page 2106: ......
Page 2118: ......
Page 2164: ......