diff options
author | Constantin Jucovschi <cj@ubuntu.localdomain> | 2009-04-24 07:20:22 -0400 |
---|---|---|
committer | Constantin Jucovschi <cj@ubuntu.localdomain> | 2009-04-24 07:20:22 -0400 |
commit | 8f27e65bddd7d4b8515ce620fb485fdd78fcdf89 (patch) | |
tree | bd328a4dd4f92d32202241b5e3a7f36177792c5f /rasmgr/test/check_opensockets.sh | |
download | rasdaman-upstream-8f27e65bddd7d4b8515ce620fb485fdd78fcdf89.tar.gz rasdaman-upstream-8f27e65bddd7d4b8515ce620fb485fdd78fcdf89.tar.xz rasdaman-upstream-8f27e65bddd7d4b8515ce620fb485fdd78fcdf89.zip |
Initial commitv8.0
Diffstat (limited to 'rasmgr/test/check_opensockets.sh')
-rw-r--r-- | rasmgr/test/check_opensockets.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/rasmgr/test/check_opensockets.sh b/rasmgr/test/check_opensockets.sh new file mode 100644 index 0000000..7ec3ab2 --- /dev/null +++ b/rasmgr/test/check_opensockets.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# check_opensockets.sh: periodically check the number of waiting sockets in the local system +# parameters: +# $1 sleep time between checks + +export SLEEPTIME=$1 + +if test "$1" == "" +then + echo usage: $0 sleepseconds + exit +fi + +echo "$0: start checking for open (waiting) sockets, in intervals of $SLEEPTIME seconds." + +while echo \--- check time: `date` \---------------- +do + netstat -na | grep WAIT + echo summary: `netstat -na | grep WAIT | wc -l` TIME_WAIT state sockets. + sleep $SLEEPTIME +done + +echo $0: done. + |