Porting the SLAC IEPM-BW Version 2 Code
Connie Logg, Les Cottrell, and
Jerrod Williams
Please send comments on this writeup to Jerrod
2/28/03
Monitoring Host - ($mh) The node that the tests are running from
Target Node - ($tn) A node that the tests are running to
Probe - ($prb) A script which runs a measurement from a $mh to a $tn and returns the results.
Monitoring Node Configuration File - ($mncf) - The configuration file
which specifies the directories for the source code and data & analysis, the
various paths for the binaries required by the code, and other $mn specific
definitions.
Alias File - ($ALIASFILE) - The file which contains the specifications
for each of the destination nodes in the SLAC format.
Perl and perl modules:
Date::Calc qw(Add_Delta_Days Delta_Days) and includes the file Date/Calc.pm.
Date::Manip qw(ParseDate UnixDate DateCalc) and includes the file Date/Manip.pm.
Time::localtime
Sys::Hostname
getopts.pl
getopt.pl
IO::Handle
Proc::ProcessTable
SOAP::Lite
A Sample Monitoring Host Configuration File is available.
Note that ALL parameters not under optional, must be defined. This file must be created and saved with the naming convention [monitoring host name].cfg, before porting the IEPM-BWtests code.
"make-kit" has been developed to facilitate the loading of necessary code on the new monitoring node.
This script is run from a slac node upon request and takes only a few minutes to execute.
"make-kit" reads the monitoring node's configuration file and creates a tar file containing all source
files needed for loading onto the monitoring host. Also created is an HTML file, unique to each new monitoring host, that is accessed to explain how to obtain and de-tar the file for use. For your convience, the HTML file includes links to sites that provide the sources for BBCP, IPERF, and BBFTP. It will be up to the user to obtain those packages himself and create them on his host. The URL for your particular site follows the convention http://www.slac.stanford.edu/comp/net/bw-html/distribution/[monitoring host name].html. If this URL does not work after you have received confirmation that it should be up, please contact Jerrod Williams.
Notes:
- "make-kit" changes the perl command in all perl scripts to match that specified in $PERLTOOL in the new monitoring host configuration file
- Not all files are exported. Only those specifically needed to run the tests. All files exported are
documented in the Program Logic Manual.
The Program Logic Manual gives a brief descriptions of the scripts needed to run the tests, analyze code performance, and perform analysis of the results.
CONVENTIONS: files ending in ".pl" are code fragments and samples of how to do certain manipulations
such as dates.
Please refer to the PLM to understand what each script does and how they relate to one another.
Included in the download from step 2 is you own starter ALIASFILE located in $SRCDIR/toolkit. We've provided you with an intitial node at slac to perform tests but it will be up to you, the Admin at the new monitoring site, to acquire and setup your own pool of sites to monitor.
Please reference our documentation for setting up the
remote nodes. If you have any questions on setting up remote nodes, please contact Jerrod Williams or Les Cottrell.
The $ALIASFILE specification contains several parameters, many of which are SLAC specific.
A Sample Destination Node Configuration File is available.
run-bw-tests has the following calling sequence:
run-bw-tests -n [nodename] -c $mncf -s [SRCDIR] -t "[list of tests]" [-w1] -D [0|1|2]
-n is the specific destination node to test. If not provided, all nodes are tested.
-t is the list of tests
-w n This is for web100 invocation, which is currently under development. The number is provided for future expansion to faciliate specifying various levels of web100 variable dumping.
-c fully qualified filename - is the fully qualified MHCF. If the environment variable 'BW_CFG' is defined to be this name, it is not necessary to provide it via '-c'.
-s 'fully qualified directory specification' - is the source code directory. If the environment variable 'BW_SRC' is defined to be this name, it is not necessary to provide it via '-s'.
-D n - This is the debug flag and is particularly important for run-bw-tests when running it from the command line. '-D 0' indicates that the measurements are to be run, but that no data is to be written to the data files, only the terminal. '-D 1' indicates that the measurements are to be run and the data is to be written to the data files, and not the terminal. '-D 2' indicates that the measurements are to be run and the data is to be written to the data files, and the terminal. If called from a crontab, '-D 2' can be used in production, and the output will be printed to STDOUT.
[list of tests] is currently iperf, bbcpmem, bbcpdisk, bbftp, ping, and trace
For example: to run through all your nodes from the command line for all tests:
run-bw-tests -c $mncf -s [SRCDIR] -t "iperf,bbcpdisk,bbcpmem,bbftp"
To run just iperf for one node:
run-bw-tests -n $dn -c $mncf -s [SRCDIR] -t "iperf"
To run ping and traceroute to just two nodes:
run-bw-tests -n "$dn1,$dn2" -c $mncf -s [SRCDIR] -t "ping,trace"
If the $mncf file is specified by the environment variable "BW_CFG", -c does not need to be provided.
For running from the command line, -n and -D 0 must always be provided. This causes all results to be written to the terminal and not the raw data log file.
Individual tests can also be run by calling do_[test]. [test] contains either ping, trace, iperf, bbcpdisk, bbcpmem, or bbftp. do_[test] is called by run-bw-tests but, we find it's easier to debug specific problems by running the specfic tests this way.
do_[test] has the following calling sequence:
do_test -n [nodename] **NOTE: Environment variables BW_CFG and BW_SRC must be defined.
Options are defined above.
Notes:
- Always start by running the tests from the command line. It is best to start by only specifying one node with the -n command.
Get this running first.
- When running from the command line, the exact commands issued by the code are printed on the terminal.
The location is always the same for each type of test (but not in red). You can cut and paste the command (indicated in red below)
onto your command line and issue it. This can be very handy for debugging. I have substituted the string "nodename" in this writeup for the
actual node name, which would normally appear.
For example:
#IPERF(06/03/2002 00:27:45 1023089265) - START
#IPERF(06/03/2002 00:27:45 1023089265) - CMD - /afs/slac/package/scsutils/bin.@sys/iperf -c nodename.CACR.CALTECH.EDU -p 5000 -w 256k -P 8 -i 60
-f kK -t 10 2>&1
#IPERF(06/03/2002 00:27:55 1023089275) - epoch = 1023089275, bbcp & bbftp file sizes (matching 390464 KB out of 22)= 81920000
#IPERF(06/03/2002 00:27:55 1023089275) - ------------------------------------------------------------
#IPERF(06/03/2002 00:27:55 1023089275) - Client connecting to nodename.CACR.CALTECH.EDU, TCP port 5000
#IPERF(06/03/2002 00:27:55 1023089275) - TCP window size: 512 KByte (WARNING: requested 256 KByte)
#IPERF(06/03/2002 00:27:55 1023089275) - ------------------------------------------------------------
#IPERF(06/03/2002 00:27:55 1023089275) - [ 12] local 134.79.240.12 port 39465 connected with 131.215.144.226 port 5000
#IPERF(06/03/2002 00:27:55 1023089275) - [ 3] local 134.79.240.12 port 39458 connected with 131.215.144.226 port 5000
#IPERF(06/03/2002 00:27:55 1023089275) - [ 6] local 134.79.240.12 port 39459 connected with 131.215.144.226 port 5000
#IPERF(06/03/2002 00:27:55 1023089275) - [ 9] local 134.79.240.12 port 39462 connected with 131.215.144.226 port 5000
#IPERF(06/03/2002 00:27:55 1023089275) - [ 7] local 134.79.240.12 port 39460 connected with 131.215.144.226 port 5000
#IPERF(06/03/2002 00:27:55 1023089275) - [ 8] local 134.79.240.12 port 39461 connected with 131.215.144.226 port 5000
#IPERF(06/03/2002 00:27:55 1023089275) - [ 10] local 134.79.240.12 port 39463 connected with 131.215.144.226 port 5000
#IPERF(06/03/2002 00:27:55 1023089275) - [ 11] local 134.79.240.12 port 39464 connected with 131.215.144.226 port 5000
#IPERF(06/03/2002 00:27:55 1023089275) - [ ID] Interval Transfer Bandwidth
#IPERF(06/03/2002 00:27:55 1023089275) - [ 8] 0.0-10.0 sec 42240 KBytes 34496 Kbits/sec
#IPERF(06/03/2002 00:27:55 1023089275) - [ 9] 0.0-10.1 sec 53168 KBytes 43321 Kbits/sec
#IPERF(06/03/2002 00:27:55 1023089275) - [ 7] 0.0-10.1 sec 45472 KBytes 37064 Kbits/sec
#IPERF(06/03/2002 00:27:55 1023089275) - [ 10] 0.0-10.0 sec 46704 KBytes 38073 Kbits/sec
#IPERF(06/03/2002 00:27:55 1023089275) - [ 11] 0.0-10.1 sec 44744 KBytes 36454 Kbits/sec
#IPERF(06/03/2002 00:27:55 1023089275) - [ 12] 0.0-10.1 sec 63888 KBytes 51805 Kbits/sec
#IPERF(06/03/2002 00:27:55 1023089275) - [ 6] 0.0-10.1 sec 49144 KBytes 39854 Kbits/sec
#IPERF(06/03/2002 00:27:55 1023089275) - [ 3] 0.0-10.1 sec 45104 KBytes 36485 Kbits/sec
#IPERF(06/03/2002 00:27:55 1023089275) - SUMMARY: sumband = 317552 kbits/sec; sumbytes = 390464 KB;
#IPERF(06/03/2002 00:27:55 1023089275) - SUMMARY: minband = 34496 kbits/sec; maxband = 51805 kb/sec; avgband = 39694 kb/sec;
#IPERF(06/03/2002 00:27:55 1023089275) - SUMMARY: minbytes = 42240 KB; maxbytes = 63888 KB; avgbytes = 48808 KB
#IPERF(06/03/2002 00:27:55 1023089275) - SUMMARY: streams = 8, winsize = 256k
#IPERF(06/03/2002 00:27:55 1023089275) - DONE
- Figure out what mechanism you are going to use to run the tests.
More than likely, this will be some type of cron daemon. The cron daemon should be modeled after our crontab sample.
- The post processing code is called at the end of the run by run-bw-tests when it is run in production mode.
- Crontabs/Scheduled tests should include the following:
- $SRCDIR/run-bw-tests -c [$mncf] -s [$SRCDIR]
- $SRCDIR/overnight-processing-script -c [$mncf] -s [$SRCDIR]
- $SRCDIR/bw-cleanup -c [$mncf] -s [$SRCDIR]
Please provide Feedback to the Designing Author: Jerrod Williams