Bug 1402556

Summary: Unable to monitor Shared memory use via .1.3.6.1.4.1.2021 OID
Product: Red Hat Enterprise Linux 6 Reporter: Kyle Walker <kwalker>
Component: net-snmpAssignee: Josef Ridky <jridky>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.9CC: cww, jridky, jsafrane, jwright, kristin
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-15 20:29:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
MemShared fix jsafrane: review+

Description Kyle Walker 2016-12-07 19:57:01 UTC
Description of problem:
 The Linux memory MIB group does not parse the "Shmem" field out of /proc/meminfo. This results in the UCD-SNMP-MIB::memShared.0 being unavailable for RHEL 6 systems.

Version-Release number of selected component (if applicable):
 net-snmp-5.5-57.el6_8.1

How reproducible:
 Easily

Steps to Reproduce:
1. Setup a snmp agent installation
2. Allow access to the .1.3.6.1.4.1.2021 OID
3. Query the OID and look for memShared

Actual results:
 None is returned

Expected results:
 Output similar to the RHEL 7 implementation shown below:

    # snmpwalk -v2c -c public localhost  .1.3.6.1.4.1.2021 | grep memSh
    UCD-SNMP-MIB::memShared.0 = INTEGER: 57616 kB


Additional info:

Comment 1 Josef Ridky 2016-12-08 07:43:04 UTC
Created attachment 1229392 [details]
MemShared fix

The value for MemShared in /proc/meminfo was used and was valid for 2.4 kernels. In 2.6 kernels, it has been dropped completely, which is why memShared.0 is now missing.

This patch should fix described problem.

Comment 3 Jan Safranek 2016-12-12 11:40:56 UTC
Comment on attachment 1229392 [details]
MemShared fix

patch looks OK.

Comment 5 Joe Wright 2017-07-03 21:11:18 UTC
Is there any intent with this to include functionality for 64 bit values

Comment 6 Josef Ridky 2017-07-04 07:43:50 UTC
(In reply to Joe Wright from comment #5)
> Is there any intent with this to include functionality for 64 bit values

This OID (.1.3.6.1.4.1.2021) was registered for the UC Davis ECE Department by Tom Arons. So unless he will decide to change reference [1] for memShared variable from INTEGER32 to INTEGER64, I won't be able to change it due I have to abide his documentation.

[1] http://www.net-snmp.org/docs/mibs/ucdavis.html