1 --- munin.orig/plugins/virtualization/xen 2013-08-23 21:31:56.610001695 +0200
2 +++ munin/plugins/virtualization/xen 2013-08-23 21:36:22.120001621 +0200
4 statefile="/var/lib/munin/plugin-state/munin-plugin-xen.state"
6 if [ "$1" = "autoconf" ]; then
7 - if which xm > /dev/null ; then
8 + if which xl > /dev/null ; then
12 - echo "no (xm not found)"
13 + echo "no (xl not found)"
18 echo 'graph_category Virtualization'
19 echo 'graph_info This graph shows how many percent of the CPU time was used by each domain'
21 - xm list | grep -v "^Name .* Time(s)$" | \
22 + xl list | grep -v "^Name\s.*\sTime(s)$" | \
23 while read name domid mem cpu state time console; do
24 name=`echo $name | sed -e"s/[-.]/_/g"`
25 TEST=`less $statefile | grep "^${name}$" | wc -l`
30 -xm list | grep -v "^Name .* Time(s)$" | \
31 +xl list | grep -v "^Name\s.*\sTime(s)$" | \
32 while read name domid mem cpu state time console; do
33 name=`echo $name | sed -e "s/[-.]/_/g"`
35 --- munin.orig/plugins/virtualization/xen_cpu_v2 2013-08-23 21:31:56.613334934 +0200
36 +++ munin/plugins/virtualization/xen_cpu_v2 2013-08-23 21:40:07.360001590 +0200
40 # Define where to find xm tools
41 -my $XM = '/usr/sbin/xm';
42 +my $XM = '/usr/sbin/xl';
43 my $XMTOP = '/usr/sbin/xentop';
45 -my $basename = `/usr/bin/basename $0`; chop ($basename);
46 +my $basename = `/bin/basename $0`; chop ($basename);
47 my $TEMPFILE = "/tmp/$basename";
50 --- munin.orig/plugins/virtualization/xen_memory 2013-08-23 21:31:56.613334934 +0200
51 +++ munin/plugins/virtualization/xen_memory 2013-08-23 21:41:06.290001570 +0200
53 # autoconf (optional - used by munin-config)
59 if [ "$1" = "autoconf" ]; then
64 - echo "no (xm not found)"
65 + echo "no (xl not found)"
69 --- munin.orig/plugins/virtualization/xen_traffic_ 2013-08-23 21:31:56.616668173 +0200
70 +++ munin/plugins/virtualization/xen_traffic_ 2013-08-23 23:17:57.023334928 +0200
72 NAME=$( echo $DOMAIN | sed -e's/-/_/g' )
74 if [ "$1" = "autoconf" ]; then
75 - if which xm > /dev/null ; then
76 + if which xl > /dev/null ; then
79 - echo "no (xm not found)"
80 + echo "no (xl not found)"
83 if [ -r /proc/net/dev ]; then
87 if [ "$1" = "suggest" ]; then
88 - xm list | awk '{print $1}' | egrep -v "^(Name|Domain-0)"
89 + xl list | awk '{print $1}' | egrep -v "^(Name|Domain-0)"
97 -dev=$( xm network-list $DOMAIN | egrep "^[0-9]+" | sed 's@^.*vif/\([0-9]*\)/\([0-9]*\).*$@vif\1.\2@')
98 +dev=$( xl network-list $DOMAIN | egrep "^[0-9]+" | sed 's@^.*vif/\([0-9]*\)/\([0-9]*\).*$@vif\1.\2@')
100 awk -v interface="$dev" \
101 'BEGIN { gsub(/\./, "\\.", interface) } \
102 --- munin.orig/plugins/virtualization/xen_traffic_all 2013-08-23 21:31:56.616668173 +0200
103 +++ munin/plugins/virtualization/xen_traffic_all 2013-08-23 21:45:30.156668240 +0200
105 #%# capabilities=autoconf
107 if [ "$1" = "autoconf" ]; then
108 - if which xm > /dev/null ; then
109 + if which xl > /dev/null ; then
112 - echo "no (xm not found)"
113 + echo "no (xl not found)"
116 if [ -r /proc/net/dev ]; then
118 echo 'graph_vlabel bits received (-) / sent (+) per ${graph_period}'
119 echo 'graph_args --base 1024 -l 0'
120 echo 'graph_category xen'
121 - DOMAINS=$(xm list | awk '{print $1}' | egrep -v "^(Name|Domain-0)")
122 + DOMAINS=$(xl list | awk '{print $1}' | egrep -v "^(Name|Domain-0|\(null)")
123 for dom in $DOMAINS; do
124 name=$( echo $dom | tr .- __ )
125 #echo $name"UP.label $name"
130 -DOMAINS=$(xm list | awk '{print $1}' | egrep -v "^(Name|Domain-0)")
131 +DOMAINS=$(xl list | awk '{print $1}' | egrep -v "^(Name|Domain-0|\(null)")
132 for dom in $DOMAINS; do
133 - dev=$( xm list $dom --long | awk '/vifname / { print $2 }' | sed 's/)//' )
134 + dev=$( xl list $dom --long | awk '/vifname / { print $2 }' | sed 's/)//' )
135 if [ "$dev" == "" ]; then
136 - dev=$( xm network-list $dom |\
137 + dev=$( xl network-list $dom |\
138 egrep "^[0-9]+" | sed 's@^.*vif/\([0-9]*\)/\([0-9]*\).*$@vif\1.\2@')
140 name=$( echo $dom | tr .- __ )
141 --- munin.orig/plugins/virtualization/xen_vbd 2013-08-23 21:31:56.620001488 +0200
142 +++ munin/plugins/virtualization/xen_vbd 2013-08-23 23:19:52.040001471 +0200
144 #%# capabilities=autoconf
146 # Location of xm tools
147 -$XM = '/usr/sbin/xm';
148 +$XM = '/usr/sbin/xl';
149 $XMTOP = '/usr/sbin/xentop';
151 # ah, parameters coming in
154 @domains = `$XM list`;
155 shift(@domains); # we don't need the header line
156 + shift(@domains); # we don't need the header line
158 foreach $domain ( @domains )
161 @stats = split (/\n/, pop(@chunks));
171 foreach $domain (@stats)