Cisco 11503 Administration Guide - Page 313
Script Keepalive Examples, Example of a Custom TCP Script Keepalive with Graceful Socket Close (FIN)
UPC - 746320664958
View all Cisco 11503 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 313 highlights
Chapter 8 Using the CSS Scripting Language Script Keepalive Examples Script Keepalive Examples The CSS provides scripted keepalives to support the need for keepalives operations that cannot be handled using non-scripted keepalives. We recommend that you limit I/O operations in a scripted keepalive to socket operations used to probe network connectivity to a server and for determining application health on a server. Although the scripting language supports file I/O on the CSS hard drive or flash drive, we recommend that you do not use file I/O operations within scripted keepalives. Extensive file I/O operations within scripted keepalives may cause services to transition. File system access is allowed in scripts executed from the CLI or from the command scheduler. The following sections provide examples of script keepalives. You can use them as is or modify them for your applications. Example of a Custom TCP Script Keepalive with Graceful Socket Close (FIN) Use the following script keepalive to open and gracefully close (using a FIN rather than a RST) a socket on user-specified TCP ports. Note The service mode keepalive tcp-close fin command or global keepalive mode tcp-close fin command also gracefully closes (using a FIN rather than a RST) a socket. !no echo Filename: ap-kal-tcp-ports ! Parameters: Service Address, TCP Port(s) ! !Description: ! This script will open and close a socket on the user specified ! ports. ! The close will be a FIN rather than a RST. If one of the ports fails ! the service will be declared down ! ! Failure Upon: ! Not establishing a connection with the host on one of the specified ! ports. OL-5647-02 Cisco Content Services Switch Administration Guide 8-45