Skip to contentSkip to conversation

Change vcpu column name in vcpu-list

PATCH New Amos Waterland 1 participant 1 message Dec 11, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Change vcpu column name in vcpu-list

The "VCPUs" column in the output of xm vcpu-list' has the same title as the "VCPUs" columen in xm list', but they mean two quite different things. Change the column name in vcpu-list to resolve any confusion.

---

In the following example, one could easily conclude that the two outputs contradict each other: saying that dom0 has 1 vcpu and then that it has 0 vcpus. The semantics are different, of course, and vcpu-list is actually showing the mapping of local vcpuid 0 to cpu 0, and I would like to suggest that the field name be changed as in the following patch to reflect that.

 # xm list
 Name                                      ID   Mem VCPUs      State   Time(s)
 Domain-0                                   0   256     1     r-----     72.6
 S-1165860715.37                            1    64     1     -b----     43.6
 # xm vcpu-list
 Name                              ID VCPUs   CPU State   Time(s) CPU Affinity
 Domain-0                           0     0     0   r--      72.9 no cpus
 S-1165860715.37                    1     0     3   -b-      43.6 no cpus

---

 main.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/python/xen/xm/main.py +1 -1
diff -r 7ad4645e7a54 tools/python/xen/xm/main.py
@@ -611,7 +611,7 @@ def xm_vcpu_list(args):
         dominfo = map(server.xend.domain.getVCPUInfo, doms)
 
     print '%-32s %3s %5s %5s %5s %9s %s' % \
-          ('Name', 'ID', 'VCPUs', 'CPU', 'State', 'Time(s)', 'CPU Affinity')
+          ('Name', 'ID', 'VCPU', 'CPU', 'State', 'Time(s)', 'CPU Affinity')
 
     format = '%(name)-32s %(domid)3d %(number)5d %(c)5s %(s)5s ' \
              ' %(cpu_time)8.1f %(cpumap)s'