Cisco ASR 9000 Serie Configuration Manuals page 91

Aggregation services router system
Table of Contents

Advertisement

Configuring and Managing Embedded Event Manager Policies
contains a directory of all the procedures in the library files. If the index is not created, the Tcl procedures are
not found when an EEM policy that references a Tcl procedure is run.
SUMMARY STEPS
1. On your workstation (UNIX, Linux, PC, or Mac) create a library directory and copy the Tcl library files
into the directory.
2. tclsh
3. auto_mkindex directory_name *.tcl
4. Copy the Tcl library files from
directory used for storing user library files on the target router.
5. Copy a user-defined EEM policy file written in Tcl to the directory used for storing user-defined EEM
policies on the target router.
6. configure
7. event manager directory user library path
8. event manager directory user policy path
9. event manager policy policy-name username username [persist-time [seconds | infinite] | type [system
| user]]
10. event manager run policy [argument]
11. commit
DETAILED STEPS
Command or Action
Step 1
On your workstation (UNIX, Linux, PC, or Mac)
create a library directory and copy the Tcl library
files into the directory.
Step 2
tclsh
Example:
workstation% tclsh
Step 1, on page
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
How to Write Embedded Event Manager Policies Using Tcl
75and the tclIndex file from
Purpose
The following example files can be used to create a tclIndex on a
workstation running the Tcl shell:
lib1.tcl
proc test1 {} {
puts "In procedure test1"
}
proc test2 {} {
puts "In procedure test2"
}
lib2.tcl
proc test3 {} {
puts "In procedure test3"
}
Enters the Tcl shell.
Step 3, on page
76to the
75

Advertisement

Table of Contents
loading

Table of Contents