Two weeks ago I switched to FTTH from Xs4all, and I got an new modem, a Fritz!box 7490. Internet from the FTU is connected to the Lan1 port, TV is connected to Lan4, the other ports are used by the internal network. The Fritz 7490 doesn't do SNMP, so I've been looking for a way to monitor the traffic. And this is what I've done:
Beware: Following the upgrade to Fritz!OS 6.20 this construction proved to be unstable, one of the commands or the telnetd contains a memory-leak, causing the modem to crash and reboot periodically.
- enabled telnet access (code #96*7* )
- use a script with expect to get all kinds of information, mainly:
- the output from the command cat /proc/net/avm_pa/vpids
- the output from the command cat /proc/net/dev
- the output from the command cat /proc/uptime
giving me the interface info. The information from /proc/net/dev is used to show the amount of traffic over the port Lan4, so it's showing me the network traffic generated by the televisions. The traffic shown for port Lan1 is way to low, that's probably because the total traffic is coming in over vlan's. The internet traffic information is comming from the first command.
(Mostly borrowed from these three pages: 1, 2 and 3 )
A warning first, enabling telnet gives a special notice in the overview page of the modem, stating "changes not supported by manufacturer" and a link too a page showing recovery info. I can live with that, but with telnet you will be able to make every change you would like, so you will be able to break this.
sample expect script:
spawn telnet fritz.box
send -- "YourPassword\r"
expect "# "
send -- "cat /proc/net/dev \r"
expect "# "
send -- "exit\r" ###end the telnet session and exit the script
and put the output of this in Cacti. This gives me graphs like:
The TV graph shows the difference between SD and HD TV-channels.
For the previous modem (a Fritz!box 7360 connected by ADSL) I could see the difference in IPv4 traffic and IPv6 traffic over the ADSL interface (using /sbin/showdslstat). For now, I'm not able to see that.