WIth php5-snmp installed, tried snmpwalk through php:
1 2 3 4 5 6 7 | <?php $a = snmpwalk("127.0.0.1", "public", ""); foreach ($a as $val) { echo "$val\n"; } ?> |
WIth php5-snmp installed, tried snmpwalk through php:
1 2 3 4 5 6 7 | <?php $a = snmpwalk("127.0.0.1", "public", ""); foreach ($a as $val) { echo "$val\n"; } ?> |
After installation in Ubuntu, snmp will run as follow:
$ ps -ef | grep snmp snmp 9879 1 0 09:58 ? 00:00:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1 |
Omitting 127.0.0.1 from /etc/default/snmpd
:
8 | SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid' |
will allow other host to listen to ours.