OSDN Git Service

Change version number
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / virtualservice / virtualservice-1.sh
1 #!/bin/bash
2
3 . ${SET_DEFAULT_CONF}
4
5 #Run http server
6 SorryServer1=SorryServer1
7 SorryServer1_ADDR=127.0.0.1
8 SorryServer1_PORT=50001
9 start_lighttpd -s $SorryServer1 -a $SorryServer1_ADDR -p $SorryServer1_PORT
10 if [ $? -ne 0 ]
11 then
12         echo "Test failed: start_lighttpd SorryServer1"
13         exit 1
14 fi
15
16
17 #Add Service
18 $L7VSD
19 if [ $? -ne 0 ]
20 then
21         echo "Test failed: $L7VSD"
22         exit 1
23 fi
24 usleep 100000
25
26 $L7VSADM -A -t localhost:40001 -m sessionless -s wrr -u 10 -b ${SorryServer1_ADDR}:${SorryServer1_PORT} -f 0 -Q 100M -q 100M -O deferaccept,cork,quickackoff,nodelay -L 1 -a /var/log/l7vs/l7vsd_conn.log --ac-rotate-type size --ac-rotate-max-backup-index 12 --ac-rotate-max-filesize 1M
27 if [ $? -ne 0 ]
28 then
29         echo "Test failed: $L7VSADM -A -t localhost:40001 -m sessionless -s wrr -u 10 -b ${SorryServer1_ADDR}:${SorryServer1_PORT} -f 0 -Q 100M -q 100M -O deferaccept,cork,quickackoff,nodelay -L 1 -a /var/log/l7vs/l7vsd_conn.log --ac-rotate-type size --ac-rotate-max-backup-index 12 --ac-rotate-max-filesize 1M"
30         exit 1
31 fi
32
33
34 RET=`$L7VSADM -V`
35 EXPECT="Layer-7 Virtual Server version 3.0.0
36 L7vsd Log Level:
37 Category                       Level
38 l7vsd_network                  warn
39 l7vsd_network_qos              warn
40 l7vsd_network_bandwidth        warn
41 l7vsd_network_num_connection   warn
42 l7vsd_network_access           warn
43 l7vsd_mainthread               warn
44 l7vsd_virtualservice           warn
45 l7vsd_virtualservice_thread    warn
46 l7vsd_session                  warn
47 l7vsd_session_thread           warn
48 l7vsd_realserver               warn
49 l7vsd_sorryserver              warn
50 l7vsd_module                   warn
51 l7vsd_replication              warn
52 l7vsd_replication_sendthread   warn
53 l7vsd_parameter                warn
54 l7vsd_logger                   warn
55 l7vsd_command                  warn
56 l7vsd_start_stop               warn
57 l7vsd_system                   warn
58 l7vsd_system_memory            warn
59 l7vsd_system_endpoint          warn
60 l7vsd_system_signal            warn
61 l7vsd_system_environment       warn
62 l7vsd_snmpbridge               warn
63 l7vsd_protocol                 warn
64 l7vsd_schedule                 warn
65
66 Replication Mode:
67 SINGLE
68
69 SNMPAgent Connection Status:
70 non-connecting
71
72 SNMPAgent Log Level:
73 Category                       Level
74 snmpagent_start_stop           warn
75 snmpagent_manager_receive      warn
76 snmpagent_manager_send         warn
77 snmpagent_l7vsd_receive        warn
78 snmpagent_l7vsd_send           warn
79 snmpagent_logger               warn
80 snmpagent_parameter            warn
81 snmpagent_system               warn
82 snmpagent_system_memory        warn
83 snmpagent_system_endpoint      warn
84 snmpagent_system_signal        warn
85 snmpagent_system_environment   warn
86
87 Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string
88      SorryAddress:Port Sorry_cc Sorry_flag
89      QoS-up   Throughput-up
90      QoS-down Throughput-down
91      SSL_config_file
92      Socket option
93      Access_log_flag
94      Access_log_file
95      Access_log_rotate option
96   -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
97 TCP localhost:40001 sessionless wrr --sorry-uri '/'
98     localhost:50001(Masq) 10 0
99     100000000 0
100     100000000 0
101     none
102     deferaccept,cork,quickackoff,nodelay
103     1
104     /var/log/l7vs/l7vsd_conn.log
105     --ac-rotate-type size --ac-rotate-max-backup-index 12 --ac-rotate-max-filesize 1M"
106
107 if [ "${RET}" != "${EXPECT}" ]
108 then
109         echo "Test failed: $L7VSADM -V"
110         exit 1
111 fi
112
113 exit 0
114