5295N/AInstall snmp:
5295N/A$ pkg install system/management/snmp/net-snmp
5295N/A
5295N/AEnable snmp:
5295N/A$ svcadm enable svc:/application/management/net-snmp:default
5295N/A
5295N/AMake sure snmp works:
5295N/A$ snmpget -v2c -c public localhost sysUpTime.0
5295N/A
5295N/ADo some networking traffic:
5295N/A$ while : ; do rm -f /home/vmarek/tmp/gs ; cp /usr/bin/gs /home/vmarek/tmp; done &
5295N/A
5295N/ATest mrtg:
5295N/A$ rm -rf /var/tmp/mrtg && mkdir -p /var/tmp/mrtg
5295N/A$ cfgmaker --global "workdir: /var/tmp/mrtg" public@localhost > /var/tmp/mrtg.cfg
5596N/A
5596N/A
5596N/AOpen /var/tmp/mrtg.cfg and make sure that the configuration is not all
5596N/Acommented out. There may for example be:
5596N/A
5596N/A### The following interface is commented out because:
5596N/A### * has no ifSpeed property
5596N/A
5596N/AIn such case one has to uncomment whole interface config and modify the line like
5596N/A
5596N/AMaxBytes[localhost_2]: 125000000
5596N/A
5596N/A
5295N/A$ set -x; for i in 1 2 3 4 5 6 ; do env LANG=C /usr/bin/mrtg /var/tmp/mrtg.cfg; sleep 600; done
5295N/A
5295N/AAfter 30 minutes display the generated html in /var/tmp/mrtg. You should see
5295N/Asome data.