Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Monitoring openvz resources using rrdtool

932 bytes added, 15:02, 8 July 2008
Collect script
fi
fi
if [ "$update" -eq 1 ]; then
(
cat /proc/bc/$VPSID/resources | awk -v rrdfile=$RRDFILENAME '
BEGIN {
ORS="";
getline
keys=$1 "_f"; values=$6;
keys=keys ":" $1 "_h"; values=values ":" $2;
keys=keys ":" $1 "_b"; values=values ":" $4;
}
{
keys=keys ":" $1 "_f"; values=values ":" $6;
keys=keys ":" $1 "_h"; values=values ":" $2;
keys=keys ":" $1 "_b"; values=values ":" $4;
}
END { print "update " rrdfile " -t " keys " N:" values "\n"; } '
) | $command
fi
done
10
edits