aboutsummaryrefslogtreecommitdiffstats
path: root/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh
blob: d5ff0f7db548f899a46ef267081f1a56d6c64d34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
#
# Usage: ./pingsizes.sh 1440 20 (or greater)
#

PINGDEST=${PINGDEST:-200.200.200.10}
k=$1
lim="$((k+$2))"
((k-=1))
while [ "$k" != "$lim" ] ; do
	echo ping -s $((k+=1))
	ping -i 1000 -c 1 -s $k $PINGDEST &
	sleep 1
	PID=`ps -eaf | grep 'ping -i' | sed 's/[ ][ ]*/ /g' | cut -d " " -f 2`
	if [ -n "$PID" ] ; then
		echo "****************** killing $PID"
        	kill $PID
	fi
done