Hi Steffen,<div><br></div><div>The ACPU column is not stored in the DB, it is calculated in the CLI command, take a look at [1].</div><div>The value shown is:</div><div><br></div><div>HOST/HOST_SHARE/MAX_CPU - HOST/HOST_SHARE/CPU_USAGE</div>

<div><br></div><div>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.</div><div><div>If you execute "onehost show <id> -x", you will get the full host XML information.</div>

</div><div><br></div><div>In your case, ACPU is 2400 - 4000</div><div><br></div><div>Can you check the actual CPU sum of the 3 VMs running on this host? It should be 40, the above values are percentages.</div><div>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?</div>

<div><br></div><div><br></div><div>About the DB schema, you can execute:</div><div><br></div><div>$ mysqldump -u oneadmin -poneadmin --database opennebula --no-data</div><div><br></div><div>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.</div>

<div><br></div><div>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].</div><div><br></div><div><br></div><div>Regards.</div>

<div><br></div><div>[1] <a href="http://dev.opennebula.org/projects/opennebula/repository/revisions/one-3.0/entry/src/cli/one_helper/onehost_helper.rb">http://dev.opennebula.org/projects/opennebula/repository/revisions/one-3.0/entry/src/cli/one_helper/onehost_helper.rb</a></div>

<div>[2] <a href="http://dev.opennebula.org/attachments/download/522/xml-rpc-xsd-3.2.0.tar.gz">http://dev.opennebula.org/attachments/download/522/xml-rpc-xsd-3.2.0.tar.gz</a></div><div>[3] <a href="http://opennebula.org/documentation:rel3.2:api">http://opennebula.org/documentation:rel3.2:api</a></div>

<div>--<br>Carlos Martín, MSc<br>Project Engineer<br>OpenNebula - The Open-source Solution for Data Center Virtualization<div><span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a> | <a href="http://twitter.com/opennebula" target="_blank">@OpenNebula</a></span><span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="mailto:cmartin@opennebula.org" style="color:rgb(42,93,176)" target="_blank"></a></span></div>

<br>
<br><br><div class="gmail_quote">On Thu, Mar 22, 2012 at 5:18 PM, Steffen Neumann <span dir="ltr"><<a href="mailto:sneumann@ipb-halle.de">sneumann@ipb-halle.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

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