EasyManua.ls Logo

Cisco 11503 - CSS Content Services Switch

Cisco 11503 - CSS Content Services Switch
392 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
Loading...
8-55
Cisco Content Services Switch Administration Guide
OL-5647-02
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

Table of Contents

Other manuals for Cisco 11503 - CSS Content Services Switch

Related product manuals