summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2010-08-24 16:22:39 +0200
committersmos <seth.mos@dds.nl>2010-08-24 16:22:39 +0200
commit5f250a244a33abc9e791239ba2c2ad9f6737045b (patch)
treeec58cbfce7fbd555c12efd4c1a6df62965dc01a3
parent92150bd8cbb1abd68c9a8cffd748184b1e0c4c43 (diff)
downloadpfsense-5f250a244a33abc9e791239ba2c2ad9f6737045b.zip
pfsense-5f250a244a33abc9e791239ba2c2ad9f6737045b.tar.gz
Apparently we use domain sockets now for collecting user statistics. This was causing the nc command to wait _very_ long for a timeout and essentially destroy the graphing backend and the openvpn user statistics in the process
-rw-r--r--etc/inc/rrd.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc
index 96981da..aaf4256 100644
--- a/etc/inc/rrd.inc
+++ b/etc/inc/rrd.inc
@@ -371,6 +371,7 @@ function enable_rrd_graphing() {
foreach($config['openvpn']['openvpn-server'] as $server) {
if("ovpns{$server['vpnid']}" == $ifname) {
$port = $server['local_port'];
+ $vpnid = $server['vpnid'];
}
}
}
@@ -383,7 +384,7 @@ function enable_rrd_graphing() {
$rrdupdatesh .= " echo \"quit\"\n";
$rrdupdatesh .= "}\n";
$rrdupdatesh .= "$rrdtool update $rrddbpath$ifname$vpnusers N:\\\n";
- $rrdupdatesh .= "`list_current_users | nc localhost {$port} | awk -F\",\" '/^CLIENT_LIST/ {print \$2}' | wc -l | awk '{print $1}'`\n";
+ $rrdupdatesh .= "`list_current_users | nc -U {$g['varetc_path']}/openvpn/server{$vpnid}.sock | awk -F\",\" '/^CLIENT_LIST/ {print \$2}' | wc -l | awk '{print $1}'` &\n";
}
/* QUEUES, set up the queues databases */
OpenPOWER on IntegriCloud