log "Running 'virsh list --all' to get the list of running machines." virsh list --all|grep running|awk -F" " '{print $2}' > $runtmp sleep 1 log "Appending '.xml' to the end of each running machine name." sed 's/$/.xml/' $runtmp > $runorg sleep 1 log "Inserting correct path to the .xml files" sed -e 's/^/\/etc\/libvirt\/qemu\//' $runorg > $run sleep 1 log "Processing the number of cpu's each machine uses via it's '.xml' file." grep vcpu $(cat /etc/libvirt/qemu/runlist)|awk -F":" '{print $2}'|sed s,\>,\ ,g|sed s,\<,\ ,g|awk -F" " '{print $3}' > $core