[Kimchi-devel] [PATCH] Number of CPUs in Host's Basic Information.

Daniel H Barboza danielhb at linux.vnet.ibm.com
Tue Oct 28 09:50:52 UTC 2014


Reviewed-by: Daniel Barboza <danielhb at linux.vnet.ibm.com>
Tested-by: Daniel Barboza <danielhb at linux.vnet.ibm.com>

On 10/27/2014 06: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