After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 601372 - [enh] connection traffic counting and time tracking
[enh] connection traffic counting and time tracking
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: nm-applet
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Dan Williams
NetworkManager maintainer(s)
Depends on:
Blocks: 588870 607673
 
 
Reported: 2009-11-10 09:40 UTC by Daniele Segato
Modified: 2020-11-12 14:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniele Segato 2009-11-10 09:40:18 UTC
Hi,

Quick request:
 - provide a way to monitor how much elapsed time the connection lasted since the establish of the internet connection
 - provide a way to monitor how much internet traffic has been generated by a connection (this session/all times/since last reset ...)

A bit more detailed:

where I leave many kinds of internet connection are very expensive (mobiles one for example) and network manager doesn't provide an easy way to monitor how much time/traffic has been consumed from the time of the connection

(I live in Italy but I suppose that there could be other places where this could be helpful)

Some times ago GnomePPP or things like that was used to connect and they allow you to see information on how much time you was online, with the migration to network-manager this features has gone.

I can't no more see how my internet connection lasted or how much traffic I generated.

there are mainly 3 kinds of payment agreement:
 - pay a fixed amount every month (this is not problematic)
 - the more time you stay connected, the more you pay: usually with anticipated payment every N minutes, for example every 15 minutes you pay for the next 15 minutes; sometimes you can use internet for 3 hours per day and if you overcome that limit you start to pay a lot more and so on
 - the more traffic you generate the more you pay, example: you pay a fixed amount for a bunch of Megabytes a week, if you overcome that limit you start to pay A LOT :)


I think that the more easy to implement is a clock that show you the time since the connection has been established so that the user can easily monitor how much time has been connected.

I don't know which could be the best way to provide some monitor functionality.. may be it could be integrated with the applet or some ad-hoc application that monitor the message bus can be created.

I think that "how" is up to you.

Please don't underestimate this issue, many people here in Italy would just quit Linux/Gnome if they couldn't monitor how much they are paying for being online or they couldn't had control on when they are paying.

Thanks
Comment 1 mantakbilug 2009-11-12 07:20:02 UTC
Hi,

	
I have the same problem too.
It's very important for me to be able to monitor the time of connection.
I think that in Italy many people, who uses mobile connection, have this need.

	
Moreover, Daniele has already described the problem very well.

Bye Bye

Simone
Comment 2 Dan Williams 2009-11-13 19:10:19 UTC
Yep, it's definitely something to do, I think the 0.8.1 target and it could get backported to 0.7 perhaps as well.
Comment 3 Dan Williams 2009-11-13 19:19:53 UTC
This feature should be available for *all* connections actually, not just 3G since it doesn't really make sense to limit it to only 3G.  We should:

1) keep an sqlite database around in /var/lib/NetworkManager/ with a simple table structure with fields for (connection UUID, service name, user-id, user-name, start time, end time, amount of data transferred)

2) provide a generic D-Bus interface to get that information in NetworkManager that returns a dict(string::string) of the values for the query.  Probably something like a new org.freedesktop.NetworkManager.Connection.Statistics interface with a Get(uuid, filter-dict) call, where the dict can contain keys like 'time-after' and 'time-before' that help limit the query.

3) Ability to lock statistics down with PolicyKit so we have the ability to deny a user looking up another user's usage

4) A simple UI showing accumulated totals for the current month or so

5) Possibly additions to the connection editor to set the billing start date, the transfer-amount warning levels, etc.
Comment 4 Daniele Segato 2009-11-13 23:11:49 UTC
This is a great news Dan.

I'll wait forward for this feature!
Thank you for considering my request

Regards,
Daniele
Comment 5 Praveen Thirukonda 2009-11-14 09:37:57 UTC
This is a much needed feature. great to hear it will be done soon.
keep up the good work!
Comment 6 mantakbilug 2009-11-16 14:02:29 UTC
Currently, if I want to connect to 3G network with my phone, I have to enter through the terminal the following command:

rfcomm connect /dev/rfcomm0 00:11:22:33:44:55 1

If I don't enter, Network Manager don't isert my 3G connection in the list of available network resources.

	
I do not know if this can be helpful!

	
Thanks for taking care of the problem!


Simone Corbellini
Comment 7 Dan Williams 2009-11-17 08:29:46 UTC
(In reply to comment #6)
> Currently, if I want to connect to 3G network with my phone, I have to enter
> through the terminal the following command:
> 
> rfcomm connect /dev/rfcomm0 00:11:22:33:44:55 1
> 
> If I don't enter, Network Manager don't isert my 3G connection in the list of
> available network resources.

Bluetooth DUN is not yet supported, but is expected to be supported in NetworkManager 0.8.1.
Comment 8 Jean-Philippe Monteiro 2010-02-11 03:50:01 UTC
Dan, thanks again from Cambodia; as of now, system-monitor only shows total for current connection, while here we need, as proposed in #4, a monthly total.

But  a 'simple' trace of total data/total time + reset button would already be great, since at the end of the day one can just check it - internet so expensive here that no one would forget to check, and I think it would keep the GUI more simple. It would look ultra-cool if simply on the pop-hover balloon - don't even need to click would simply rock. Do we really need to see 'mobile broadband connection' in full? I don't think so, there is room to spare.

Then, don't forget to get us a reset button somewhere: my isp, for instance, bills on 23H59' 27th of the month. (Don't ask).


Cheers, and thanks again for adding the Cambodian Networks in NM.

[and looking forward for bluetooth integration - NM is really 75% why I run Gnome on laptops]

Jean-Philippe
http://tropicalicecube.net
Comment 9 Felix Möller 2010-05-17 10:10:26 UTC
this would in fact be really usefull.
Comment 10 ogiannhs 2010-10-25 13:35:08 UTC
I try to keep my traffic statistics through scripts. When I disconnect from the network ppp creates a syslog entry with the time of the connection and bytes sent and received. I keep a copy of those records, so I can see total for a period of time. I 'll clean up the code and the the scripts to server as a reference. The only probleb is that if I forget to disconnect and just shutdown the pc there is no such entry created, and I loose the statistics for the active connection.
Comment 11 Anderson Souza 2011-08-06 21:06:55 UTC
Well, I have a suggestion that may solve the problem. I posted this suggestion in Ubuntu Brainstorm at this link: http://brainstorm.ubuntu.com/idea/28368/. The idea is simple: with vnstat installed, the network-manager would determine the existence or not of the database for each interface, creating them if necessary through vnstat own and enabling it to monitor the proper active interfaces. By identifying the shutdown interface, network-manager shut down the monitoring vnstat. Then, using the own vnstat, network-manager accesses the data collected and can display them in nm-applet with data from daily and monthly. To reset the data, if the User decides, you can use your own vnstat via this terminal to reset. Vnstat The package can be placed as an optional dependency. If installed, enable the User to view the data, if it remains in its current, without modification. Sorry for my English, it is not good. And thank you for your attention.
Comment 12 Daniele Segato 2012-09-12 07:51:48 UTC
Is there any news about this topic?

it's been 3 years now
Comment 13 Dan Williams 2013-05-21 19:25:03 UTC
More useful info that could be logged:

"It would be nice if when a interface is dropped the stats for that session are logged (uptime, bytes, packets, errors, and if the request was initiated by NM or came up from the physical or PPP layer). When a customer has a flapping interface we can deduce a lot from that."
Comment 14 André Klapper 2020-11-12 14:26:26 UTC
bugzilla.gnome.org is being shut down in favor of a GitLab instance. 
We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time.

If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/

Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).