OSDN Git Service

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