Tracing Tcl Set Command Operations: Example; Additional References - Cisco ASR 9000 Serie Configuration Manuals

Aggregation services router system
Table of Contents

Advertisement

Tracing Tcl set Command Operations: Example

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
Related Topic
Embedded Event Manager commands
Route processor failover commands
Cisco IOS XR XML API material
Cisco IOS XR getting started material
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
Document Title
Embedded Event Manager Commands module in the
Cisco ASR 9000 Series Aggregation Services Router
System Monitoring Command Reference
Hardware Redundancy and Node Administration
Commands module in the Cisco ASR 9000 Series
Aggregation Services Router Interface and Hardware
Component Command Reference
Cisco IOS XR XML API Guide
Cisco ASR 9000 Series Aggregation Services Router
Getting Started Guide
Configuring AAA Services module in the
Cisco ASR 9000 Series Aggregation Services Router
System Security Configuration Guide

Advertisement

Table of Contents
loading

Table of Contents