EasyManuals Logo

Cisco 11503 - CSS Content Services Switch User Manual

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
Page #324 background image
Chapter 8 Using the CSS Scripting Language
Script Keepalive Examples
8-56
Cisco Content Services Switch Administration Guide
OL-5647-02
Time Keepalive
!no echo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Filename: ap-kal-time
! Parameters: HostName
!
! Description:
! This script will connect to a remote host 'time' service on
! port 37 and get the current time. This script currently works
! strictly with TCP. [Ref. RFC-868]
!
! Failure Upon:
! 1. Not establishing a connection with the host.
! 2. Not being able to receive incoming data
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Make sure the user has a qualified number of arguments
if ${ARGS}[#] “NEQ” “1”
echo “Usage: ap-kal-time \'Hostname\'”
exit script 1
endbranch
! Defines:
set HostName “${ARGS}[1]”
set EXIT_MSG “Connection Failed”
! Connect to the remote host (use default timeout)
socket connect host ${HostName} port 37 tcp 2000
set EXIT_MSG “Receive: Failed”
! waitfor any data for 2000ms
socket waitfor ${SOCKET} anything 2000
! 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

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Cisco 11503 - CSS Content Services Switch and is the answer not in the manual?

Cisco 11503 - CSS Content Services Switch Specifications

General IconGeneral
BrandCisco
Model11503 - CSS Content Services Switch
CategorySwitch
LanguageEnglish

Related product manuals