[one-users] Manually correcting ACPU ?

Carlos Martín Sánchez cmartin at opennebula.org
Fri Mar 23 04:47:46 PDT 2012


Hi Steffen,

The ACPU column is not stored in the DB, it is calculated in the CLI
command, take a look at [1].
The value shown is:

HOST/HOST_SHARE/MAX_CPU - HOST/HOST_SHARE/CPU_USAGE

MAX_CPU is gathered from the monitorization, the host IM driver; and
CPU_USAGE is the sum of the VMs CPU (not VCPU) deployed in this host.
If you execute "onehost show <id> -x", you will get the full host XML
information.

In your case, ACPU is 2400 - 4000

Can you check the actual CPU sum of the 3 VMs running on this host? It
should be 40, the above values are percentages.
Maybe the shutdown or deletion of previous VMs failed, or somehow the
CPU_USAGE value could not be updated into the DB... do you remember any
previous crash, or odd behaviour?


About the DB schema, you can execute:

$ mysqldump -u oneadmin -poneadmin --database opennebula --no-data

The host information is stored in the 'host_pool' table, you will see that
the whole XML is saved in the 'body' column. You can update the XML
elements and opennebula will load those new values when it is restarted.

We didn't document the DB schema, but the XML stored is documented in these
XSD files [2], they are linked from the API documentation guide [3].


Regards.

[1]
http://dev.opennebula.org/projects/opennebula/repository/revisions/one-3.0/entry/src/cli/one_helper/onehost_helper.rb
[2]
http://dev.opennebula.org/attachments/download/522/xml-rpc-xsd-3.2.0.tar.gz
[3] http://opennebula.org/documentation:rel3.2:api
--
Carlos Martín, MSc
Project Engineer
OpenNebula - The Open-source Solution for Data Center Virtualization
www.OpenNebula.org | cmartin at opennebula.org |
@OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>



On Thu, Mar 22, 2012 at 5:18 PM, Steffen Neumann <sneumann at ipb-halle.de>wrote:

> Hi,
>
> we have a mid-sized cluster running ONE-3.0
> on top of Ubuntu 11.10. We have several cases
> where the ACPU calculation is in an inconsistent state.
>
>        ID NAME               RVM   TCPU   FCPU   ACPU   TMEM   FMEM   AMEM
>   STAT
>        32 node-blc17           3   2400    164  -1600  94.6G  27.8G -35014
>     on
>
> It should be
>
>        TCPU - ( sum of all running VCPU )*100
>
> on this host, and definitely not negative...
>
> Note that the onehost list shows STAT=on, while onehost show (see below)
> still shows confusingly the error from earlier this afternoon.
>
> Question(s):
>
> How Do I manually sanitize the ACPU count on this host ?
> We're using mysql. I only found the "Database Schema for Accounting",
> but no documentation for the "normal" schema. In which table
> do I have to change what ?
>
> It would be a good feature if a re-calculation of ACPU
> could be triggered, based on all VMs currently allocated to this host.
>
> Any idea how that could have happened in first place,
> so we can avoid it in the future ?
>
> Yours,
> Steffen
>
>
> On Thu, 2011-07-07 at 10:22 +0200, Carlos Martín Sánchez wrote:
> >                           Subject:
> > Re: [one-users] VMs in PENDING
> > [was: Fixing up USED / FREECPU ?]
> ...
> > Maybe these kind of inconsistencies could be managed by the new onedb
> > command, we'll consider adding this feature for next releases.
>
>
>
> HOST 32 INFORMATION
> ID                    : 32
> NAME                  : node-blc17
> STATE                 : MONITORED
> IM_MAD                : im_kvm
> VM_MAD                : vmm_kvm
> TM_MAD                : tm_shared
>
> HOST SHARES
> MAX MEM               : 99202928
> USED MEM (REAL)       : 70086068
> USED MEM (ALLOCATED)  : 134217728
> MAX CPU               : 2400
> USED CPU (REAL)       : 1411
> USED CPU (ALLOCATED)  : 4000
> RUNNING VMS           : 3
>
> MONITORING INFORMATION
> ARCH=x86_64
> CLUSTER=default
> CPUSPEED=2300
> ERROR=[
>  MESSAGE="Error monitoring host 32 : MONITOR FAILURE 32 -
> ",
>  TIMESTAMP="Thu Mar 22 15:51:48 2012" ]
> FREECPU=988.8
> FREEMEMORY=29116860
> HOSTNAME=node-blc17
> HYPERVISOR=kvm
> MODELNAME="AMD Opteron(tm) Processor 6176"
> NETRX=0
> NETTX=0
> TOTALCPU=2400
> TOTALMEMORY=99202928
> USEDCPU=1411.2
> USEDMEMORY=70086068
>
> --
> IPB Halle                    AG Massenspektrometrie & Bioinformatik
> Dr. Steffen Neumann          http://www.IPB-Halle.DE
> Weinberg 3                   http://msbi.bic-gh.de
> 06120 Halle                  Tel. +49 (0) 345 5582 - 1470
>                                  +49 (0) 345 5582 - 0
> sneumann(at)IPB-Halle.DE     Fax. +49 (0) 345 5582 - 1409
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120323/90c1347f/attachment-0003.htm>


More information about the Users mailing list