Cisco ASR 9000 Serie Configuration Manuals page 162

Aggregation services router system
Table of Contents

Advertisement

Embedded Event Manager Event Publish Tcl Command Extension
Arguments
sub_system
type
[arg1 ?]-[arg4 ?]
Result String
None
Set _cerrno
Yes
(_cerr_sub_err =
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
Sample Usage
This example demonstrates how to use the event_publish appl Tcl command extension to execute a script n
times repeatedly to perform some function (for example, to measure the amount of CPU time taken by a given
group of Tcl statements). This example uses two Tcl scripts.
Script1 publishes a type 9999 EEM event to cause Script2 to run for the first time. Script1 is registered as a
none event and is run using the Cisco IOS XR software CLI event manager run command. Script2 is registered
as an EEM application event of type 9999, and this script checks to see if the application publish arg1 data
(the iteration number) exceeds the EEM environment variable test_iterations value. If the test_iterations value
is exceeded, the script writes a message and exits; otherwise the script executes the remaining statements and
reschedules another run. To measure the CPU utilization for Script2, use a value of test_iterations that is a
multiple of 10 to calculate the amount of average CPU time used by Script2.
To run the Tcl scripts, enter the following Cisco IOS XR software commands:
configure terminal
event manager environment test_iterations 100
event manager policy script1.tcl
event manager policy script2.tcl
end
event manager run script1.tcl
The Tcl script Script2 is executed 100 times. If you execute the script without the extra processing and derive
the average CPU utilization, and then add the extra processing and repeat the test, you can subtract the former
CPU utilization from the later CPU utilization to determine the average for the extra processing.
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
146
2)
FH_ESYSERR
(generic/unknown error from OS/system)
Configuring and Managing Embedded Event Manager Policies
(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.
(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.
(Optional) Four pieces of application event publisher
string data.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents