EasyManua.ls Logo

Cisco ASR 9000 Serie

Cisco ASR 9000 Serie
378 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
PurposeCommand or Action
Use the auto_mkindex command to create the tclIndex file. The
tclIndex file contains a directory of all the procedures contained in
auto_mkindex directory_name *.tcl
Example:
workstation% auto_mkindex eem_library
*.tcl
Step 3
the Tcl library files. We recommend that you run auto_mkindex
inside a directory, because there can be only a single tclIndex file in
any directory and you may have other Tcl files to be grouped together.
Running auto_mkindex in a directory determines which Tcl source
file or files are indexed using a specific tclIndex.
The following sample TclIndex is created when the lib1.tcl and lib2.tcl
files are in a library file directory and the auto_mkindex command
is run:
tclIndex
# Tcl autoload index file, version 2.0
# This file is generated by the "auto_mkindex" command
# and sourced to set up indexing information for one or
# more commands. Typically each line is a command that
# sets an element in the auto_index array, where the
# element name is the name of a command and the value is
# a script that loads the command.
set auto_index(test1) [list source [file join $dir
lib1.tcl]]
set auto_index(test2) [list source [file join $dir
lib1.tcl]]
set auto_index(test3) [list source [file join $dir
lib2.tcl]]
Copy the Tcl library files from Step 1, on page
75and the tclIndex file from Step 3, on page 76to
Step 4
the directory used for storing user library files on
the target router.
The directory can be the same directory used in Step 4, on page 76.Copy a user-defined EEM policy file written in
Tcl to the directory used for storing user-defined
EEM policies on the target router.
Step 5
The following example user-defined EEM policy can be used to test
the Tcl library support in EEM:
libtest.tcl
::cisco::eem::event_register_none
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
global auto_index auto_path
puts [array names auto_index]
if { [catch {test1} result]} {
puts "calling test1 failed result = $result $auto_path"
}
if { [catch {test2} result]} {
puts "calling test2 failed result = $result $auto_path"
}
if { [catch {test3} result]} {
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
76
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl

Table of Contents

Related product manuals