EasyManuals Logo

Cisco Catalyst 6500 Series Configuration Note

Cisco Catalyst 6500 Series
212 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
Page #122 background imageLoading...
Page #122 background image
10-6
Catalyst 6500 Series Content Switching Module Configuration Note
OL-4612-01
Chapter 10 Configuring CSM Scripts
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:
• 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.
Table 10-4 shows all exit codes used in the CSM.
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. Table 10-5 lists the members of the csm_env array.
Table 10-4 CSM Exit Codes
Exit Code Meaning and Operational Effect on the Suspect
5000 Suspect is healthy. Controlled by user.
5001 Suspect has failed. Controlled by user.
4000 Script is aborted. The state change is dependent on other system status at that time.
Reserved for system use.
4001 Script is terminated. Suspect is failed. Reserved for system use.
4002 Script panicked. Suspect is failed. Reserved for system use.
4003 Script has failed an internal operation or system call. Suspect is failed. Reserved for system
use.
unknown No change.

Table of Contents

Other manuals for Cisco Catalyst 6500 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Cisco Catalyst 6500 Series and is the answer not in the manual?

Cisco Catalyst 6500 Series Specifications

General IconGeneral
BrandCisco
ModelCatalyst 6500 Series
CategorySwitch
LanguageEnglish

Related product manuals