Quantcast
Channel: Measuring CPU %steal on VMware and Hyper-V hypervisors - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 4

Answer by Paul M for Measuring CPU %steal on VMware and Hyper-V hypervisors

$
0
0

the vSphere cluster at work is overloaded, but the usual Zabbix measurement tool wasn't indicating CPU steal time. So many thanks to Dag, I took his test program and wrote a script just to print steal percentage as follows

#!/usr/bin/python

import sys, os, time
sys.path.append(os.path.join('/root/dagwieers/vmguestlib/'))

from vmguestlib import VMGuestLib

gl = VMGuestLib()

gl.UpdateInfo()
stolen_ms_1 = gl.GetCpuStolenMs()

time.sleep(1)

gl.UpdateInfo()
stolen_ms_2 = gl.GetCpuStolenMs()

# print percentage of stolen time
print '%d' % ((stolen_ms_2 - stolen_ms_1) / 10)

gl.CloseHandle()

it confirmed what I thought, I'm often losing 75% of my CPU time!


Viewing all articles
Browse latest Browse all 4

Trending Articles