# VM Monitoring Information missing in \`onevm list\`

**URL:** https://forum.opennebula.io/t/vm-monitoring-information-missing-in-onevm-list/1587
**Category:** Product Support
**Created:** [December 14, 2015, 12:23pm UTC](https://forum.opennebula.io/t/vm-monitoring-information-missing-in-onevm-list/1587 "2015-12-14T12:23:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![valentin\_bud](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/valentin_bud/32/4364_2.png) [@valentin\_bud](https://forum.opennebula.io/u/valentin_bud)
#### Post date: [December 14, 2015, 12:23pm UTC](https://forum.opennebula.io/t/vm-monitoring-information-missing-in-onevm-list/1587/1 "2015-12-14T12:23:50Z")

</div>

Hello Community,

Following my [LXCoNe](https://github.com/OpenNebula/addon-lxcone) quest I have hit another ‘wall’. The monitoring information pertaining to VMs doesn’t show up in `onevm list` output.

The VMs have the information available in their template and `/var/log/one/oned.log` shows that VMs are successfully monitored.

```
~# onevm list
    ID USER GROUP NAME STAT UCPU UMEM HOST TIME
    37 oneadmin oneadmin djx runn 0 0K yoda 13d 18h47
    38 oneadmin oneadmin djn runn 0 0K yoda 10d 03h25

~# onevm show 38
VIRTUAL MACHINE 38 INFORMATION
ID : 38
NAME : djn
USER : oneadmin
GROUP : oneadmin
STATE : ACTIVE
LCM_STATE : RUNNING
RESCHED : No
HOST : yoda
CLUSTER ID : -1
CLUSTER : default
START TIME : 12/04 08:57:20
END TIME : -
DEPLOY ID : /dev/loop3

VIRTUAL MACHINE MONITORING
NETTX : 197K
NETRX : 197K
USEDCPU : 0.0
USEDMEMORY : 9226.24

PERMISSIONS
OWNER : um-
GROUP : ---
OTHER : ---
...
...

 ~# date
 Mon Dec 14 12:24:26 UTC 2015

~# cat /var/log/one/oned.log | grep "VM 38"
Mon Dec 14 12:21:48 2015 [Z0][VMM][D]: VM 38 successfully monitored: STATE=a USEDMEMORY=9328.64 USEDCPU=2.0 NETTX=193455 NETRX=193455
Mon Dec 14 12:23:02 2015 [Z0][VMM][D]: VM 38 successfully monitored: STATE=a USEDMEMORY=9226.24 USEDCPU=0.0 NETTX=201988 NETRX=201988
Mon Dec 14 12:24:15 2015 [Z0][VMM][D]: VM 38 successfully monitored: STATE=a USEDMEMORY=9226.24 USEDCPU=0.0 NETTX=211740 NETRX=211740

```

Running the monitoring scripts by hand also works, as expected.

```
~# /var/tmp/one/im/lxc.d/poll.sh
VM_POLL=YES
VM=[
 ID=37,
 DEPLOY_ID=one-37,
 POLL="STATE=a USEDMEMORY=10076.16 USEDCPU=0.0 NETTX=279276 NETRX=279276" ]
VM=[
 ID=38,
 DEPLOY_ID=one-38,
 POLL="STATE=a USEDMEMORY=9236.48 USEDCPU=0.0 NETTX=232463 NETRX=232463" ]
VM=[
 ID=42,
 DEPLOY_ID=one-42,
 POLL="STATE=d" ]
VM=[
 ID=43,
 DEPLOY_ID=one-43,
 POLL="STATE=d" ]

```

Can anyone shed some light on this matter? Thanks.

---

<div class="post-metadata">

### Author: ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)
#### Post date: [December 14, 2015, 1:22pm UTC](https://forum.opennebula.io/t/vm-monitoring-information-missing-in-onevm-list/1587/2 "2015-12-14T13:22:45Z")

</div>

Hi valentin\_bud,

I think the variable names that are reported by vmm/lxc/poll are wrong. Could you try the attached patch?

[0001-fix-memory-and-stats-reporting.patch](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/3/3ac5ceaf40280cc2594e10355de993d441309706.patch) (932 Bytes)

> cd /var/lib/one/remotes  
> patch -p1 \< /path/to/the/patch/file

Or just edit `/var/lib/one/remotes/vmm/lxc/poll` and replace:

> ```
> POLL="$POLL USEDMEMORY=${USEDMEMORY}"
> 
> ```

with

> ```
> POLL="$POLL MEMORY=${USEDMEMORY}"
> 
> ```

and for CPU stats:

> ```
> POLL="$POLL USEDCPU=${USEDCPU}"
> 
> ```

with

> ```
> POLL="$POLL CPU=${USEDCPU}"
> 
> ```

Do not forget to propagate the changes to the hosts:

> su - oneadmin  
> onehost sync --force

This should fix the issue.

Kind Regards  
Anton Todorov

---

<div class="post-metadata">

### Author: ![valentin\_bud](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/valentin_bud/32/4364_2.png) [@valentin\_bud](https://forum.opennebula.io/u/valentin_bud)
#### Post date: [December 14, 2015, 1:51pm UTC](https://forum.opennebula.io/t/vm-monitoring-information-missing-in-onevm-list/1587/3 "2015-12-14T13:51:01Z")

</div>

Hello Anton,

Thank you very much for your input. Indeed it works after applying your patch and synchronising the  
remotes.

```
~# onevm list
    ID USER GROUP NAME STAT UCPU UMEM HOST TIME
    37 oneadmin oneadmin djx runn 0.0 7.4M yoda 13d 20h10
    38 oneadmin oneadmin djn runn 0.0 200.7M yoda 10d 04h48

```

Best wishes,  
Valentin

---

<div class="post-metadata">

### Author: ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)
#### Post date: [December 14, 2015, 2:17pm UTC](https://forum.opennebula.io/t/vm-monitoring-information-missing-in-onevm-list/1587/4 "2015-12-14T14:17:22Z")

</div>

Hi Valentin,

Thank you for the feedback. I’ve created a [pull request](https://github.com/OpenNebula/addon-lxcone/pull/3) for upstream merge.

Cheers  
Anton Todorov

---

<div class="post-metadata">

### Author: ![jmdelafe](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/jmdelafe/32/5057_2.png) [@jmdelafe](https://forum.opennebula.io/u/jmdelafe)
#### Post date: [December 14, 2015, 6:47pm UTC](https://forum.opennebula.io/t/vm-monitoring-information-missing-in-onevm-list/1587/5 "2015-12-14T18:47:31Z")

</div>

Hi! Thanks for the report.

About the bug… Following the [Poll Information section](http://docs.opennebula.org/4.14/integration/infrastructure_integration/devel-vmm.html#poll-information) inside the Virtualization section from OpenNebula Integration Guide we noticed that used memory and cpu information should be given as USEDMEMORY and USEDCPU respectively. Seems like the right way of giving this information is the way that atodorov\_storpool shows (thanks for the tip, by the way). We have created a [pull request](https://github.com/OpenNebula/docs/pull/39) for upstream merge in the OpenNebula

Best
