I want to make something clear: when I posted about the "new bandwidth monitor", I was referring ONLY to the back-end. The front end should still be identical to before. I am planning improvements to the front end, but I need to get the back-end (which is now capable of doing what you want, where it wasn't before) working properly, and fix all relavent bugs before proceeding. I believe I've already fixed a lot of them, but for the near future I'm going to focus on bug-fixes before implementing the new and improved front-end for the bandwidth monitor. Please be patient.
However... as you request, you CAN do this with the new back-end.
Try running these commands (note there are 3 commands below, but 2 are long, and they wrap):
Code: Select all
wan_if=$(uci -P "/var/state" get network.wan.ifname)
iptables -I FORWARD -o $wan_if -m bandwidth --id upload_traffic --reset_interval 2 --intervals_to_save 449 --type "individual_src"
iptables -I FORWARD -i $wan_if -m bandwidth --id download_traffic --reset_interval 2 --intervals_to_save 449 --type "individual_dst"
You may need to put them in an init script to run when the router boots up.
Then, after you have initialized those iptables rules you can run:
to print real-time upload traffic data for the last 15 minutes (at 2 second intervals) and:
to print download traffic data for the last 15 minutes (at 2 second intervals).