Examples
banshee/examples-collection/examples/protocols/
snmp-walk
Example: snmp.walk, a whole branch; the number of programs running on a device.
par banshee1 installation1 version
Publiée le 27 octobre 2026. First version in this collection.
Protocol: snmp.walk
snmp.walk reads a whole branch at once and returns array(suffix => value): here, hrSWRunName, one entry per program running on the device, counted.
How to read it
- The suffix is what follows the OID asked: for
hrSWRunName, the index of each program. - An empty branch is an answer, an empty array, not a failure: a device without the branch returns 0 programs. To tell "nothing" from "not served", read one OID first with
snmp.get. list.countcounts the elements of an array.
To adapt it
foreach ($names as $index => $name)goes over the branch, the suffix and the value (seeexamples/watches/deviate).- Several columns of the same table, lined up by index:
snmp.table(seeexamples/protocols/snmp-table).