2

I have installed xen as hypervisor and there are dom0 and some paravirtualized machins as domu VMs on it.
I know xentop is used for checking the performance of system and virtual machines, But, it just gives the total usage of cpus!
So, is there any tool or any way to get cpu usages per cores?

Hamed
  • 5,798

1 Answers1

1

Use the mpstat tool from the sysstat package.

By issuing the command mpstat -P 0,1 1 you can track the utilization of CPUs 0 and 1 on a 1 second interval.

See man mpstat for further details and possible options.

Lambert
  • 269
  • In a virtual machine, it just gives the vcpu utilizations of virtual machine, not physical cpu utilization. – Hamed May 27 '15 at 09:05
  • Who said that you should run mpstat within a virtual machine? – Lambert May 27 '15 at 09:08
  • After installing xen hypervisor, There is a dom0 virtual machine with privilege to control other guest virtual machine named domU : http://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide – Hamed May 27 '15 at 10:09
  • I'm just trying to help you but I sense that you do not appreciate it much. In my lab I allow the control domain to use every (v)CPU and therefore the mpstat tool can read the information of all the installed CPUs. Now I'm testing (stressing) the CPU in a test domain I see different readings compared to the control domain on the same CPU. Did you have had the chance to look at the tools xenperf and cpuperf-xen. They unfortunately do not work in my environment yet... – Lambert May 27 '15 at 11:25
  • I really appreciate any help but I thought you misunderstood the question, the utilization must be measured through the hypervisor not the OSs. Right now I'm looking for xenperf. I will inform you about the results. do you have link to installation and usage of xenperf in ubuntu? – Hamed May 27 '15 at 11:57
  • 1
    I understand, thanks for your clarification :-). From what I've read is that in order to use xenperf the performance counters must be compiled with xen. I'm not sure if the Ubuntu package of xen has the performance counters compiled, the Debian version 4.1 apparently not. – Lambert May 27 '15 at 12:19