OSDN Git Service

Change l7vsadm -V format
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / l7vsadm / l7vsadm-4-1-6.sh
1 #!/bin/bash
2
3 . ${SET_DEFAULT_CONF}
4
5 #Add Service
6 $L7VSD
7 if [ $? -ne 0 ]
8 then
9         echo "Test failed: $L7VSD"
10         exit 1
11 fi
12 usleep 100000
13
14 $L7VSADM -A -t 127.0.0.1:40001 -m sessionless -q 1M -Q 100M
15 if [ $? -ne 0 ]
16 then
17         echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless -q 1M -Q 100M"
18         exit 1
19 fi
20
21 $L7VSADM -A -t 127.0.0.1:40002 -m sessionless -Q 100M -q 1M
22 if [ $? -ne 0 ]
23 then
24         echo "Test failed: $L7VSADM -A -t 127.0.0.1:40002 -m sessionless -Q 100M -q 1M"
25         exit 1
26 fi
27
28 RET=`$L7VSADM -V -n`
29 EXPECT="Layer-7 Virtual Server version 3.0.0
30 L7vsd Log Level:
31 Category                       Level
32 l7vsd_network                  warn
33 l7vsd_network_qos              warn
34 l7vsd_network_bandwidth        warn
35 l7vsd_network_num_connection   warn
36 l7vsd_network_access           warn
37 l7vsd_mainthread               warn
38 l7vsd_virtualservice           warn
39 l7vsd_virtualservice_thread    warn
40 l7vsd_session                  warn
41 l7vsd_session_thread           warn
42 l7vsd_realserver               warn
43 l7vsd_sorryserver              warn
44 l7vsd_module                   warn
45 l7vsd_replication              warn
46 l7vsd_replication_sendthread   warn
47 l7vsd_parameter                warn
48 l7vsd_logger                   warn
49 l7vsd_command                  warn
50 l7vsd_start_stop               warn
51 l7vsd_system                   warn
52 l7vsd_system_memory            warn
53 l7vsd_system_endpoint          warn
54 l7vsd_system_signal            warn
55 l7vsd_system_environment       warn
56 l7vsd_snmpagent                info
57 l7vsd_protocol                 warn
58 l7vsd_schedule                 warn
59
60 Replication Mode:
61 SINGLE
62
63 SNMPAgent:
64 Agent Status                   inactive
65 log trap status                none
66 log trap level                 none
67 cache update interval          none
68 start date                     none
69 last request date              none
70 last trap date                 none
71 total GET requests             none
72 total SET requests             none
73 total trap counts              none
74
75 Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string
76   -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
77 TCP 127.0.0.1:40001 sessionless rr --sorry-uri '/' --statistic 0
78   Bypass Settings:
79     Sorry Server                  none
80     Max Connection                0
81     Sorry Flag                    off
82   SSL Settings:
83     SSL Config File               none
84   Logging Settings:
85     Access Log                    off
86     Access Log File               none
87     Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
88   Socket Settings:
89     TCP_DEFER_ACCEPT              disable
90     TCP_NODELAY                   disable
91     TCP_CORK                      disable
92     TCP_QUICKACK                  disable
93   Throughput:
94     Current Upload / Limit        0.000000 Mbps / 800.000000 Mbps
95     Current Download / Limit      0.000000 Mbps / 8.000000 Mbps
96   Statistics:
97     HTTP Total Requests           0
98     HTTP GET Requests             0
99     HTTP POST Requests            0
100 TCP 127.0.0.1:40002 sessionless rr --sorry-uri '/' --statistic 0
101   Bypass Settings:
102     Sorry Server                  none
103     Max Connection                0
104     Sorry Flag                    off
105   SSL Settings:
106     SSL Config File               none
107   Logging Settings:
108     Access Log                    off
109     Access Log File               none
110     Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
111   Socket Settings:
112     TCP_DEFER_ACCEPT              disable
113     TCP_NODELAY                   disable
114     TCP_CORK                      disable
115     TCP_QUICKACK                  disable
116   Throughput:
117     Current Upload / Limit        0.000000 Mbps / 800.000000 Mbps
118     Current Download / Limit      0.000000 Mbps / 8.000000 Mbps
119   Statistics:
120     HTTP Total Requests           0
121     HTTP GET Requests             0
122     HTTP POST Requests            0"
123
124 if [ "${RET}" != "${EXPECT}" ]
125 then
126         echo "Test failed: $L7VSADM -V -n"
127         exit 1
128 fi
129
130 exit 0
131