aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstat/xentop
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-10-22 07:37:15 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-10-22 07:37:15 +0100
commitdb65a8e335a5ed2a9f4eca87d8015686c526ebea (patch)
treee6603f86487239189b6f5672d0580336bde26ae4 /tools/xenstat/xentop
parent44d95809c515f3207960665b9ba1b640168446f7 (diff)
downloadxen-db65a8e335a5ed2a9f4eca87d8015686c526ebea.tar.gz
xen-db65a8e335a5ed2a9f4eca87d8015686c526ebea.tar.bz2
xen-db65a8e335a5ed2a9f4eca87d8015686c526ebea.zip
This patch is to make xentop able to print vcpu usage for out of order
enabled vcpus in a domain. This really isn't an issue anymore with the changes made to dom0 ops and xm/xend. But, I provide it because: - Josh noticed my previous patch called getvcpuinfo twice for each vpcu, which was completely silly. - this patch would be useful in the remote chance that domain vpcus are enabled out of order. Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
Diffstat (limited to 'tools/xenstat/xentop')
-rw-r--r--tools/xenstat/xentop/xentop.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c
index 386e9326e9..1cb5e36829 100644
--- a/tools/xenstat/xentop/xentop.c
+++ b/tools/xenstat/xentop/xentop.c
@@ -713,13 +713,16 @@ void do_vcpu(xenstat_domain *domain)
num_vcpus = xenstat_domain_num_vcpus(domain);
- /* for all vcpus dump out values */
+ /* for all online vcpus dump out values */
for (i=0; i< num_vcpus; i++) {
vcpu = xenstat_domain_vcpu(domain,i);
- if (i != 0 && (i%5)==0)
- print("\n ");
- print(" %2u: %10llus", i, xenstat_vcpu_ns(vcpu)/1000000000);
+ if (xenstat_vcpu_online(vcpu) > 0) {
+ if (i != 0 && (i%5)==0)
+ print("\n ");
+ print(" %2u: %10llus", i,
+ xenstat_vcpu_ns(vcpu)/1000000000);
+ }
}
print("\n");
}