[libvirt-users] How i can calculate cpu utilization percentage for host using python libvirt API.

Hi, How i can calculate cpu utilization percentage for host using python libvirt API. Which function can i use for calulating cpu percentage of host and Virtual Machines? 1)Host cpu utilization ==================== I tried getCPUStats() function,it gives the following output.Is there any way to calculate cpu percentage from the following output? Is there any other function availabe for calculating cpu utilization percentage? output:{'kernel': 34870000000L, 'idle': 3522190000000L, 'user': 209930000000L, 'iowait': 132240000000L} import libvirt conn=libvirt.open('qemu+ssh://root@192.168.1.4/system') conn.getCPUStats(-1,0) Thanks and Regards, Deepak S ------------------------- Message sent via Atmail Open - http://atmail.org/
participants (1)
-
deepak@fluentsoft.com