1

I am developing a scheduler for running VMs on KVM. The scheduling has over-commitment of resources like memory and CPU. For this, I need a CLI-based monitoring tool that keeps me giving information about the resource usage of each VM, because it might be the case that due to over-provisioning of resources, VMs on a particular host are running very slowly depending on the benchmarks/programs each VM is running, and then I need to migrate a VM to another host and so on.

I looked into libvirt-based tools like collects, MUNIN, Nagios-vert, etc.( http://libvirt.org/apps.html#monitoring ) I also looked into Ubuntu utility perf-kvm ( http://manpages.ubuntu.com/manpages/maverick/man1/perf-kvm.1.html )

I want to ask which CLI-based would be recommended by the community so that I can make a automated scheduler that takes care of the above situation.

  • I need to run this tool on the host to determine the VMs resource usage. 1 thing is that I can ssh into the VM and then retrieve the info, but I do not want to assume that the VM is running a ssh server. – Pinnacle Mar 29 '12 at 17:57
1

You can use top, htop, vmstat, dstat, iotop... and you can also read out the information from /proc//stats etc.

0

Something like:

  • htop
  • vmstat
  • ps aux ?
  • I need to run this tool on the host to determine the VMs resource usage. 1 thing is that I can ssh into the VM and then retrieve the info, but I do not want to assume that the VM is running a ssh server. – Pinnacle Mar 29 '12 at 17:58
  • you can run that on your host, in KVM a virtual machine consists of multiple processes if I'm not mistaking. – Lucas Kauffman Mar 29 '12 at 18:36
0

Some things need to be done in the guest OS, and for that you should use a guest agent. There are several already available - just look at oVirt.org for examples. BTW, maybe it would be better if you contribute to enhance the scheduler at oVirt.org and join the project instead of reinventing the wheel?

Anyhow, some stats cannot be collected by standard means, like the iops usage per process, instead of per block device, and for that you need systemtap. A nice way to aggregate the information before parsing it is collectd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.