2

I'm using the VMware Guest SDK library to figure out the CPU ready time of the virtual machine running my application.

According the VMware documentation, the method VMGuestLib_GetCpuStolenMs of the vmGuestLib provides this value:

The time (in ms) that the VM was runnable but not scheduled.

However, if I chart the CPU ready time for the same virtual machine in the vSphere client I get different values. For instance, whereas I get CPU ready times between 0 and 22ms in the vSphere Client for 20s intervals, I get stolen times of 550 to 650ms using the VMware Guest SDK library for (roughly) the same time spans.

My calculation of the CPU stolen time for the last 20s looks like this (pseudo code):

oldStolenMs = vmLib.getCpuStolenMs()
sleep_in_seconds(20)
newStolenMs = vmLib.getCpuStolenMs()

stolenMs = newStolenMs - oldStolenMs
// additionally I verify that the elapsed time of the VM is indeed 20s
Hennes
  • 64,768
  • 7
  • 111
  • 168
s106mo
  • 121
  • 5
  • I think it's pretty clear that you don't understand the technical details behind this, but this is such an obscure question do you think anyone here would happen to know this? –  Jul 21 '16 at 08:08
  • 3
    @Florian: Sorry, but your comment is not helpful at all. The VMware documentation states that both values should be the same. However, in my case the values differ by orders of magnitude. Why is the question for the reason an "obscure" one? – s106mo Jul 21 '16 at 09:17
  • Did you ever find an answer to this? – Steve365 Jul 17 '17 at 15:34
  • @Steve365 Unfortunately, I did not figure out the root cause. On the VMware board there is essentially the same question (still unanswered): https://communities.vmware.com/message/2565977#2565977 - If you have access to the VMware support, I would suggest that you open a ticket for them. – s106mo Jul 18 '17 at 09:33

0 Answers0