diff options
author | smos <seth.mos@dds.nl> | 2010-08-24 16:22:39 +0200 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2010-08-24 16:22:39 +0200 |
commit | 5f250a244a33abc9e791239ba2c2ad9f6737045b (patch) | |
tree | ec58cbfce7fbd555c12efd4c1a6df62965dc01a3 | |
parent | 92150bd8cbb1abd68c9a8cffd748184b1e0c4c43 (diff) | |
download | pfsense-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.inc | 3 |
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 */ |