Reliance NetConnect NetworkManager and data usage


Posted: 2009/05/15 15:30:16 | Source | More posts about Fedora FOSS News

As I moved into a new apartment I am using a Reliance NetConnect these days. It is having a 10GB data usage per month limit. I was looking for a way to keep the record data usage by this device. There are couple of applications which shows current usage very well, but they don’t provide proper solution to record and query the usage records. So I started poking around nm-applet to find a way to record the data usage, Dan Williams helped a lot by reviewing the patch and we continously discussed to imporve in this area. Dan will probably make this feature available in future by NetworkManager codebase itself.

So, for the time being if you are using any mobile broadband device and want to track your usage record, I have patched versions of network-manager-applet available (patched against the latest svn trunk).

Download: the patch, NetworkManager srpm, F-10 rpm, F-11 rpm Dan is having a better verion of the patch here which I will put in a later release of the rpm.

Now this is a old version as of RPM release is considered. You have to remove your current NetworkManager-gnome package then install this new one. After that you have to relogin or reboot. To gather the data properly you have to “disconnect” through nm-applet only.

To view your usage use this python script. ./nm-data-usage will give you today’s access record, if you want to have current month’s usage record ./nm-data-usage -m

Access record for May 2009

Connection Date Started Stopped Data IN Data OUT

reliance    08/05/09        12:12:45        12:12:55            0 KB                    0 KB
reliance    08/05/09        12:13:39        12:21:32         7.46 MB                  680 KB
reliance    08/05/09        12:56:25        14:49:45        46.73 MB                 4.95 MB
reliance    08/05/09        17:34:49        17:36:38          804 KB                  104 KB
reliance    08/05/09        17:47:56        17:55:19         3.48 MB                  919 KB
reliance    08/05/09        17:55:22        18:22:40         6.17 MB                 1.57 MB
reliance    08/05/09        18:35:46        18:39:59          821 KB                   77 KB
reliance    08/05/09        19:23:07        01:12:02        55.71 MB                 9.70 MB
reliance    09/05/09        08:22:49        08:37:26         4.18 MB                  996 KB
reliance    09/05/09        08:37:57        09:34:09        13.14 MB                 3.82 MB
reliance    09/05/09        09:34:11        09:46:55        13.86 MB                 3.98 MB
reliance    10/05/09        07:56:21        11:12:18         7.73 MB                 2.63 MB
reliance    10/05/09        12:15:53        12:18:16          944 KB                  222 KB
reliance    10/05/09        12:18:47        12:19:30            5 KB                    0 KB
reliance    10/05/09        12:19:35        12:52:21         4.52 MB                 1.35 MB
reliance    10/05/09        12:52:38        13:08:07         6.03 MB                 1.59 MB
reliance    10/05/09        13:08:09        13:24:03        10.18 MB                 2.60 MB
reliance    11/05/09        19:32:38        21:11:37        14.71 MB                 2.94 MB
reliance    11/05/09        21:12:11        21:13:15          753 KB                   71 KB
reliance    11/05/09        21:22:41        21:33:53          714 KB                   69 KB
reliance    11/05/09        21:41:12        05:41:15        65.19 MB                 9.41 MB
reliance    12/05/09        06:24:25        08:19:35            1 KB                    1 KB
      sm    15/05/09        12:42:55        12:44:34          242 KB                   93 KB

Total data usage : 310.00 MB in current month

I will improve this script to do better query in future.

comments powered by Disqus
Contents © 2004-2014 Kushal Das - Powered by Shonku