Choose a directory to install the test scripts. On dev, the directory is /ldas_usr/ldas/test/datasock. The required files are:
Makefiledatasock_driver.tcl
datasock_tester.tcl
datasock_test.tcl
datasock_stats.tcl
datasock_hostfile
rundatasock.tcl
fmt_times.tcl
LDASapi.rsc
elementilwd.cc
elementilwd.tcl
hostfile_tclchannel- editable configuration file which specifies which hosts are to be tested, and the data sizes and types that are to be sent
Make sure all the .tcl files have execute permission. Each host included in the test must have the test scripts installed on the system. The path to the scripts must be the same on every host. The most convenient way to accomplish this is to place the scripts on one host, and have that directory NFS mounted to the same path on the rest of the hosts. The directory where the scripts are found can be passed to the driver script as an argument, or it can be specified in the configuration file. See the following sections for more information. The default directory is /ldas_usr/ldas/test/datasock.
Environment variable SSH_AUTH_SOCK is required to allow execution of scripts on different machines to retrieve logs. To set this, on the ldas gateway, find out the name of the ldas agent by running the ldas utility ldasagent. Then setenv SSH_AUTH_SOCK to the output of ldasagent if an agent exists. Example:
ldasagent > /tmp/ssh-vWcN7555/agent.7555 setenv SSH_AUTH_SOCK /tmp/ssh-vWcN7555/agent.7555Then verify that the ssh environment variable setting works by ssh-ing into a server; you should be able to do so without entering a password.
To create the ILWD files necessary for the test, create a subdirectory ilwd. Move the files elementilwd.cc, elementilwd.tcl, and Makefile into the ilwd subdirectory. Compile the elementilwd utility by typing make elementilwd at the command prompt. Generate ILWD files by typing elementilwd.tcl binary at the command line. This will create a subdirectory binary containing binary ILWD files. If you want ascii ILWD files, type elementilwd.tcl ascii at the command prompt. See the following section about how to specify which ILWD files are to be used during the test.
The configuration file is a list of directives to the driver script. The driver script performs each directive in sequential order, and completes each directive before moving on to the next. Most of the directives are in the form of assignments, assigning a value to a variable. The following is a list of valid directives:
samples=<number>
| Number of samples sent and received for each type/dim pair before averaging the results. (Default: 10) |
ilwdfmt=<binary|ascii>
| ILWD data format. Valid values: binary, ascii (Default: ascii) |
testdir=<dirname>
| Test directory. Directory where script files are installed. (Default: /ldas_usr/ldas/test/datasock) |
thread=<0|1>
| Use threaded or unthreaded calls. Valid values: 0, 1 (Default: 0) |
withcont=<0|1>
| With or without ILWD container. Valid values: 0, 1 (Default: 1) |
types=<all|types_list>
| ILWD types. Valid values: all, char_s, char_u, int_2s, int_2u, int_4s, int_4u, int_8s, int_8u, real_4, real_8, lstring_2, lstring_4, lstring_8, lstring_16, complex_8, complex_16 (Default: all)
The value "all" specifies all types. If including multiple types, separate them with commas only. |
dims=<all|dims_list>
| ILWD dimensions. Valid values: all, 1, 10, 100, 1000, 10000, 100000, 1000000 (Default: all)
The value "all" specifies all dims except for 1000000. If including multiple types, seperate them with commas only. |
client=<computer_name>
| Name of client computer which initiates the communication with the server. |
server=<computer_name>
| Name of server computer which receives the data from the client and sends it back. |
refresh
| Directs the driver script to stop the test scripts on all previous client and server computers. The test scripts will be started again the next time the computer name is assigned to the client or server variables. |
start <computer_list>
| Directs the driver script to restart the test scripts on the specified computers. |
There must not be any spaces surrounding the equal (=) sign of the assignments. The client= and server= assignments must appear on the same line (separated by spaces). All the other assignments can appear one or many per line, separated by spaces. All assignments remain in effect until it is reassigned. If a line starts with a hash (#), the rest of the line is treated as a comment. When the driver script reaches a line with client= and server= assignments, it starts the communication test between the two specified computers. The assignments that were specified before define the type of test between the two computers.
The datasock_hostfile file is a sample configuration file that includes tests for all types and dims, with and without container, and with and without threaded calls. The client and server computer names are specific to our network. They represent Linux and Solaris machines used to test the different combinations of communication: Linux-to-Solaris, Linux-to-Linux, Solaris-to-Solaris, and loopback tests for Linux and Solaris. Modify the vaules to match your network setup.
Usage: datasock_driver.tcl host_file [-ab] [-d dir]
Type To monitor progress,
Usage: The result files can be formatted into HTML and text reports, displaying tables of the result data. To format the results, at the command prompt type The formatting script will produce three types of files for each client-server pair: .log, .txt, and .html. The .log files are concatenations of result files with the same client-server pair. The .log files are needed for comparing results with a previous run, described in the next section. The .html files contain tables of the results in HTML format. The .txt files contain tables of the results in text format.
Usage: At the command prompt, type Currently the datasock_driver.tcl script automatically compares the statistical comparison of current results with those of the 3 past releases. The output file overall.stats is moved
into subdirectories 100, 110 and 120 for releases 1.0.0, 1.1.0 and 1.2.0 comparisions.
datasock_driver.tcl datasock_hostfile. This will start the data-socket communication between the hosts specified in the configuration file. Log files are written to the logs directory. Status messages from the driver script are printed to the terminal. Results from the tests are written to files in a results directory. The name of the result directory is called results-MMDD, where MMDD is the month and day of the date the test was run. If the test runs through midnight, the result files will be split between two result directories. The result file names have the format client_server_. tail -f driver.log
Test Validation
fmt_times.tcl [files]
../fmt_times.tcl * in the results directory. Make sure all the result files for the particular test run are in one results-MMDD directory. The formatting script will complain if any types or dims are missing for a client-server pair. This can indicate that one of the tests did not succeed. It may also indicate that a result file is missing and is actually residing in another directory. This can happen if the tests ran through midnight.
datasock_stats.tcl Current_files Previous_directory [-o]
datasock_stats.tcl *.log ../results-MMDD (replace MMDD with the date you want to compare to). There must be corresponding .log files in the results directory you want to compare to. The stats script will produce a .stats file for each client-server pair. Each .stats file contains the statistics of the result differences between the two test runs. If the -o option is specified, an overall.stats file is written which contains the statistics over all client-server pairs.