Re: RFC: NetworkManager Device Statistics
- From: Tony Espy <espy canonical com>
- To: Thomas Haller <thaller redhat com>, "networkmanager-list gnome org" <networkmanager-list gnome org>, Alfonso Sanchez-Beato <alfonso sanchez-beato canonical com>
- Subject: Re: RFC: NetworkManager Device Statistics
- Date: Wed, 25 May 2016 19:42:18 -0400
On 05/25/2016 12:10 PM, Thomas Haller wrote:
On Tue, 2016-05-24 at 12:51 -0400, Tony Espy wrote:
We have a new requirement to add a data activity indicator to Ubuntu
Touch for certification in certain markets.
We've had some internal debate about whether or not we should extend
NetworkManager to provide this information to the rest of the system
vs.
adding logic directly to our touch-specific network indicator.
Hi Tony,
IMO it would be interested in having this in NetworkManager, and I
think we would be willing to help with implementation.
That's great news!
I've CC'ed Alfonso Sanchez-Beato, who's the guy on our team who's been
working on the DBus interface.
He's on the mailing list, but only receives it in digest form currently.
The current prototype is based on a similar facility in Connman, and
involves RTM_GETLINK polling to retrieve device-specific Rx and Tx
statistics.
Do you have a prototype available somewhere?
https://git.launchpad.net/~morphis/+git/dev-tools/tree/rtnl-monitor.c
Connman's API can be seen here:
https://git.kernel.org/cgit/network/connman/connman.git/tree/doc/coun
ter-api.txt
https://git.kernel.org/cgit/network/connman/connman.git/tree/doc/mana
ger-api.txt#n90
Our proposed implementation involves extending
NMPlatform/NMLinuxPlatform and adding some new properties to the
NetworkManager.Device interface:
* TxBytes, TxPackets, [calculated TxRate (byte/s)] and Rx equivalents
* EnableStatProps : boolean property to enable/disable device
statistics
* StatPropsRefreshRateMs : refresh rate for Tx/Rx properties in
milliseconds
An alternative to extending the Device interface would be adding a
dedicated Device.Statistics interface; and perhaps a Device
interface
method ( vs. the EnableStatProps property ) to control
enabling/disabling collection of statistics on a per-device basis.
The idea behind EnableStatProps is to avoid overloading the system
with
PropertiesChanged signals. The Tx/Rx properties will not refresh if
EnableStatProps is false, and will refresh, sending
PropertiesChanged
signals with the rate specified in StatPropsRefreshRateMs, when true.
In our case, we'd explicitly disable statistics when the screen on a
device is turned off.
Maybe EnableStatProps could be dropped, and is implicit by
setting StatPropsRefreshRateMs to zero.
I'll let you guys hash this out with Alfonso.
Thanks!
/tony
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]