Measuring which app eats the bandwidth

asked 2015-01-07 15:38:36 +0200

tadzik gravatar image

Android has a nice thingy to break down the cellular network usage by app, so you can see that, for instance, twitter ate 20MB last week. There is nethogs in openrepos, but it only shows the usage at a specific point in time, as in "now it uses 20 KB/s", and has no capability of accumulating the data in any way. It would be nice to have some app/feature that does this, especially given the amount of complaints about Sailfish's network hungriness.

edit retag flag offensive close delete

Comments

hmm, it might not be trivial to do. I know that iptables can do traffic accounting, but I'm not sure if it can do it per-application?

sandsmark ( 2015-01-07 17:45:24 +0200 )edit

sandsmark: nethogs is capable of that, so a lot of code could be reused from it, it's just a matter of summing it up over time.

tadzik ( 2015-01-07 21:18:14 +0200 )edit

I doubt that the way nethogs works would scale, it would probably eat an incredible amount of CPU.

sandsmark ( 2015-01-07 21:27:53 +0200 )edit

I checked and you're correct; on my beefy laptop nethogs eats about 5-8% CPU all the time. I'm more inclined to blame it on bad design rather than technical impossibility, but it may be better to check/try rather than jump to conclusions.

tadzik ( 2015-01-07 21:33:22 +0200 )edit