From: Amos Waterland Subject: [PATCH] Change vcpu column name in vcpu-list Date: Mon, 11 Dec 2006 15:59:39 -0500 Message-ID: <20061211205939.GA26037@kvasir.watson.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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. Signed-off-by: Amos Waterland --- 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(-) diff -r 7ad4645e7a54 tools/python/xen/xm/main.py --- a/tools/python/xen/xm/main.py Tue Nov 21 16:43:04 2006 -0600 +++ b/tools/python/xen/xm/main.py Mon Dec 11 15:40:30 2006 -0500 @@ -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'