summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
Diffstat (limited to 'files')
-rw-r--r--files/plugins/xen_traffic_all4
-rwxr-xr-xfiles/plugins/xen_vbd4
2 files changed, 3 insertions, 5 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
diff --git a/files/plugins/xen_vbd b/files/plugins/xen_vbd
index a684839..e34d41c 100755
--- a/files/plugins/xen_vbd
+++ b/files/plugins/xen_vbd
@@ -50,7 +50,7 @@ if ( defined($ARGV[0]))
'graph_info' => 'Display the I/O operations for each domain',
);
- @domains = `cat /var/lib/munin/plugin-state/xm_list.state`;
+ @domains = `cat /var/lib/munin/plugin-state/xm_list.state | grep -v 'Domain-0'`;
foreach $domain ( @domains )
{
@@ -85,7 +85,7 @@ if ( defined($ARGV[0]))
# No args, get rolling
-my @stats = `cat /var/lib/munin/plugin-state/xm_top.state`;
+my @stats = `cat /var/lib/munin/plugin-state/xm_top.state | grep -v 'Domain-0'`;
# remove the first line
shift(@stats);