diff options
author | mh <mh@immerda.ch> | 2012-12-15 20:29:41 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2012-12-15 20:29:41 +0100 |
commit | f34990e5a63bf3aeaaeafb7be2ed842c524a9926 (patch) | |
tree | d75e332ff4db33a999964277945c580bf39eeff7 /files/plugins/xen_traffic_all | |
parent | 864587e318adf0aa7d4a191b596f5b8337faf521 (diff) |
fix a few remaining things in xen plugins
Diffstat (limited to 'files/plugins/xen_traffic_all')
-rw-r--r-- | files/plugins/xen_traffic_all | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/files/plugins/xen_traffic_all b/files/plugins/xen_traffic_all index 492effc..72f3b27 100644 --- a/files/plugins/xen_traffic_all +++ b/files/plugins/xen_traffic_all @@ -35,9 +35,7 @@ fi # we update network devices only twice an hour function net_state { dom=$1 - (find /var/lib/munin/plugin-state/xm_net_$dom.state -mmin -30 > /dev/null 2>&1) && \ - [ `cat /var/lib/munin/plugin-state/xm_net_$dom.state | wc -l` -gt 0 ] - if [ $? -gt 0 ] || [ ! -f /var/lib/munin/plugin-state/xm_net_$dom.state ]; then + if [ `find /var/lib/munin/plugin-state/xm_net_$dom.state -mmin +30 2> /dev/null | wc -l` -gt 0 ] || [ ! -f /var/lib/munin/plugin-state/xm_net_$dom.state ]; then content=$(/usr/sbin/xm network-list $dom) if [ $? -eq 0 ]; then echo "${content}" | egrep "^[0-9]+" | sed 's@^.*vif/\([0-9]*\)/\([0-9]*\).*$@vif\1.\2@' > /var/lib/munin/plugin-state/xm_net_$dom.state |