Measuring consumption and logging network traffic

I’m currently using an Mudi GLE750, and from long time I’m willing to measure the consumption in MBs / GBs of the 4g and WiFi connections.

Both are limited where I’m living at the moment, so at least to compare the real usage from that billed from the providers, and adjust my habits to save more internet data.

I have an 16gb sd card that I can plug on my modem and it can store data.

I was looking for a solution that together with measuring the consumption by hour / day / week / month, as well log all network traffic for me to inspect which applications are hogging data, so I can block them via DNS and save my internet packages.

Would be better if it’s a plug-in / application that I can manage from HTML, something like pi-hole or AdGuard home.

Is there anything that I can use on this sense?

Any light threw in the darkness that I am at the moment will be appreciated. Thank you so much in advance.

i am not sure of the GLI Ui having such a feature but openwrt has this feature addon called vnstat which will do what you need

1 Like

Thanks for adding @jax13

I checked about vnstat and vnstati, but it seems that it don’t have an html ui like pihole or adguard home…

Would you have any tutorial or more information about it to share? Should I just install it from applications-plugins in administration panel? How to configure it to store data in the sad card?

Thanks

if your;re ok with command line , just ssh into router and run

opkg update
opkg install vnstat luci-app-vnstat

This installs vnStat and its LuCI interface.

Then just logout and login from luci/openwrt adn you get a simple interface ,look under status

this should be enough from your purpose.

1 Like

Is there an easy way to reset the stats?

if you are looking to clear vnstat , just clear its db

this should work

/etc/init.d/vnstat stop

vnstat --reset -f


restart vnstat

/etc/init.d/vnstat start

That should do

2 Likes

The traffic statistics for the GL cellular routers is in the development plan.
But not so soon, will definitely be arranged as possible.

3 Likes

This would be an extremely good improvement.
Even advertisable on features list on marketplaces.

@jax13 I have installed vnstat, vnstati and luci-app-vnstat, from the plugins list on Administration Panel of Mudi.

I found out that it creates a log for each of the interfaces, but I`m still not sure which interface is the one that uses to be the WiFi repeater and which interface is the one for the 4g router.

Another thing is that its time format is not the same that I use DD-MM-Y, and I can’t see the option to change it.
A part of it, it seems to be a little limited, just bringing static PNGs, and without keeping a network inspector log, for me to check with what my devices are connecting, under which protocol and for how long and how many data spent on it.

When I have free time Ill search more on internet, to check if I can’t find a more feature richer network inspector and data usage recorder.

Any new suggestions would be appreciated.

check out vnstat config file for date config here:

nano /etc/vnstat.conf

for interface : * Find the Interface section. Add your interfaces, for example:

Interface "br-lan"
Interface "wlan0"
Interface "wwan0"

then restart vnstat

/etc/init.d/vnstat restart

In LuCI To find network interface name: Go to Network > Interfaces . The interface names for different connections, including WiFi and 4G, should be listed here. Look for descriptions or interface names that suggest WiFi (like wlan0 or wwan ) and mobile data (commonly wwan or usb0 for USB-connected 4G devices).

  • Via SSH: Run ifconfig or ip a in the SSH terminal. This command will list all network interfaces, showing current IPs and MAC addresses, which can help determine which interfaces are active for each connection type.

Then enable it

if its still not showing

/etc/init.d/vnstat restart

Protocal mapping is their in

Hope this helps and sorry for the late reply