On 09/13/2012 01:41 PM, Prem Karat wrote:
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
Please add a docstring describing parameters. It's okay to just
copy-paste them from a similar function. This helps automatic API doc.
generation (when we get around to doing it).
+ """
+ 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.
This function will probably only ever be called with ignore_status ==
True. Recommend putting that in directly, for example as:
dargs['ignore_status'] = dargs.get('ignore_status', True)
Hmmm, there are probably some other places I should stick this in as well.
--
Chris Evich, RHCA, RHCE, RHCDS, RHCSS
Quality Assurance Engineer
e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214
_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel