-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest
More file actions
executable file
·35 lines (32 loc) · 823 Bytes
/
test
File metadata and controls
executable file
·35 lines (32 loc) · 823 Bytes
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
#!/bin/bash
#set -x
s=10
list="$1"
if [[ -z $list ]]
then
list="1 2 4 8 16 32 64 128 256 512"
fi
for i in $list
do
echo "$i: allocating ...."
khalloc="$(khget -x user${i} $i)"
ncount=$(echo "$khalloc" | khdo peripcmd "echo %ip%" | wc -l)
if (( $ncount != $i ))
then
echo "ERROR: $i: did not get the number of nodes expected $ncount != $i"
echo $khalloc
break
fi
echo "$i: booting...."
echo "$khalloc" | khdo write 'setenv eth1 "$p0ip $p0mask" && run kboot'
echo "sleeping for $s"
sleep $s
echo "$i: pinging..."
pcount=$(echo "$khalloc" | khdo peripcmd "if ping -c 1 %ip% >/dev/null 2>&1;then echo good; else echo bad;fi" | grep good | wc -l)
if (( $pcount != $i ))
then
echo "ERROR: $i: was not able to ping all nodes $pcount != $i"
echo $khalloc
break
fi
done