lb-l1.sh
********
-Script for testing of LB services
+Script for level 1 testing of LB server
* Prerequisities:
- - All services running (user does not have to get any credentials)
+ - LB server running (user does not have to get any credentials)
- the following environment variables set:
- GLITE_WMS_LOG_DESTINATION - address of local logger, in form 'host:port'
- GLITE_WMS_QUERY_SERVER - address of LB server, in form 'host:port'
+ GLITE_LOCATION - PATH to gLite software
+ SAME_SENSOR_HOME - PATH to sensors (might be set to "." for testSocket sensor)
+ GLITE_LB_SERVER_PORT - if nondefault port (9000) used
* Basic test:
- PING
- check LB binaries
- check running services
+ ping_host() - basic network ping
+ check_binaries() - check for binary executables, calls check_exec()
+ check_socket() - TCPecho to host:port for all three LB server ports
+ (by default 9000 for logging, 9001 for querying, 9003 for web services)
Usage: lb-l1.sh [OPTIONS] host
Options:
-c | --color Format output as text with ANSI colours (autodetected by default).
-x | --html Format output as html.
-* The name of the bkserver host has to be specified everytime
+* The name of the LB server host has to be specified everytime
Examples
# ------------------------------------------------------------------------------
# Definitions of functions and variables common to LB test scripts
#
-# ping_host()
-# check_exec()
-# check_binaries()
+# ping_host() - basic network ping
+# check_binaries() - check for binary executables, calls check_exec()
+# check_socket() - TCPecho to host:port
#
# ------------------------------------------------------------------------------
return $TEST_ERROR
fi
}
-
-# check the services
-function check_services()
-{
- # if run on the same machine, we can check for example
- # netstat -an --inet | grep "^tcp .* 0.0.0.0:9000 .*LISTEN"
- echo "${newline:-}Listening to locallogger port (9002)" >> $logfile
- $TEST_SOCKET $LB_HOST 9002 >> $logfile
- if [ $? -eq 0 ]; then
- echo "${newline:-}logd running ? - [OK]" >> $logfile
- else
- echo "${newline:-}logd running ? - [FAILED]" >> $logfile
- exit $TEST_ERROR
- fi
- echo "${newline:-}Listening to LB server ports (9000-9001)${linebreak:-}" >> $logfile
- $TEST_SOCKET $LB_HOST 9000 >> $logfile &&
- $TEST_SOCKET $LB_HOST 9001 >> $logfile
- if [ $? -eq 0 ]; then
- echo "${newline:-}LB server running ? - [OK]" >> $logfile
- else
- echo "${newline:-}LB server running ? - [FAILED]" >> $logfile
- exit $TEST_ERROR
- fi
- echo "${newline:-}Listening to LB server WS port (9003)${linebreak:-}" >> $logfile
- $TEST_SOCKET $LB_HOST 9003 >> $logfile
- if [ $? -eq 0 ]; then
- echo "${newline:-}LB server running with WS ? - [OK]" >> $logfile
- else
- echo "${newline:-}LB server running with WS ? - [FAILED]" >> $logfile
- exit $TEST_ERROR
- fi
-}
-