1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-25 02:18:08 +00:00

Support for XEN-Domains with an dot in their name

This commit is contained in:
Roland Mohrbacher 2011-06-24 09:57:18 +02:00 committed by Steve Schnepp
parent b6c93cc77c
commit 38ed4d0f2b

View file

@ -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