Vzuptime for Openvz

Vzuptime is a basic bash script that will output a list with the load average of each container running in the local openvz instance.

#!/bin/bash
hostname;
uptime;
echo “————–“;
for f in `vzlist | awk -F ‘ ‘ ‘{print $1}’ | tail -n +2`
do
echo -n -e “${f} -\t”;vzctl exec $f uptime | awk -F ‘load average:’ ‘{ print $2 }’
done
echo “————–“;

 

Vzuptime v1.0