summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/rrd.inc
diff options
context:
space:
mode:
authorDenny Page <dennypage@me.com>2016-01-21 11:04:33 -0800
committerDenny Page <dennypage@me.com>2016-01-21 11:04:33 -0800
commit0e1eef544b6ebd9af94719f5e6512bbb24714b99 (patch)
tree031aabd8d89c8c03e1712bd1a26b64191f59d6ce /src/etc/inc/rrd.inc
parentef378560d1982cd5ecb93475ef9da12ce19b6a31 (diff)
downloadpfsense-0e1eef544b6ebd9af94719f5e6512bbb24714b99.zip
pfsense-0e1eef544b6ebd9af94719f5e6512bbb24714b99.tar.gz
Use a single call to dpinger for a coherent view of latency/stddev/loss.
Diffstat (limited to 'src/etc/inc/rrd.inc')
-rw-r--r--src/etc/inc/rrd.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/etc/inc/rrd.inc b/src/etc/inc/rrd.inc
index 0d0715b..3daa273 100644
--- a/src/etc/inc/rrd.inc
+++ b/src/etc/inc/rrd.inc
@@ -984,14 +984,14 @@ for sock in {$g['varrun_path']}/dpinger_*.sock; do
continue
fi
- gw=\$(/usr/bin/nc -U \$sock | awk '{ print \$1 }')
-
- if [ -z "\$gw" ]; then
+ t=\$(/usr/bin/nc -U \$sock)
+ if [ -z "\$t" ]; then
continue
fi
- delay=\$(/usr/bin/nc -U \$sock | awk '{ print \$2 }')
- loss=\$(/usr/bin/nc -U \$sock | awk '{ print \$4 }')
+ gw=\$(echo "\$t" | awk '{ print \$1 }')
+ delay=\$(echo "\$t" | awk '{ print \$2 }')
+ loss=\$(echo "\$t" | awk '{ print \$4 }')
if echo "\$loss" | grep -Eqv '^[0-9]+\$'; then
loss="U"
OpenPOWER on IntegriCloud