From 65ef8171496537b49fcdd0a5b833d61a8ad23351 Mon Sep 17 00:00:00 2001 From: Guannan Ren Date: Tue, 20 Mar 2012 12:34:06 +0800 Subject: python: add virDomainGetCPUStats python binding API dom.getCPUStats(True, 0) [{'cpu_time': 24699446159L, 'system_time': 10870000000L, 'user_time': 950000000L}] dom.getCPUStats(False, 0) [{'cpu_time': 8535292289L}, {'cpu_time': 1005395355L}, {'cpu_time': 9351766377L}, {'cpu_time': 5813545649L}] *generator.py Add a new naming rule *libvirt-override-api.xml The API function description *libvirt-override.c Implement it. --- libvirt-override-api.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libvirt-override-api.xml') diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index ab8f33a..06986ec 100644 --- a/libvirt-override-api.xml +++ b/libvirt-override-api.xml @@ -149,6 +149,19 @@ + + Extracts CPU statistics for a running domain. On success it will + return a list of data of dictionary type. If boolean total is False, the + first element of the list refers to CPU0 on the host, second element is + CPU1, and so on. The format of data struct is as follows: + [{cpu_time:xxx}, {cpu_time:xxx}, ...] + If it is True, it returns total domain CPU statistics in the format of + [{cpu_time:xxx, user_time:xxx, system_time:xxx}] + + + + + Extracts interface device statistics for a domain -- cgit