aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-devel/haproxy_global.php
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2013-05-23 22:01:11 +0200
committerPiBa-NL <pba_2k3@yahoo.com>2013-05-24 01:10:49 +0200
commit0486d32f0b5f4d514f02f68c33f22f0864f20ac1 (patch)
tree2b2876b259616464c5957457270ae99695242e22 /config/haproxy-devel/haproxy_global.php
parent8586a6318f6c7429df260944b95baf9e55ac2257 (diff)
downloadpfsense-packages-0486d32f0b5f4d514f02f68c33f22f0864f20ac1.tar.gz
pfsense-packages-0486d32f0b5f4d514f02f68c33f22f0864f20ac1.tar.bz2
pfsense-packages-0486d32f0b5f4d514f02f68c33f22f0864f20ac1.zip
haproxy-devel, fix required fields a shared-backend, optional Force immediate stop of old process on reload, fix show memory usage.
Diffstat (limited to 'config/haproxy-devel/haproxy_global.php')
-rwxr-xr-xconfig/haproxy-devel/haproxy_global.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/config/haproxy-devel/haproxy_global.php b/config/haproxy-devel/haproxy_global.php
index 7ff0fb65..dbc55847 100755
--- a/config/haproxy-devel/haproxy_global.php
+++ b/config/haproxy-devel/haproxy_global.php
@@ -68,6 +68,7 @@ if ($_POST) {
if (!$input_errors) {
$config['installedpackages']['haproxy']['enable'] = $_POST['enable'] ? true : false;
+ $config['installedpackages']['haproxy']['terminate_on_reload'] = $_POST['terminate_on_reload'] ? true : false;
$config['installedpackages']['haproxy']['maxconn'] = $_POST['maxconn'] ? $_POST['maxconn'] : false;
$config['installedpackages']['haproxy']['enablesync'] = $_POST['enablesync'] ? true : false;
$config['installedpackages']['haproxy']['synchost1'] = $_POST['synchost1'] ? $_POST['synchost1'] : false;
@@ -84,10 +85,10 @@ if ($_POST) {
write_config();
}
}
-
}
$pconfig['enable'] = isset($config['installedpackages']['haproxy']['enable']);
+$pconfig['terminate_on_reload'] = isset($config['installedpackages']['haproxy']['terminate_on_reload']);
$pconfig['maxconn'] = $config['installedpackages']['haproxy']['maxconn'];
$pconfig['enablesync'] = isset($config['installedpackages']['haproxy']['enablesync']);
$pconfig['syncpassword'] = $config['installedpackages']['haproxy']['syncpassword'];
@@ -177,9 +178,9 @@ function enable_change(enable_change) {
Sets the maximum per-process number of concurrent connections to X.<br/>
<strong>NOTE:</strong> setting this value too high will result in HAProxy not being able to allocate enough memory.<br/>
<?php
- $hascpu = trim(`top | grep haproxy | awk '{ print $6 }'`);
- if($hascpu)
- echo "<p>Current memory usage {$hascpu}.</p>";
+ $memusage = trim(`ps auxw | grep haproxy | grep -v grep | awk '{ print $5 }'`);
+ if($memusage)
+ echo "<p>Current memory usage: {$memusage} K.</p>";
?>
</td><td>
<table style="border: 1px solid #000;">
@@ -225,6 +226,15 @@ function enable_change(enable_change) {
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell">Reload behaviour</td>
+ <td width="78%" class="vtable">
+ <input name="terminate_on_reload" type="checkbox" value="yes" <?php if ($pconfig['terminate_on_reload']) echo "checked"; ?>>
+ Force immediate stop of old process on reload. (closes existing connections)<br/><br/>Note: when this option is selected connections will be closed when haproxy is restarted.
+ Otherwise the existing connections will be served by the old haproxy process untill they are closed.
+ Checking this option will interupt existing connections on a restart. (which happens when the configuration is applied,
+ but possibly also when pfSense detects an interface comming up or changing its ip-address)</td>
+ </tr>
+ <tr>
<td valign="top" class="vncell">
Remote syslog host
</td>