[Kimchi-devel] [PATCH] Number of CPUs in Host's Basic Information.
Christy Perez
christy at linux.vnet.ibm.com
Tue Oct 28 18:39:44 UTC 2014
On Power, this doesn't seem to reflect the real number of cores.
>>> print psutil.NUM_CPUS
14
So are we going for CPUs (and let the user figure out how many virtual
CPUs he/she can consoume), or cores (which I think is more useful)?
For SMT/hyperthreading , I'm using ppc64_cpu and virsh capabilities:
<capabilities>
<host>
<uuid>412bb869-1795-46e9-9bb3-dfe12f3bb45d</uuid>
<cpu>
<arch>x86_64</arch>
<model>SandyBridge</model>
<vendor>Intel</vendor>
<topology sockets='1' cores='2' threads='2'/>
$ ppc64_cpu --cores-on
On 10/27/2014 03:45 PM, Paulo Vital wrote:
> Support to provide the information of the number of online CPUs
> present in the Host system.
>
> Also, updated English help page to express the new information.
>
> Signed-off-by: Paulo Vital <pvital at linux.vnet.ibm.com>
> ---
> src/kimchi/model/host.py | 1 +
> ui/pages/help/en_US/host.dita | 4 ++--
> ui/pages/tabs/host.html.tmpl | 4 ++++
> 3 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/src/kimchi/model/host.py b/src/kimchi/model/host.py
> index 1bc3ca2..ca197c1 100644
> --- a/src/kimchi/model/host.py
> +++ b/src/kimchi/model/host.py
> @@ -89,6 +89,7 @@ class HostModel(object):
> res['cpu'] = line.split(':')[1].strip()
> break
>
> + res['num_cpu'] = psutil.NUM_CPUS
> res['memory'] = psutil.TOTAL_PHYMEM
>
> # Include IBM PowerKVM name to supported distro names
> diff --git a/ui/pages/help/en_US/host.dita b/ui/pages/help/en_US/host.dita
> index 335c51c..0dcb670 100644
> --- a/ui/pages/help/en_US/host.dita
> +++ b/ui/pages/help/en_US/host.dita
> @@ -24,8 +24,8 @@ to the host system, if it is not already connected.</li>
> <dlentry>
> <dt>Basic information</dt>
> <dd>This section displays the host operating system distribution,
> -version, and code name, as well as the processor type and amount of
> -memory in GB.</dd>
> +version, and code name, as well as the processor type, the number of
> +online CPUs and amount of memory in GB.</dd>
> </dlentry><dlentry>
> <dt>System statistics</dt>
> <dd>This section displays graphs to show statistics for CPU, memory,
> diff --git a/ui/pages/tabs/host.html.tmpl b/ui/pages/tabs/host.html.tmpl
> index 8641962..57c7cee 100644
> --- a/ui/pages/tabs/host.html.tmpl
> +++ b/ui/pages/tabs/host.html.tmpl
> @@ -75,6 +75,10 @@
> <div class="section-value">{cpu}</div>
> </div>
> <div class="section-row">
> + <div class="section-label">$_("CPU(s)")</div>
> + <div class="section-value">{num_cpu}</div>
> + </div>
> + <div class="section-row">
> <div class="section-label">$_("Memory")</div>
> <div class="section-value">{memory}</div>
> </div>
>
More information about the Kimchi-devel
mailing list