Выводит только первое значение.
# ./vzcpu
51.3
#/bin/bash
ploop list | while read line
do
# split string to variables
IFS=" " set -- $line
ID_VPS=$(echo "$2" | egrep -o "[0-9]+" | sed 's/\///g')
vzctl $ID_VPS 120 ps aux | awk '{ sum += $3 } END { print sum }'
#echo $ID_VPS
done