Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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
add comment

3 Answers 3

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

share|improve this answer
add comment

Something like:

  • htop
  • vmstat
  • ps aux ?
share|improve this answer
    
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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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