hit counter script

Event_Wait - Cisco Catalyst 2960 series Configuration Manual

Consolidated platform configuration guide, ios release 15.2(4)e
Hide thumbs Also See for Catalyst 2960 series:
Table of Contents

Advertisement

event_wait

event_wait
Places the Tcl policy into a sleep state. When the Tcl policy receives a new signal announcing a new event,
the policy is placed into a wake state and again returns to a sleep state. This loop continues. If event_wait
policy is invoked before event_completed policy, an error results and the policy exits.
Syntax
event_wait [refresh_vars]
Arguments
refresh_vars
Result String
None
Set _cerrno
No
Sample Usage
The event_wait event detector returns an array type value with a single element named event_state. Event_state
is a value sent back from the EEM Server indicating whether or not an error has occurred in processing the
event. An example of an error here would be if the user configured event_wait before configuring
event_completion when handling the event instance.
The following sample output shows the use of both event_completion and event_waitTcl commands:
::cisco::eem::event_register_syslog tag e1 occurs 1 pattern CLEAR maxrun 0
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
set i 1
while {1 == 1} {
array set arr_einfo [event_reqinfo]
if {$_cerrno != 0} {
}
action_syslog msg "event $i serviced" priority info
if {$i == 5} {
}
incr i
event_completion status 0
array set _event_state_arr [event_wait refresh_vars 0]
if {$_event_state_arr(event_state) != 0} {
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1982
# Start high performance policy loop
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 "Exiting after servicing 5 events" priority info
exit 0
action_syslog msg "Exiting: failed event_state " \
" $event_state_arr(event_state)" priority info
exit 0
(Optional) Indicates whether built-in and environment
variables should be updated (refreshed) from the EEM
Policy Director during this event instance.

Advertisement

Table of Contents
loading

Table of Contents