Skip to content

Instantly share code, notes, and snippets.

@scarytom
Created September 19, 2013 14:28
Show Gist options
  • Save scarytom/6624349 to your computer and use it in GitHub Desktop.
Save scarytom/6624349 to your computer and use it in GitHub Desktop.
work out the memory usage of a kvm host
#!/bin/bash
virsh list | tail -n +3 | head -n -1 | awk -F" " '{print $2}' | sed 's/.*/\/etc\/libvirt\/qemu\/\0.xml/' | xargs grep memory
grep MemTotal /proc/meminfo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment