/[LeafOK_CVS]/pvpgn-1.7.4/scripts/login_testusers.sh
ViewVC logotype

Annotation of /pvpgn-1.7.4/scripts/login_testusers.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Tue Jun 6 03:41:37 2006 UTC (19 years, 9 months ago) by sysadm
CVS Tags: pvpgn_1-7-4-0_MIL
Branch point for: GNU, MAIN
Content type: text/x-sh
Initial revision

1 sysadm 1.1 #!/bin/sh
2    
3     # tries to login with a massive number of test accounts
4    
5     # See make_testusers.sh for a way to create these accounts.
6    
7    
8     # number of accounts to connect with
9     numaccts=400
10    
11     # "prefix" of account names
12     name="bob"
13    
14     # account password
15     pass="bob"
16    
17     # delay between printing messages
18     delay=30
19    
20     # where to connect
21     server=localhost
22    
23     # number of zero-padded columns in suffix
24     padding=6
25    
26     # how many seconds until logout
27     total=600
28    
29    
30     num=0
31     while [ "${num}" -lt "${numaccts}" ]; do
32     num="`expr \"${num}\" '+' '1'`"
33     form="`printf \"%0${padding}d\" \"${num}\"`"
34     (
35     echo ''
36     echo "${name}${form}"
37     echo "${pass}"
38     total=0;
39     while [ "${total}" -lt "${maxtime}" ]; do
40     sleep "${delay}"
41     echo "My name is ${name}${form}"
42     total="`expr \"${total}\" '+' \"${delay}\"`"
43     done
44     echo "/quit"
45     ) | telnet "${server}" 6112 &
46     done
47    
48     exit 0

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1