![Cisco ASR 9000 Serie Configuration Manuals Download Page 108](http://html.mh-extra.com/html/cisco/asr-9000-serie/asr-9000-serie_configuration-manuals_66679108.webp)
Tracing Tcl set Command Operations: Example
Tcl is a flexible language. One of the flexible aspects of Tcl is that you can override commands. In this
example, the Tcl
set
command is renamed as _set, and a new version of the
set
command is created that
displays a message containing the text "setting" and appends the scalar variable that is being set. This example
can be used to trace all instances of scalar variables being set.
rename set _set
proc set {var args} {
puts [list setting $var $args]
uplevel _set $var $args
};
When this is placed in a policy, a message is displayed anytime a scalar variable is set,
for example:
02:17:58: sl_intf_down.tcl[0]: setting test_var 1
Additional References
The following sections provide references related to configuring and managing Embedded Event Manager
policies.
Related Documents
Document Title
Related Topic
Embedded Event Manager Commands
module in the
Cisco ASR 9000 Series Aggregation Services Router
System Monitoring Command Reference
Embedded Event Manager commands
Hardware Redundancy and Node Administration
Commands module in the
Cisco ASR 9000 Series
Aggregation Services Router Interface and Hardware
Component Command Reference
Route processor failover commands
Cisco IOS XR XML API Guide
Cisco IOS XR XML API material
Cisco ASR 9000 Series Aggregation Services Router
Getting Started Guide
Cisco IOS XR getting started material
Configuring AAA Services
module in the
Cisco ASR 9000 Series Aggregation Services Router
System Security Configuration Guide
Information about user groups and task IDs
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
92
Configuring and Managing Embedded Event Manager Policies
Tracing Tcl set Command Operations: Example