oid for memory used error

Bug #1321537 reported by Li Xipeng
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Vivek Nandavanam

Bug Description

Actually, oid 1.3.6.1.4.1.2021.4.6.0 is for real memory availale, but it was used as memory used by mistake at hardware memory inspect by using snmp.
See it at ceilometer/hardware/inspector/snmp.py line 61:
_memory_used_oid = "1.3.6.1.4.1.2021.4.6.0"

Li Xipeng (lixipeng)
description: updated
gordon chung (chungg)
Changed in ceilometer:
importance: Undecided → Medium
Li Xipeng (lixipeng)
Changed in ceilometer:
assignee: nobody → Li Xipeng (lixipeng)
Eoghan Glynn (eglynn)
Changed in ceilometer:
status: New → Triaged
Revision history for this message
gordon chung (chungg) wrote :

is there a definitive source for this? i've gone to multiple sites and gotten multiple different answers.

Revision history for this message
Li Xipeng (lixipeng) wrote :

At site "http://oid-info.com/get/1.3.6.1.4.1.2021.4.6.0", it show that OID means "Total RAM used", but
if you use command "snmptranslate 1.3.6.1.4.1.2021.4.6.0" on centos installed with net-snmp and net-snmp-utils, then it will output "UCD-SNMP-MIB::memAvailReal". And on the other hand, when I execute "snmpwalk -c public -v 2c localhost 1.3.6.1.4.1.2021.4.6.0" and "free -m", the result of the former is match the free memory of the latter's, and the result is as the same as get from pysnmp.

Revision history for this message
Li Xipeng (lixipeng) wrote :

At site "http://www.net-snmp.org/docs/mibs/ucdavis.html", you can see that description about "1.3.6.1.4.1.2021.4.6.0":
"The amount of real/physical memory currently unused or available."

Revision history for this message
Luo Gangyi (luogangyi) wrote :

I find the same problem too.

And I think we should add
memBuffer .1.3.6.1.4.1.2021.4.14 and memCached .1.3.6.1.4.1.2021.4.15 in hardware pollster too since memAvailReal alone is not very useful in Linux.

Revision history for this message
gordon chung (chungg) wrote :

is this being actively worked on? because vivek has offered to take it over.

Changed in ceilometer:
milestone: none → kilo-3
Revision history for this message
Vivek Nandavanam (vivek-nandavanam) wrote :
Changed in ceilometer:
assignee: Li Xipeng (lixipeng) → Vivek Nandavanam (vivek-nandavanam)
Revision history for this message
Vivek Nandavanam (vivek-nandavanam) wrote :

Posted another one for the branch here:
https://review.openstack.org/#/c/157275/

Changed in ceilometer:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/157275
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=22783a47258688cdfb4e916488182868827c52a4
Submitter: Jenkins
Branch: master

commit 22783a47258688cdfb4e916488182868827c52a4
Author: vivek.nandavanam <email address hidden>
Date: Wed Feb 18 22:43:35 2015 -0800

    Patch for fixing hardware.memory.used metric

    Change SNMP 'hardware.memory.used' metric
    to reflect (memTotalReal - memAvailReal) which is the used value
    for the memory for a physical machine.

    This has to be done as SNMP does not provide a memory metric
    for used that can be directly used.

    Closes-Bug: #1321537

    Change-Id: Ibd8cd38ef15a9e86ccd942412b80e90e3762dd44

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.