===== SNMP commands examples =====
This section provides some useful SNMP commands.
These commands can be executed from any gateway located in the same local network as the target gateway.
You may need to install an SNMP client, for example a snmp package on Linux-based systems.
Refer to the [[https://wikikerlink.fr/wanesy-ran/doku.php?id=wiki:wiki3:snmp_mib|MIBs descriptions]] if you want to get details about the following commands.
The gateway 7276FF002E0505AE is taken as an example.
=== Get the CPU load of a gateway ===
# snmpget -v 2c -c 7276FF002E0505AE 192.168.5.172:10161 1.3.6.1.4.1.46911.1.2.1.1.0
iso.3.6.1.4.1.46911.1.2.1.1.0 = Gauge32: 6
=== Get the RAM usage of a gateway ===
# snmpget -v 2c -c 7276FF002E0505AE 192.168.5.172:10161 1.3.6.1.4.1.46911.1.2.6.1.0
iso.3.6.1.4.1.46911.1.2.6.1.0 = Gauge32: 46
=== Reboot a gateway ===
This feature uses 2 SNMP requests: *
* the first will set the command to be executed,
* the second will actually trigger it.
# snmpset -v 2c -c 7276FF002E0505AE 192.168.5.172:10161 1.3.6.1.4.1.46911.14.1.0 s "reboot"
iso.3.6.1.4.1.46911.14.1.0 = STRING: "reboot"
# snmpset -v 2c -c 7276FF002E0505AE 192.168.5.172:10161 1.3.6.1.4.1.46911.14.4.0 i 1
iso.3.6.1.4.1.46911.14.4.0 = INTEGER: 1