From: Ryan Harper <ryanh@us.ibm.com>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: [PATCH] xend: change xm list for multi-vcpu doms
Date: Thu, 28 Jul 2005 14:40:58 -0500 [thread overview]
Message-ID: <20050728194058.GC8702@us.ibm.com> (raw)
This patch updates the CPU field in xm list for multi-vcpu domains.
When a dom runs on multiple physical cpus, the CPU field doesn't have
much meaning. The suggested fix was to replace the value with '-'.
root@bebop:~ # xm list
Name Id Mem(MB) CPU VCPU(s) State Time(s) Console
Domain-0 0 507 - 2 r---- 134.4
debian_sarge_3 8 128 1 1 -b--- 0.4 9608
Please apply.
--
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253 T/L: 678-9253
ryanh@us.ibm.com
diffstat output:
main.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
---
diff -r 501a70f3ae96 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py Thu Jul 28 12:34:45 2005
+++ b/tools/python/xen/xm/main.py Thu Jul 28 14:35:03 2005
@@ -397,7 +397,7 @@
d['dom'] = int(sxp.child_value(info, 'id', '-1'))
d['name'] = sxp.child_value(info, 'name', '??')
d['mem'] = int(sxp.child_value(info, 'memory', '0'))
- d['cpu'] = int(sxp.child_value(info, 'cpu', '0'))
+ d['cpu'] = str(sxp.child_value(info, 'cpu', '0'))
d['vcpus'] = int(sxp.child_value(info, 'vcpus', '0'))
d['state'] = sxp.child_value(info, 'state', '??')
d['cpu_time'] = float(sxp.child_value(info, 'cpu_time', '0'))
@@ -406,12 +406,14 @@
d['port'] = sxp.child_value(console, 'console_port')
else:
d['port'] = ''
+ if d['vcpus'] > 1:
+ d['cpu'] = '-'
if ((int(sxp.child_value(info, 'ssidref', '0'))) != 0):
d['ssidref1'] = int(sxp.child_value(info, 'ssidref', '0')) & 0xffff
d['ssidref2'] = (int(sxp.child_value(info, 'ssidref', '0')) >> 16) & 0xffff
- print ("%(name)-16s %(dom)3d %(mem)7d %(cpu)3d %(vcpus)5d %(state)5s %(cpu_time)7.1f %(port)4s s:%(ssidref2)02x/p:%(ssidref1)02x" % d)
+ print ("%(name)-16s %(dom)3d %(mem)7d %(cpu)3s %(vcpus)5d %(state)5s %(cpu_time)7.1f %(port)4s s:%(ssidref2)02x/p:%(ssidref1)02x" % d)
else:
- print ("%(name)-16s %(dom)3d %(mem)7d %(cpu)3d %(vcpus)5d %(state)5s %(cpu_time)7.1f %(port)4s" % d)
+ print ("%(name)-16s %(dom)3d %(mem)7d %(cpu)3s %(vcpus)5d %(state)5s %(cpu_time)7.1f %(port)4s" % d)
def show_vcpus(self, doms):
print 'Name Id VCPU CPU CPUMAP'
reply other threads:[~2005-07-28 19:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050728194058.GC8702@us.ibm.com \
--to=ryanh@us.ibm.com \
--cc=m+Ian.Pratt@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.