3 # openisis - an open implementation of the CDS/ISIS database
4 # Version 0.8.x (patchlevel see file Version)
5 # Copyright (C) 2001-2003 by Erik Grziwotz, erik@openisis.org
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License, or (at your option) any later version.
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this library; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 # see README for more information
24 # $Id: oister,v 1.5 2003/04/08 00:20:53 kripke Exp $
26 # OpenIsis server tester -- test oyster
29 # ./oister [port [host]] # talk to server
30 # time ./oister -trash [requests [clients [port [host]]]]
36 exec 3<>/dev/tcp/$host/$port
37 local i # running in subshell anyway ...
42 if [ 0 -eq $[i % 7] ]; then # add to session
47 else # fetch session info only
53 [ -z "$line" ] && break;
61 if [ x-trash == "x$1" ]; then
67 echo "starting $clients trashers for $requests requests at `date`"
68 j=$clients; while [ 0 != $j ]; do time trasher $j & j=j-1; done
69 echo "started $clients trashers on $host:$port at `date`"
70 j=$clients; while [ 0 != $j ]; do wait; j=j-1; done
71 echo "collected $clients trashers at `date`"
75 # default: run manually
78 exec 3<>/dev/tcp/${2:-localhost}/${1:-8080}
84 kill $cp # copy kill ;/