blob: 0b405231fefca54735d14b78db2498679e09e354 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
#!/bin/sh
#
# A program to act as a test harness for the mctest program
#
# $FreeBSD$
#
# Defaults
size=1024
number=100
base=9999
group="239.255.255.101"
interface="cxgb0"
remote="ssh"
command="/zoo/tank/users/gnn/svn/Projects/head-exar/src/tools/tools/mctest/mctest"
gap=1000
# Arguments are s (size), g (group), n (number), and c (command) followed
# by a set of hostnames.
args=`getopt s:g:n:c:l:f:b: $*`
if [ $? != 0 ]
then
echo 'Usage: mctest_run -l local_interface -f foreign_interface -s size -g group -n number -c remote command host1 host2 hostN'
exit 2
fi
set == $args
count=0
for i
do
case "$i"
in
-s)
size=$3;
shift 2;;
-n)
number=$3;
shift 2;;
-g)
group=$3;
shift 2;;
-c)
command=$3;
shift 2;;
-l)
local_interface=$3;
shift 2;;
-f)
foreign_interface=$3;
shift 2;;
-b)
base=$3;
shift 2;;
--)
shift; break;;
esac
done
#
# Start our remote sink/reflectors
#
shift;
current=0
now=`date "+%Y%m%d%H%M"`
for host in $*
do
output=$host\_$interface\_$size\_$number\.$now
$remote $host $command -r -M $# -b $base -g $group -m $current -n $number -s $size -i $foreign_interface > $output &
sleep 1
current=`expr $current + 1 `;
done
#
# Start the source/collector on this machine
#
$command -M $# -b $base -g $group -n $number -s $size -i $local_interface -t $gap > `uname -n`\_$size\_$number\.$now
|