maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Request] WiFi meter (https://talk.maemo.org/showthread.php?t=68877)

bigears5000 2011-01-24 20:42

Re: [Request] WiFi meter
 
Yes it does show the total. Perhaps I am just being sad, but I would still like to know how much of the total my N900 is using. I am faily sure there are tools for the pc to show totals for each individual device, but I would find it handy just to have a small widget like dataplan monitor, directly on the N900. Anyway, it was only a request. I must be sad, because if it would be much use to other people, it would have been made by now!

Joorin 2011-01-25 00:09

Re: [Request] WiFi meter
 
@bigears5000
You're not sad at all. The described use case makes sense (even though I didn't think of that setup from the start, WiFi being "free" data transfer in my world).

So, just to get the ball rolling: the network driver keeps track of both the number of packets and bytes sent and received. This information is available using the /sbin/ifconfig command. With some creative use of grep and sed, I'm sure it'd be easy to use some widget based application to dig this out and display it. QueenBeacon perhaps?

These counters are reset at reboot and unloading of the kernel module but as an initial hack, it might be enough to at least keep track of the general usage.

Mentalist Traceur 2011-01-25 07:57

Re: [Request] WiFi meter
 
You can also get the same data in:

/sys/class/net/wlan0/statistics/tx_bytes
/sys/class/net/wlan0/statistics/rx_bytes
/sys/class/net/wlan0/statistics/tx_packets
/sys/class/net/wlan0/statistics/rx_packets

(Where RX is received, TX is transmitted. Folders in net only show up if that interface exists. So if WiFi is unloaded entirely, it doesn't exist. If WiFi is loaded but not connected, it exists. Also, every time the interface disappears [unload driver / reboot], the packet count stops. So you'd have to add the value to the 'last' value, and save the final value as the 'last' every time the interface goes down, and/or occasionally [to prevent GBs of traffic count to be lost because of a sudden battery-flies-out incident.)

theonelaw 2011-01-25 08:51

Re: [Request] WiFi meter
 
conky ? http://talk.maemo.org/showthread.php?t=64434
never have set it for wifi but it should work.
it shows a lot but maybe you mean just logged data throughput?

On my Mandriva machines we have net monitor - very nice.
gkrelim is another that comes to mind...


All times are GMT. The time now is 07:10.

vBulletin® Version 3.8.8