I created a patch file and compiled net-snmp again but don't see a change in behavior.
Code
cd ~/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.2-devel/.stamps
rm -r net-snmp
cd ~/LibreELEC.tv/packages/addons/service/net-snmp/patches
vi net-snmp-0004-memavailable.patch
cp ~/LibreELEC.tv/packages/addons/service/net-snmp/package.mk ~/LibreELEC.tv/packages/addons/service/net-snmp/package.mk.orig
sed -i 's/PKG_VERSION="5.8"/PKG_VERSION="5.9"/g' ~/LibreELEC.tv/packages/addons/service/net-snmp/package.mk
sed -i 's/PKG_SHA256="b2fc.*"/PKG_SHA256="04303a66f85d6d8b16d3cc53bde50428877c82ab524e17591dfceaeb94df6071"/g' ~/LibreELEC.tv/packages/addons/service/net-snmp/package.mk
sed -i 's/PKG_REV="106"/PKG_REV="107"/g' ~/LibreELEC.tv/packages/addons/service/net-snmp/package.mk
cd ~/LibreELEC.tv/
PROJECT=RPi ARCH=arm DEVICE=RPi2 scripts/create_addon net-snmp
Code
CLEAN net-snmp
* Removing /home/<user>/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.2-devel/net-snmp-5.9 ...
UNPACK net-snmp
APPLY PATCH (common) packages/addons/service/net-snmp/patches/net-snmp-0001-read_config.c.patch
patching file snmplib/read_config.c
Hunk #1 succeeded at 1642 (offset 24 lines).
APPLY PATCH (common) packages/addons/service/net-snmp/patches/net-snmp-0002-net-snmp-create-v3-user.in.patch
patching file net-snmp-create-v3-user.in
Hunk #1 succeeded at 5 with fuzz 2 (offset -23 lines).
APPLY PATCH (common) packages/addons/service/net-snmp/patches/net-snmp-0003-config.sub.patch
(Stripping trailing CRs from patch; use --binary to disable.)
patching file config.sub
patch unexpectedly ends in middle of line
Hunk #3 succeeded at 1173 with fuzz 1.
APPLY PATCH (common) packages/addons/service/net-snmp/patches/net-snmp-0004-memavailable.patch
patching file agent/mibgroup/hardware/memory/memory_linux.c
patching file agent/mibgroup/ucd-snmp/memory.c
patching file agent/mibgroup/ucd-snmp/memory.h
patching file include/net-snmp/agent/hardware/memory.h
patching file mibs/UCD-SNMP-MIB.txt
Display More
Code
$ snmpwalk -v 1 -c libreelec -m "/home/pi/.snmp/mibs/UCD-SNMP-MIB.txt" -Oaf 192.168.178.22 .1.3.6.1.4.1.2021.4
.iso.org.dod.internet.private.enterprises.ucdavis.memory.memIndex.0 = INTEGER: 0
.iso.org.dod.internet.private.enterprises.ucdavis.memory.memErrorName.0 = STRING: swap
.iso.org.dod.internet.private.enterprises.ucdavis.memory.memTotalSwap.0 = INTEGER: 0 kB
.iso.org.dod.internet.private.enterprises.ucdavis.memory.memAvailSwap.0 = INTEGER: 0 kB
.iso.org.dod.internet.private.enterprises.ucdavis.memory.memTotalReal.0 = INTEGER: 765828 kB
.iso.org.dod.internet.private.enterprises.ucdavis.memory.memAvailReal.0 = INTEGER: 33872 kB
.iso.org.dod.internet.private.enterprises.ucdavis.memory.memTotalFree.0 = INTEGER: 33872 kB
.iso.org.dod.internet.private.enterprises.ucdavis.memory.memMinimumSwap.0 = INTEGER: 16000 kB
.iso.org.dod.internet.private.enterprises.ucdavis.memory.memShared.0 = INTEGER: 12620 kB
.iso.org.dod.internet.private.enterprises.ucdavis.memory.memBuffer.0 = INTEGER: 42468 kB
.iso.org.dod.internet.private.enterprises.ucdavis.memory.memCached.0 = INTEGER: 385780 kB
.iso.org.dod.internet.private.enterprises.ucdavis.memory.memSwapError.0 = INTEGER: error(1)
.iso.org.dod.internet.private.enterprises.ucdavis.memory.memSwapErrorMsg.0 = STRING: Running out of swap space (0)
Display More
Code
$ snmpwalk -v 1 -c libreelec -m "/home/pi/.snmp/mibs/UCD-SNMP-MIB.txt" -Oan 192.168.178.22 .1.3.6.1.4.1.2021.4
.1.3.6.1.4.1.2021.4.1.0 = INTEGER: 0
.1.3.6.1.4.1.2021.4.2.0 = STRING: swap
.1.3.6.1.4.1.2021.4.3.0 = INTEGER: 0 kB
.1.3.6.1.4.1.2021.4.4.0 = INTEGER: 0 kB
.1.3.6.1.4.1.2021.4.5.0 = INTEGER: 765828 kB
.1.3.6.1.4.1.2021.4.6.0 = INTEGER: 33304 kB
.1.3.6.1.4.1.2021.4.11.0 = INTEGER: 33304 kB
.1.3.6.1.4.1.2021.4.12.0 = INTEGER: 16000 kB
.1.3.6.1.4.1.2021.4.13.0 = INTEGER: 12620 kB
.1.3.6.1.4.1.2021.4.14.0 = INTEGER: 42476 kB
.1.3.6.1.4.1.2021.4.15.0 = INTEGER: 385812 kB
.1.3.6.1.4.1.2021.4.100.0 = INTEGER: error(1)
.1.3.6.1.4.1.2021.4.101.0 = STRING: Running out of swap space (0)
Display More