VMware Cloud Community
knatesan
Contributor
Contributor

Is there any way to monitor the current CPU frequency(not through vCenter)

Hi,

Is there any mechanism to monitor the current CPU frequency from the command prompt in esx environment.?

I am badly looking for it. Quick response will be highly appreciated.

case0:

Unfortunately vCenter4.0 gives me the wrong value. In hardware status tab it always shows me the rated CPU frequency and not the current CPU frequency.

case1:

In native linux we can pass the following command to display the CPU frequency.

cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

But its not working in ESX environment.

Case2:

for /proc/cpuinfo esx gives me only one processor details. whereas in native linux(RHEL) i am getting all 8 cores details.

My intention is to read the current CPU frequency. Is there any other command to display the CPU frequency.

Tools recommendations will also be highly appreciated.

Thanks,

kamal.

0 Kudos
5 Replies
wila
Immortal
Immortal

Hi,

Why do you need processor frequency? In a virtual guest this is hard to get at in real terms, due to CPU scheduling overhead, time measurement differences, etc...

Besides the frequency doesn't change nor does it give you much when the VM or host is under load.

Under windows there are performance counters, see: http://www.boche.net/blog/index.php/2009/07/08/vsphere-virtual-machine-performance-counters-integrat...

Under linux, you are outta luck.

As for case 2. Your VM only sees the CPU resources that have been assigned to it. It is not much use to see all cores when it is only allowed to use one, or is it?

So this really depends on what you assign to it. If you give it multiple cores, then you can see multiple cores.



--

Wil

_____________________________________________________

VI-Toolkit & scripts wiki at http://www.vi-toolkit.com

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
knatesan
Contributor
Contributor

My Intention: when you do power capping to the node, i am expecting the change in CPU frequency(dropping) from the rated frequency at full load.

In this scenario, vCenter "hardware status" shows me that current CPU frequcny is 2.67Ghx( rated freq). When the powercapping is honoured i am expecting a drop in CPU frequcny state. ( thoughPowercap is honoured by reducing the p state from 0 to 1).

Do you agree this is the bug with vCenter ?

case2:

In a esx node i have a 4 Vm's each has 2 vcpu's allocated. Node is a quad core machine. In this case if i executed the following cmds

/proc/cpuinfo - i am expecting all cores to be displayed. but its not happening. only 1core is displayed.

Thanks,

kamal.

0 Kudos
wila
Immortal
Immortal

Sorry can't comment on your power cap question as i do not have the answer for you.

As I already tried to explain your case 2, it is expected behavior. Normally each of your vCPUs equates to ONE core on the host CPU.

So yes, i would not expect you to see the cores from within the guest.

Starting with ESX4 it is actually possible to create a multi core vCPU for your guests.

See also: http://www.yellow-bricks.com/2009/06/04/per-processor-licenses-for-your-application/



--

Wil

_____________________________________________________

VI-Toolkit & scripts wiki at http://www.vi-toolkit.com

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
knatesan
Contributor
Contributor

WRT case2:

I am executing this command from esx service console.

/Proc/cpuinfo

still you expect only one processor details.

please see the attached file for the response.

0 Kudos
wila
Immortal
Immortal

Hi,

There's no attachment.

The service console itself is a VM with elevated rights and runs by default on Core 0 of CPU 0.

It does not have direct access to the hardware itself.



--

Wil

_____________________________________________________

VI-Toolkit & scripts wiki at http://www.vi-toolkit.com

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva