This page last changed on May 21, 2015 by hellion.

Hello everyone!
I have a Linux Mint 17.1 running snmp 5.7.2 and using snmp version 2c but I've some problem with memory oids:
I found oids documentation everywhere and all sites suggest using this oids for memory statistics:

Memory Statistics

Total Swap Size: .
Available Swap Space: .
Total RAM in machine: .
Total RAM used: .
Total RAM Free: .
Total RAM Shared: .
Total RAM Buffered: .
Total Cached Memory: .

when I try to run :
sudo snmpget -v 2c -c "ComunityName" .
#it return the right total memory size (RAM):
iso. = INTEGER: 1025892 and It's right!!

when i try to run:
sudo snmpget -v 2c -c "ComunityName" .
#It should return the Total RAM free but the value returned is greater then total memory size!!
iso. = INTEGER: 1127912

when I try to run:
sudo snmpget -v 2c -c "ComunityName" .
#It should return the Total RAM used but the value returned is equal then total memory free !
iso. = INTEGER: 80432

administrator@mint ~ $ sudo cat /proc/meminfo
MemTotal: 1025892 kB
MemFree: 80488 kB *this value is a little bit different because i run meminfo next...
Buffers: 148184 kB
Cached: 252660 kB
SwapCached: 4 kB
Active: 355116 kB
Inactive: 362692 kB
Active(anon): 188216 kB
Inactive(anon): 177108 kB
Active(file): 166900 kB
Inactive(file): 185584 kB
Unevictable: 0 kB
Mlocked: 0 kB
HighTotal: 135040 kB
HighFree: 11212 kB
LowTotal: 890852 kB
LowFree: 71876 kB
SwapTotal: 1046524 kB
SwapFree: 1046292 kB
Dirty: 36 kB
Writeback: 0 kB
AnonPages: 316996 kB
Mapped: 142940 kB
Shmem: 48360 kB
Slab: 203932 kB
SReclaimable: 192432 kB
SUnreclaim: 11500 kB
KernelStack: 2792 kB
PageTables: 5700 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 1559468 kB
Committed_AS: 1894952 kB
VmallocTotal: 122880 kB
VmallocUsed: 3272 kB
VmallocChunk: 114932 kB
HardwareCorrupted: 0 kB
AnonHugePages: 69632 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 30712 kB
DirectMap2M: 882688 kB

and this is the used ram

  1. dmidecode 2.12
    SMBIOS 2.8 present.

Handle 0x1000, DMI type 16, 23 bytes
Physical Memory Array
Location: Other
Use: System Memory
Error Correction Type: Multi-bit ECC
Maximum Capacity: 1 GB
Error Information Handle: Not Provided
Number Of Devices: 1

Handle 0x1100, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: 1024 MB
Form Factor: DIMM
Set: None
Locator: DIMM 0
Bank Locator: Not Specified
Type: RAM
Type Detail: Other
Speed: Unknown
Manufacturer: QEMU
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Rank: Unknown
Configured Clock Speed: Unknown
Minimum voltage: Unknown
Maximum voltage: Unknown
Configured voltage: Unknown

Does anybody know why snmpget return with wrong values ?Thanks for your time !!

Document generated by Confluence on Jun 05, 2016 09:31