修訂 | 9dde79d65502cfbaa29a41d45f57efe41a2c6101 (tree) |
---|---|
時間 | 2010-10-08 14:09:00 |
作者 | 0809216 <0809216@1ed6...> |
Commiter | 0809216 |
Add l7vsd setrlimit test
git-svn-id: http://10.144.169.20/repos/um/branches/l7vsd-3.x-ramiel-epoll-cond@10354 1ed66053-1c2d-0410-8867-f7571e6e31d3
@@ -0,0 +1,29 @@ | ||
1 | +#!/bin/bash | |
2 | + | |
3 | +# set config file | |
4 | +cp materials/l7vsd-11-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf | |
5 | + | |
6 | +# max open files will be 1024 * 1024 | |
7 | +maxfileno=`expr 1024 \* 1024` | |
8 | + | |
9 | +# set maxfileno | |
10 | +sed -i -e "s/__MAXFILENO__/$maxfileno/" ${L7VSD_CONF_DIR}/l7vs.cf | |
11 | + | |
12 | +# start l7vsd | |
13 | +start_l7vsd || exit 1 | |
14 | + | |
15 | +# check max open files | |
16 | +soft_limit=`grep "Max open files" /proc/\`pidof l7vsd\`/limits | awk '{print $4}'` | |
17 | +if [ $soft_limit -ne $maxfileno ]; then | |
18 | + echo "Test failed: Max open files(Soft Limit) must be $maxfileno, but $soft_limit" | |
19 | + exit 1 | |
20 | +fi | |
21 | + | |
22 | +hard_limit=`grep "Max open files" /proc/\`pidof l7vsd\`/limits | awk '{print $5}'` | |
23 | +if [ $hard_limit -ne $maxfileno ]; then | |
24 | + echo "Test failed: Max open files(Hard Limit) must be $maxfileno, but $hard_limit" | |
25 | + exit 1 | |
26 | +fi | |
27 | + | |
28 | +exit 0 | |
29 | + |
@@ -0,0 +1,31 @@ | ||
1 | +#!/bin/bash | |
2 | + | |
3 | +# set config file | |
4 | +cp materials/l7vsd-12-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf | |
5 | + | |
6 | +# max open files will be 1024 * 1024 | |
7 | +maxfileno=`expr 1024 \* 1024 + 1` | |
8 | + | |
9 | +# get default open files | |
10 | +open_files=`ulimit -n` | |
11 | + | |
12 | +# set maxfileno | |
13 | +sed -i -e "s/__MAXFILENO__/$maxfileno/" ${L7VSD_CONF_DIR}/l7vs.cf | |
14 | + | |
15 | +# start l7vsd | |
16 | +start_l7vsd || exit 1 | |
17 | + | |
18 | +# check max open files | |
19 | +soft_limit=`grep "Max open files" /proc/\`pidof l7vsd\`/limits | awk '{print $4}'` | |
20 | +if [ $soft_limit -ne $open_files ]; then | |
21 | + echo "Test failed: Max open files(Soft Limit) must be $open_files, but $soft_limit" | |
22 | + exit 1 | |
23 | +fi | |
24 | + | |
25 | +hard_limit=`grep "Max open files" /proc/\`pidof l7vsd\`/limits | awk '{print $5}'` | |
26 | +if [ $hard_limit -ne $open_files ]; then | |
27 | + echo "Test failed: Max open files(Hard Limit) must be $open_files, but $hard_limit" | |
28 | + exit 1 | |
29 | +fi | |
30 | + | |
31 | +exit 0 |
@@ -0,0 +1,155 @@ | ||
1 | +# | |
2 | +# UltraMonkey - L7 configuration file | |
3 | +# Copyright (C) 2008-2009 NTT COMWARE Corporation. | |
4 | +# License: GNU General Public License (GPL) | |
5 | +# | |
6 | +# | |
7 | +# | |
8 | +# This program is free software; you can redistribute it and/or | |
9 | +# modify it under the terms of the GNU General Public License as | |
10 | +# published by the Free Software Foundation; either version 2 of the | |
11 | +# License, or (at your option) any later version. | |
12 | +# | |
13 | +# This program is distributed in the hope that it will be useful, but | |
14 | +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 | +# General Public License for more details. | |
17 | +# | |
18 | +# You should have received a copy of the GNU General Public License | |
19 | +# along with this program; if not, write to the Free Software | |
20 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | |
21 | +# 02110-1301 USA | |
22 | +# | |
23 | +# | |
24 | +# Rivision History. | |
25 | +# 3.0.0 MultiThread version release. | |
26 | +# 1.2.0 First verion release.(version was put together l7vsd) | |
27 | +# - 2008/03/26 Norihisa Nakai. | |
28 | + | |
29 | + | |
30 | +# | |
31 | +# l7vs log setting | |
32 | +# | |
33 | +[logger] | |
34 | +# l7vsd logfile base name | |
35 | +l7vsd_log_filename = "/var/log/l7vs/l7vsd.log" | |
36 | +# l7vsd log rotate pattern | |
37 | +l7vsd_rotation = "size" | |
38 | +# l7vsd rotate max backup number | |
39 | +l7vsd_max_backup_index = "10" | |
40 | +# l7vsd rotate file size | |
41 | +l7vsd_max_filesize = "10M" | |
42 | + | |
43 | +# l7vsd access log rotate pattern | |
44 | +l7vsd_accesslog_rotate_type = "size" | |
45 | +# l7vsd access rotate max backup number | |
46 | +l7vsd_accesslog_rotate_max_backup_index = "10" | |
47 | +# l7vsd access rotate file size | |
48 | +l7vsd_accesslog_rotate_max_filesize = "10M" | |
49 | + | |
50 | +# l7vsd log categories level | |
51 | +l7vsd_network = "warn" | |
52 | +l7vsd_network_qos = "warn" | |
53 | +l7vsd_network_bandwidth = "warn" | |
54 | +l7vsd_network_num_connection = "warn" | |
55 | +l7vsd_network_access = "warn" | |
56 | +l7vsd_mainthread = "warn" | |
57 | +l7vsd_virtualservice = "warn" | |
58 | +l7vsd_virtualservice_thread = "warn" | |
59 | +l7vsd_session = "warn" | |
60 | +l7vsd_session_thread = "warn" | |
61 | +l7vsd_realserver = "warn" | |
62 | +l7vsd_sorryserver = "warn" | |
63 | +l7vsd_module = "warn" | |
64 | +l7vsd_replication = "warn" | |
65 | +l7vsd_replication_sendthread = "warn" | |
66 | +l7vsd_parameter = "warn" | |
67 | +l7vsd_logger = "warn" | |
68 | +l7vsd_command = "warn" | |
69 | +l7vsd_start_stop = "warn" | |
70 | +l7vsd_system = "warn" | |
71 | +l7vsd_system_memory = "warn" | |
72 | +l7vsd_system_endpoint = "warn" | |
73 | +l7vsd_system_signal = "warn" | |
74 | +l7vsd_system_environment = "warn" | |
75 | +l7vsd_snmpagent = "warn" | |
76 | + | |
77 | +l7vsd_protocol = "warn" | |
78 | +l7vsd_schedule = "warn" | |
79 | + | |
80 | +# l7vsadm log file base name | |
81 | +l7vsadm_log_filename = "/var/log/l7vs/l7vsadm.log" | |
82 | +# l7vsadm rotate pattern | |
83 | +l7vsadm_rotation = "date" | |
84 | +# l7vsadm rotate max backup number | |
85 | +l7vsadm_max_backup_index = "10" | |
86 | +# l7vsadm rotate timing ( every month rotate ) | |
87 | +l7vsadm_rotation_timing = "month" | |
88 | +# l7vsadm rotate timing ( day and time ) | |
89 | +l7vsadm_rotation_timing_value = "1 0:01" | |
90 | + | |
91 | +# l7vsadm log categories level | |
92 | +l7vsadm_parse = "warn" | |
93 | +l7vsadm_operate = "warn" | |
94 | +l7vsadm_config_result = "warn" | |
95 | +l7vsadm_common = "warn" | |
96 | +l7vsadm_logger = "warn" | |
97 | +l7vsadm_parameter = "warn" | |
98 | +l7vsadm_module = "warn" | |
99 | + | |
100 | +l7vsadm_protocol = "warn" | |
101 | +l7vsadm_schedule = "warn" | |
102 | + | |
103 | +# | |
104 | +# l7vsadm setting | |
105 | +# | |
106 | +[l7vsadm] | |
107 | +cmd_interval = 1 | |
108 | +cmd_count = 10 | |
109 | + | |
110 | +# | |
111 | +# l7vsd setting | |
112 | +# | |
113 | +[l7vsd] | |
114 | +maxfileno = __MAXFILENO__ | |
115 | + | |
116 | +# | |
117 | +# virtualservice setting | |
118 | +# | |
119 | +[virtualservice] | |
120 | +session_thread_pool_size = 32 | |
121 | +throughput_calc_interval = 500 | |
122 | + | |
123 | +# | |
124 | +# l7vsd replication setting | |
125 | +# | |
126 | +[replication] | |
127 | +#ip_addr = "192.168.0.254" | |
128 | +#service_name = "40000" | |
129 | +#recv_ip_addr = "192.168.0.253" | |
130 | +#interval = 1000 | |
131 | +#compulsorily_interval = 40 | |
132 | + | |
133 | +#cmponent_id_00 = "virtualservice" | |
134 | +#cmponent_size_00 = 64 | |
135 | +#cmponent_id_01 = "chash" | |
136 | +#cmponent_size_01 = 1 | |
137 | +#cmponent_id_02 = "sslid" | |
138 | +#cmponent_size_02 = 222 | |
139 | + | |
140 | +# | |
141 | +# snmpagent settings | |
142 | +# | |
143 | +[snmpagent] | |
144 | +enable = "false" | |
145 | +cache_update_interval = 1 | |
146 | +logtrap = "false" | |
147 | +logtrap_level = "warn" | |
148 | +qos_up_alert_on = 85 | |
149 | +qos_up_alert_off = 50 | |
150 | +qos_down_alert_on = 85 | |
151 | +qos_down_alert_off = 50 | |
152 | +sessionpool_alert_on = 5 | |
153 | +sessionpool_alert_off = 8 | |
154 | +trap_queue_polling_interval = 100000000 | |
155 | +trap_queue_max_size = 1000 |
@@ -0,0 +1,155 @@ | ||
1 | +# | |
2 | +# UltraMonkey - L7 configuration file | |
3 | +# Copyright (C) 2008-2009 NTT COMWARE Corporation. | |
4 | +# License: GNU General Public License (GPL) | |
5 | +# | |
6 | +# | |
7 | +# | |
8 | +# This program is free software; you can redistribute it and/or | |
9 | +# modify it under the terms of the GNU General Public License as | |
10 | +# published by the Free Software Foundation; either version 2 of the | |
11 | +# License, or (at your option) any later version. | |
12 | +# | |
13 | +# This program is distributed in the hope that it will be useful, but | |
14 | +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 | +# General Public License for more details. | |
17 | +# | |
18 | +# You should have received a copy of the GNU General Public License | |
19 | +# along with this program; if not, write to the Free Software | |
20 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | |
21 | +# 02110-1301 USA | |
22 | +# | |
23 | +# | |
24 | +# Rivision History. | |
25 | +# 3.0.0 MultiThread version release. | |
26 | +# 1.2.0 First verion release.(version was put together l7vsd) | |
27 | +# - 2008/03/26 Norihisa Nakai. | |
28 | + | |
29 | + | |
30 | +# | |
31 | +# l7vs log setting | |
32 | +# | |
33 | +[logger] | |
34 | +# l7vsd logfile base name | |
35 | +l7vsd_log_filename = "/var/log/l7vs/l7vsd.log" | |
36 | +# l7vsd log rotate pattern | |
37 | +l7vsd_rotation = "size" | |
38 | +# l7vsd rotate max backup number | |
39 | +l7vsd_max_backup_index = "10" | |
40 | +# l7vsd rotate file size | |
41 | +l7vsd_max_filesize = "10M" | |
42 | + | |
43 | +# l7vsd access log rotate pattern | |
44 | +l7vsd_accesslog_rotate_type = "size" | |
45 | +# l7vsd access rotate max backup number | |
46 | +l7vsd_accesslog_rotate_max_backup_index = "10" | |
47 | +# l7vsd access rotate file size | |
48 | +l7vsd_accesslog_rotate_max_filesize = "10M" | |
49 | + | |
50 | +# l7vsd log categories level | |
51 | +l7vsd_network = "warn" | |
52 | +l7vsd_network_qos = "warn" | |
53 | +l7vsd_network_bandwidth = "warn" | |
54 | +l7vsd_network_num_connection = "warn" | |
55 | +l7vsd_network_access = "warn" | |
56 | +l7vsd_mainthread = "warn" | |
57 | +l7vsd_virtualservice = "warn" | |
58 | +l7vsd_virtualservice_thread = "warn" | |
59 | +l7vsd_session = "warn" | |
60 | +l7vsd_session_thread = "warn" | |
61 | +l7vsd_realserver = "warn" | |
62 | +l7vsd_sorryserver = "warn" | |
63 | +l7vsd_module = "warn" | |
64 | +l7vsd_replication = "warn" | |
65 | +l7vsd_replication_sendthread = "warn" | |
66 | +l7vsd_parameter = "warn" | |
67 | +l7vsd_logger = "warn" | |
68 | +l7vsd_command = "warn" | |
69 | +l7vsd_start_stop = "warn" | |
70 | +l7vsd_system = "warn" | |
71 | +l7vsd_system_memory = "warn" | |
72 | +l7vsd_system_endpoint = "warn" | |
73 | +l7vsd_system_signal = "warn" | |
74 | +l7vsd_system_environment = "warn" | |
75 | +l7vsd_snmpagent = "warn" | |
76 | + | |
77 | +l7vsd_protocol = "warn" | |
78 | +l7vsd_schedule = "warn" | |
79 | + | |
80 | +# l7vsadm log file base name | |
81 | +l7vsadm_log_filename = "/var/log/l7vs/l7vsadm.log" | |
82 | +# l7vsadm rotate pattern | |
83 | +l7vsadm_rotation = "date" | |
84 | +# l7vsadm rotate max backup number | |
85 | +l7vsadm_max_backup_index = "10" | |
86 | +# l7vsadm rotate timing ( every month rotate ) | |
87 | +l7vsadm_rotation_timing = "month" | |
88 | +# l7vsadm rotate timing ( day and time ) | |
89 | +l7vsadm_rotation_timing_value = "1 0:01" | |
90 | + | |
91 | +# l7vsadm log categories level | |
92 | +l7vsadm_parse = "warn" | |
93 | +l7vsadm_operate = "warn" | |
94 | +l7vsadm_config_result = "warn" | |
95 | +l7vsadm_common = "warn" | |
96 | +l7vsadm_logger = "warn" | |
97 | +l7vsadm_parameter = "warn" | |
98 | +l7vsadm_module = "warn" | |
99 | + | |
100 | +l7vsadm_protocol = "warn" | |
101 | +l7vsadm_schedule = "warn" | |
102 | + | |
103 | +# | |
104 | +# l7vsadm setting | |
105 | +# | |
106 | +[l7vsadm] | |
107 | +cmd_interval = 1 | |
108 | +cmd_count = 10 | |
109 | + | |
110 | +# | |
111 | +# l7vsd setting | |
112 | +# | |
113 | +[l7vsd] | |
114 | +maxfileno = __MAXFILENO__ | |
115 | + | |
116 | +# | |
117 | +# virtualservice setting | |
118 | +# | |
119 | +[virtualservice] | |
120 | +session_thread_pool_size = 32 | |
121 | +throughput_calc_interval = 500 | |
122 | + | |
123 | +# | |
124 | +# l7vsd replication setting | |
125 | +# | |
126 | +[replication] | |
127 | +#ip_addr = "192.168.0.254" | |
128 | +#service_name = "40000" | |
129 | +#recv_ip_addr = "192.168.0.253" | |
130 | +#interval = 1000 | |
131 | +#compulsorily_interval = 40 | |
132 | + | |
133 | +#cmponent_id_00 = "virtualservice" | |
134 | +#cmponent_size_00 = 64 | |
135 | +#cmponent_id_01 = "chash" | |
136 | +#cmponent_size_01 = 1 | |
137 | +#cmponent_id_02 = "sslid" | |
138 | +#cmponent_size_02 = 222 | |
139 | + | |
140 | +# | |
141 | +# snmpagent settings | |
142 | +# | |
143 | +[snmpagent] | |
144 | +enable = "false" | |
145 | +cache_update_interval = 1 | |
146 | +logtrap = "false" | |
147 | +logtrap_level = "warn" | |
148 | +qos_up_alert_on = 85 | |
149 | +qos_up_alert_off = 50 | |
150 | +qos_down_alert_on = 85 | |
151 | +qos_down_alert_off = 50 | |
152 | +sessionpool_alert_on = 5 | |
153 | +sessionpool_alert_off = 8 | |
154 | +trap_queue_polling_interval = 100000000 | |
155 | +trap_queue_max_size = 1000 |