Add cpu_stats function in virsh.py

Signed-off-by: Prem Karat <[email protected]>
---
 client/tests/virt/virttest/virsh.py |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/client/tests/virt/virttest/virsh.py 
b/client/tests/virt/virttest/virsh.py
index 90c2955..b411a27 100644
--- a/client/tests/virt/virttest/virsh.py
+++ b/client/tests/virt/virttest/virsh.py
@@ -452,6 +452,15 @@ def vcpucount_live(domname, **dargs):
     return command(cmd_vcpucount, **dargs).stdout.strip()
 
 
+def cpu_stats(domname, extra="", **dargs):
+    """
+    Returns domain cpu statistics for a node.
+    Displays per-CPU and total stats about Domain's CPUs
+    """
+    cmd_cpu_stats = "cpu-stats %s %s" % (domname, extra)
+    return command(cmd_cpu_stats, **dargs)
+
+
 def freecell(extra="", **dargs):
     """
     Prints the available amount of memory on the machine or within a NUMA cell.
-- 
1.7.10.4

-- 
        -prem

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to