aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-devel/haproxy_socketinfo.inc
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2013-05-13 17:09:43 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2013-05-13 17:09:43 -0400
commit4a38b4b1a48b67baf997453227c9d4a1bb810523 (patch)
tree0321c07f5267806b55ad025df8c13968ac17ba94 /config/haproxy-devel/haproxy_socketinfo.inc
parent080fb922c15c959be4f0bd101d0cf3f529f0e866 (diff)
parent3eddd42b1d0da5bdf5faec0e5036ef30347fa0a3 (diff)
downloadpfsense-packages-4a38b4b1a48b67baf997453227c9d4a1bb810523.tar.gz
pfsense-packages-4a38b4b1a48b67baf997453227c9d4a1bb810523.tar.bz2
pfsense-packages-4a38b4b1a48b67baf997453227c9d4a1bb810523.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'config/haproxy-devel/haproxy_socketinfo.inc')
-rw-r--r--config/haproxy-devel/haproxy_socketinfo.inc16
1 files changed, 14 insertions, 2 deletions
diff --git a/config/haproxy-devel/haproxy_socketinfo.inc b/config/haproxy-devel/haproxy_socketinfo.inc
index 117e7334..5b31afeb 100644
--- a/config/haproxy-devel/haproxy_socketinfo.inc
+++ b/config/haproxy-devel/haproxy_socketinfo.inc
@@ -96,7 +96,7 @@ function haproxy_get_statistics(){// "show stat"
return $result;
}
-function haproxy_get_clients(){// "show sess"
+function haproxy_get_clients($show_traffic = false){// "show sess"
$clients=array();
$sessions = haproxy_socket_command("show sess");
foreach($sessions as $line) {
@@ -122,8 +122,20 @@ function haproxy_get_clients(){// "show sess"
"calls" => $calls[1],
"exp" => $exp[1]);
}
+ if ($show_traffic) {
+ foreach($clients as &$client) {
+ $session_data = haproxy_socket_command("show sess {$client['sessid']}");
+ $client['session_data'] = $session_data;
+
+ $req = explode(" ",$session_data[13]);
+ $x = explode("=",$req[7]);
+ $client['session_datareq'] = $x[1];
+ $res = explode(" ",$session_data[16]);
+ $x = explode("=",$res[7]);
+ $client['session_datares'] = $x[1];
+ }
+ }
return $clients;
}
?>
-