run snmp/test_snmp_memory.py::test_snmp_memory_load
Describe the results you received:
Fails with error Failed: sysTotalFreeMemory differs by more than 4 or Failed: sysTotalFreeMemory differs by more than 8 on platforms with ~4G memory.
Issues:
nohup python /tmp/memory.py > /dev/null 2>&1 & is executed on the DUT before the test begins.
When this command is run on device < 4G of total memory, the device often reboots.
nohup python /tmp/memory.py > /dev/null 2>&1 & - This command execution finishes very quickly on DUTs with >=8 G total memory.
Observation:
The FreeMemory obtained by OID: 1.3.6.1.4.1.2021.4.11.0 is obtained from snmpd computation.
Seems like the FreeMemory coming from inside SNMP docker is not exactly the same as the host FreeMemory, though the /proc/meminfo is not containerized.
Captured the Free Memory and Available memory from host/docker/snmp using the script below:
Observing that the Available memory computed based on memory usage OID "1.3.6.1.4.1.6027.3.10.1.2.9.1.5.1" is closer to the Available memory of the host. Loading of memory is also done on the host.
Question:
OID 1.3.6.1.4.1.2021.4.11.0 could be showing FreeMemory of SNMP docker and not the host, so loading memory on the host and comparing with FreeMemory on host can be incorrect way of testing?
Describe the results you expected:
Additional information you deem important:
**Output of `show version`:**
```
(paste your output here)
```
**Attach debug file `sudo generate_dump`:**
```
(paste your output here)
```
Description
Steps to reproduce the issue:
Describe the results you received: Fails with error Failed: sysTotalFreeMemory differs by more than 4 or Failed: sysTotalFreeMemory differs by more than 8 on platforms with ~4G memory.
Issues:
nohup python /tmp/memory.py > /dev/null 2>&1 &
is executed on the DUT before the test begins. When this command is run on device < 4G of total memory, the device often reboots.nohup python /tmp/memory.py > /dev/null 2>&1 &
- This command execution finishes very quickly on DUTs with >=8 G total memory.Observation: The FreeMemory obtained by OID: 1.3.6.1.4.1.2021.4.11.0 is obtained from snmpd computation. Seems like the FreeMemory coming from inside SNMP docker is not exactly the same as the host FreeMemory, though the /proc/meminfo is not containerized. Captured the Free Memory and Available memory from host/docker/snmp using the script below:
Observing that the Available memory computed based on memory usage OID "1.3.6.1.4.1.6027.3.10.1.2.9.1.5.1" is closer to the Available memory of the host. Loading of memory is also done on the host.
Question:
Describe the results you expected:
Additional information you deem important: