Install snmp:
$ pkg install system/management/snmp/net-snmp
Enable snmp:
$ svcadm enable svc:/application/management/net-snmp:default
Make sure snmp works:
$ snmpget -v2c -c public localhost sysUpTime.0
Do some networking traffic:
Test mrtg:
$ rm -rf /var/tmp/mrtg && mkdir -p /var/tmp/mrtg
$ cfgmaker --global "workdir: /var/tmp/mrtg" public@localhost > /var/tmp/mrtg.cfg
Open /var/tmp/mrtg.cfg and make sure that the configuration is not all
commented out. There may for example be:
### The following interface is commented out because:
### * has no ifSpeed property
In such case one has to uncomment whole interface config and modify the line like
MaxBytes[localhost_2]: 125000000
$ 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
After 30 minutes display the generated html in /var/tmp/mrtg. You should see
some data.