OSDN Git Service

f7a900a4278c22421eade98779e148ccb32e87b2
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / l7vsadm / l7vsadm-4-1-2.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 #Add Service
17 $L7VSD
18 if [ $? -ne 0 ]
19 then
20         echo "Test failed: $L7VSD"
21         exit 1
22 fi
23 usleep 100000
24
25 $L7VSADM -A -t 127.0.0.1:40001 -m sessionless -u 1000 -q 512 -Q 512 -b $SorryServer1_ADDR:$SorryServer1_PORT -f 1 -z /etc/l7vs/sslproxy/sslproxy.target.cf -O deferaccept -L 1 -a /var/log/l7vs/access_log
26 if [ $? -ne 0 ]
27 then
28         echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless -u 1000 -q 512 -Q 512 -b $SorryServer1_ADDR:$SorryServer1_PORT -f 1 -z /etc/l7vs/sslproxy/sslproxy.target.cf -O deferaccept -L 1 -a /var/log/l7vs/access_log"
29         exit 1
30 fi
31
32 RET=`$L7VSADM -V`
33 EXPECT="Layer-7 Virtual Server version 3.0.0
34 L7vsd Log Level:
35 Category                       Level
36 l7vsd_network                  warn
37 l7vsd_network_qos              warn
38 l7vsd_network_bandwidth        warn
39 l7vsd_network_num_connection   warn
40 l7vsd_network_access           warn
41 l7vsd_mainthread               warn
42 l7vsd_virtualservice           warn
43 l7vsd_virtualservice_thread    warn
44 l7vsd_session                  warn
45 l7vsd_session_thread           warn
46 l7vsd_realserver               warn
47 l7vsd_sorryserver              warn
48 l7vsd_module                   warn
49 l7vsd_replication              warn
50 l7vsd_replication_sendthread   warn
51 l7vsd_parameter                warn
52 l7vsd_logger                   warn
53 l7vsd_command                  warn
54 l7vsd_start_stop               warn
55 l7vsd_system                   warn
56 l7vsd_system_memory            warn
57 l7vsd_system_endpoint          warn
58 l7vsd_system_signal            warn
59 l7vsd_system_environment       warn
60 l7vsd_snmpagent                info
61 l7vsd_protocol                 warn
62 l7vsd_schedule                 warn
63
64 Replication Mode:
65 SINGLE
66
67 SNMPAgent:
68 Agent Status                   inactive
69 log trap status                none
70 log trap level                 none
71 cache update interval          none
72 start date                     none
73 last request date              none
74 last trap date                 none
75 total GET requests             none
76 total SET requests             none
77 total trap counts              none
78
79 Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string
80   -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
81 TCP localhost:40001 sessionless rr --sorry-uri '/' --statistic 0
82   Bypass Settings:
83     Sorry Server                  localhost:50001 Masq
84     Max Connection                1000
85     Sorry Flag                    on
86   SSL Settings:
87     SSL Config File               /etc/l7vs/sslproxy/sslproxy.target.cf
88   Logging Settings:
89     Access Log                    on
90     Access Log File               deferaccept
91     Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
92   Socket Settings:
93     TCP_DEFER_ACCEPT              enable
94     TCP_NODELAY                   disable
95     TCP_CORK                      disable
96     TCP_QUICKACK                  disable
97   Throughput:
98     Current Upload / Limit        0.000000 Mbps / 0.004096 Mbps
99     Current Download / Limit      0.000000 Mbps / 0.004096 Mbps
100   Statistics:
101     HTTP Total Requests           0
102     HTTP GET Requests             0
103     HTTP POST Requests            0"
104
105 if [ "${RET}" != "${EXPECT}" ]
106 then
107         echo "Test failed: $L7VSADM -V -n"
108         exit 1
109 fi
110
111 exit 0
112