Cisco catalyst 6500 series Configuration Note page 122

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

Advertisement

Configuring TCL Scripts
Exit Codes
The CSM uses exit codes to signify various internal conditions. The exit code information can help you
troubleshoot your scripts if they do not operate correctly. You can only use the exit 5000 and exit 5001
exit codes.
The TCL script may stop operating for these reasons:
Table 10-4
Table 10-4 CSM Exit Codes
Exit Code
5000
5001
4000
4001
4002
4003
unknown
This example shows how to use the EXIT_MSG variable to track script exit points to detect why a script
is not working:
set EXIT_MSG "opening socket"
set s [socket 10.2.0.12 80]
set EXIT_MSG "writing to socket"
puts -nonewline $sock $url
Use the show module csm slot tech script command to check the EXIT_MSG variable.
Use the errorInfo and errorCode variables that are automatically set by the TCL core to determine why
an error occurred. TCL stores internal error information using the errorInfo variable whenever a script
task is aborted. Syntax errors, for example, panic, will set these variables with the appropriate
information, which you can use to troubleshoot the error.
Environment Variable
Health scripts have access to many configured items through a predefined TCL array. The most common
use of this array is to find the current real server IP addresses of the suspect during any particular launch
of the script.
Catalyst 6500 Series Content Switching Module Configuration Note
10-6
Syntax errors—Occurs when there is no change in the state of the suspected improper syntax. The
syntax error is a stored script control object and can be viewed using the show mod csm X tech
script command. A suspect will be denied.
A stopped script—Caused by an infinite loop or caused when the script attempts to connect to an
invalid IP address. Each script must complete its task within the configured time interval. If the
script does not complete its task, then the script controller terminates the script and the suspect will
be failed implicitly.
Error conditions—Occurs when a connection timeout or a peer refused connection is also treated as
an implicit failure.
shows all exit codes used in the CSM.
Meaning and Operational Effect on the Suspect
Suspect is healthy. Controlled by user.
Suspect has failed. Controlled by user.
Script is aborted. The state change is dependent on other system status at that time.
Reserved for system use.
Script is terminated. Suspect is failed. Reserved for system use.
Script panicked. Suspect is failed. Reserved for system use.
Script has failed an internal operation or system call. Suspect is failed. Reserved for system
use.
No change.
Table 10-5
lists the members of the csm_env array.
Chapter 10
Configuring CSM Scripts
OL-4612-01

Advertisement

Table of Contents
loading

This manual is also suitable for:

Catalyst 6000 series

Table of Contents