diff --git a/plugins/other/xen b/plugins/other/xen index eab77151..8d785108 100755 --- a/plugins/other/xen +++ b/plugins/other/xen @@ -3,7 +3,7 @@ # Script to monitor CPU usage of Xen domains # # Author: unknown -# Modifications: Matthias Pfafferodt, syntron@web.de +# Modifications: Matthias Pfafferodt, syntron@web.de, Roland Mohrbacher # License: GPL v. 2 # # Parameters understood: @@ -34,14 +34,14 @@ if [ "$1" = "config" ]; then echo 'graph_title Xen Domain Utilerisation' echo 'graph_args --base 1000 -l 0 --upper-limit 100 --rigid' -# echo 'graph_scale no' + echo 'graph_scale no' echo 'graph_vlabel %' echo 'graph_category xen' echo 'graph_info This graph shows how many % of the CPU time where used by a domain' xm list | grep -v "^Name .* Time(s)$" | \ while read name domid mem cpu state time console; do - name=`echo $name | sed -e"s/-/_/"` + name=`echo $name | sed -e"s/[-.]/_/g"` TEST=`less $statefile | grep "^${name}$" | wc -l` if [ $TEST -ne 1 ]; then echo "$name" >> $statefile @@ -68,7 +68,7 @@ fi xm list | grep -v "^Name .* Time(s)$" | \ while read name domid mem cpu state time console; do - name=`echo $name | sed -e "s/-/_/"` + name=`echo $name | sed -e "s/[-.]/_/g"` # only seconds time=`echo $time | sed -e "s/\..//"` # scale 60s/60s => 100%/60s