diff options
author | Denny Page <dennypage@me.com> | 2016-01-21 11:04:33 -0800 |
---|---|---|
committer | Denny Page <dennypage@me.com> | 2016-01-21 11:04:33 -0800 |
commit | 0e1eef544b6ebd9af94719f5e6512bbb24714b99 (patch) | |
tree | 031aabd8d89c8c03e1712bd1a26b64191f59d6ce /src | |
parent | ef378560d1982cd5ecb93475ef9da12ce19b6a31 (diff) | |
download | pfsense-0e1eef544b6ebd9af94719f5e6512bbb24714b99.zip pfsense-0e1eef544b6ebd9af94719f5e6512bbb24714b99.tar.gz |
Use a single call to dpinger for a coherent view of latency/stddev/loss.
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/rrd.inc | 10 |
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" |