Determining time since connection was established; traffic stats



Hi!

In Sugar, we're showing showing how long a GSM connection has been up as
well as how much traffic has been going over the link. This has been
contributed directly by a Sugar deployment, so I gather it's rather
important for their use case (probably ISPs charging by volume and / or
connection time).

I'm currently investigating bugs [1] in the above support. Apart from
the traffic stats being completely gone in NM 0.9 (Gnome#661808 [2]),
the time is off as well. So far I assumed a simple calculation bug in
Sugar, but during recent tests using NM 0.9 the time was completely off,
rather than just a couple of hours as before (previous tests used NM 0.8
which we're still using in production).

The current Sugar code uses the connection.timestamp [3] settings
attribute to determine the start time of the connection and calculates
the connection time as the delta between current time and start time.
And I guess that's where our problem is: Besides probably not being set
yet when StateChanged(NM_DEVICE_STATE_ACTIVATED) fires, it's also
documented as getting periodically updated by "Settings services" (just
NM nowadays).

Is there any reliable way to determine the connection time
a) with NM 0.8 and
b) with NM 0.9?

Also, what's the chance of traffic stats coming back (in NM 0.9) within
the next few months?

Sascha

[1] https://bugs.sugarlabs.org/ticket/2992
[2] https://bugzilla.gnome.org/show_bug.cgi?id=661808
[3] http://projects.gnome.org/NetworkManager/developers/api/09/ref-settings.html#id408437
-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/

Attachment: signature.asc
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]