summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh')
-rwxr-xr-xrecipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh
new file mode 100755
index 0000000..d5ff0f7
--- /dev/null
+++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh
@@ -0,0 +1,19 @@
1#!/bin/bash
2#
3# Usage: ./pingsizes.sh 1440 20 (or greater)
4#
5
6PINGDEST=${PINGDEST:-200.200.200.10}
7k=$1
8lim="$((k+$2))"
9((k-=1))
10while [ "$k" != "$lim" ] ; do
11 echo ping -s $((k+=1))
12 ping -i 1000 -c 1 -s $k $PINGDEST &
13 sleep 1
14 PID=`ps -eaf | grep 'ping -i' | sed 's/[ ][ ]*/ /g' | cut -d " " -f 2`
15 if [ -n "$PID" ] ; then
16 echo "****************** killing $PID"
17 kill $PID
18 fi
19done