![Cisco ASR 9000 Serie Configuration Manuals Download Page 91](http://html.mh-extra.com/html/cisco/asr-9000-serie/asr-9000-serie_configuration-manuals_66679091.webp)
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
Step 1, on page 75
and the tclIndex file from
Step 3, on page 76
to the
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
Purpose
Command or Action
The following example files can be used to create a tclIndex on a
workstation running the Tcl shell:
On your workstation (UNIX, Linux, PC, or Mac)
create a library directory and copy the Tcl library
files into the directory.
Step 1
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.
tclsh
Example:
workstation% tclsh
Step 2
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
75
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl