Writing Standalone Scripts; Running Tcl Scripts; Running Probe Scripts - Cisco catalyst 6500 series Configuration Note

Content switching module
Hide thumbs Also See for catalyst 6500 series:
Table of Contents

Advertisement

Configuring TCL Scripts
resources to wait while other commands are processing system calls. We do not recommend using the
asynchronous socket for scripted probes unless this is a definite requirement. However, you may use this
command in a standalone system.

Writing Standalone Scripts

There are no special guidelines for developing a standalone script.

Running TCL Scripts

After a script file has been loaded, the scripts in that file exist in the CSM independent of the file from
which that script was loaded. If a script file is subsequently modified, use the script file command to
reload the script file and enable the changes on the CSM. (Refer to the Catalyst 6500 Series Content
Switching Module Command Reference for more information.)
The no script file command removes the script file command from the running configuration. This
command does not unload the scripts in that file and does not affect scripts that are currently running on
the CSM. You cannot unload scripts that have been loaded. If a loaded script is no longer needed, it is
not necessary to remove it; however, do not use it.
In addition to displaying general script information, the code version of the script command (refer to
the Catalyst 6500 Series Content Switching Module Command Reference) displays the actual code
within the script.
One of the key requirements of porting the TCL standard distribution to the CSM is to modify this base
distribution so that multiple vxWorks threads can execute TCL interpreters simultaneously (reentrant
behavior). This facility allows many health scripts and other custom scripts to simultaneously execute in
multiple TCL interpreters.

Running Probe Scripts

A probe script indicates that the relative health and availability of a real server using the exit code of the
script. By calling exit (5000), a script indicates the server successfully responded to the probe. Calling
exit (5001) indicates that the server did not respond correctly to the health probe.
Whenever a script probe is executed on the CSM, a special array called csm_env is passed to the script.
This array holds important parameters that may be used by the script. Refer to
the array parameters.
To run a probe script, you must configure a script probe type and then associate a script name with the
probe object as follows (refer to the Catalyst 6500 Series Content Switching Module Command
Reference) as follows:
Router(config)# probe probe_name script
Router(config-probe-script)# script script_name [command line arguments]
To run a probe script, use this configuration:
Router(config)# script file tftp://192.168.10.102/csmScripts
Router(config)# probe ECHOSCRIPT script
Router(config-probe-script)# script echoProbe.tcl
Router(config-probe-script)# interval 10
Router(config-probe-script)# retries 1
Router(config-probe-script)# failed 30
Catalyst 6500 Series Content Switching Module Configuration Note
10-8
Chapter 10
Configuring CSM Scripts
Table 10-5
for a list of
OL-4612-01

Advertisement

Table of Contents
loading

This manual is also suitable for:

Catalyst 6000 series

Table of Contents