<div dir="ltr">I am a student and I am using python libvirt api, like the ones which were used in order to build virt-manager.<div><br></div><div>I am wondering how to obtain the %cpu usage and I thought asking to you, as you did it for your program which is written in python.</div>
<div><br></div><div>getCpuStats() function on a domain object gives me cpu_time,user_time,system_time...I don't know how to combine them in order to obtain the % usage.</div><div><br></div><div>For the guest system I take the delta between two successive measurations and make a division, putting idle time just on the denominator...but here?</div>
<div>Maybe the cpu_time is actually an idle time for the guest?</div></div>