Cisco 11503 Administration Guide - Page 323
Finger Keepalive
UPC - 746320664958
View all Cisco 11503 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 323 highlights
Chapter 8 Using the CSS Scripting Language Script Keepalive Examples Finger Keepalive !no echo Filename: ap-kal-finger ! Parameters: HostName UserName ! ! Description: ! This script will connect to the finger server on the remote ! host. It will query for the UserName and receive the ! information back. ! ! Failure Upon: ! 1. Not establishing a connection with the host. ! 2. Not being able to send/receive data to the host if ${ARGS}[#] "NEQ" "2" echo "Usage: ap-kal-finger \'Hostname UserName\'" exit script 1 endbranch ! Defines: set HostName "${ARGS}[1]" set UserName "${ARGS}[2]" set EXIT_MSG "Connection Failed" ! Connect to the remote host (use default timeout) socket connect host ${HostName} port 79 tcp set EXIT_MSG "Send: Failed" ! Send the username to "finger" socket send ${SOCKET} "${UserName}\n" set EXIT_MSG "Waitfor: Failed" ! Wait for data for 100ms (default) socket waitfor ${SOCKET} "${UserName}" no set EXIT_MSG ! If the data came in, then we are good to quit socket disconnect ${SOCKET} no set EXIT_MSG exit script 0 OL-5647-02 Cisco Content Services Switch Administration Guide 8-55