0

Quick BackStory: I have got a 4G router that I carry for vacation and my family absolutely burnt through the data plan, so I decided to make a small program that tracks the usage and assigns daily limits.

Here is the link to the source code; the router is a ZTE MF910.

P.S: Code runs on the router

Here is the problem: data that I collected seems to match ifconfig TX/RX bytes; however, neither ifconfig nor my program matches the ISP data.

My ISP suggests that I have used 6-7 GB since yesterday, but my router suggests that I have used about 2.5 GB (and so does my program).

I have also ran this program simultaneously on my computer whilst I downloaded some files. Data from my computer matched the expectations entirely whereas data from my router lagged behind quite a bit. (up to %90)

Any ideas as to why this is so inaccurate on my router?

Here is an ifconfig snippet:

bridge0   Link encap:Ethernet  HWaddr 74:4A:A4:9D:88:3E
      inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
      inet6 addr: fe80::9c2b:10ff:fef9:1c9f/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:1614602 errors:0 dropped:0 overruns:0 frame:0
      TX packets:832006 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:172761946 (164.7 MiB)  TX bytes:836806290 (798.0 MiB)

ecm0      Link encap:Ethernet  HWaddr 74:4A:A4:9D:88:3E
      inet addr:169.254.3.1  Bcast:169.254.3.255  Mask:255.255.255.0
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:16436  Metric:1
      RX packets:6 errors:0 dropped:0 overruns:0 frame:0
      TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:672 (672.0 B)  TX bytes:672 (672.0 B)

rmnet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
      inet addr:178.243.134.235  Mask:255.255.255.0
      inet6 addr: fe80::8f76:7195:71fb:31e6/64 Scope:Link
      UP RUNNING  MTU:1500  Metric:1
      RX packets:832231 errors:0 dropped:0 overruns:0 frame:0
      TX packets:1594840 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:831615144 (793.0 MiB)  TX bytes:184526560 (175.9 MiB)

wlan0     Link encap:Ethernet  HWaddr 74:4A:A4:9D:88:3E  
      inet addr:169.254.1.1  Bcast:169.254.1.255  Mask:255.255.255.0
      inet6 addr: fe80::764a:a4ff:fe9d:883e/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:1844673 errors:0 dropped:0 overruns:0 frame:0
      TX packets:1173053 errors:0 dropped:2405 overruns:0 carrier:2405
      collisions:0 txqueuelen:1000 
      RX bytes:223033656 (212.7 MiB)  TX bytes:864781905 (824.7 MiB)
4
  • Are we talking gigabits (10^9 bits) or GibiBytes (2^30 * 8 bits) in each case? Can you get confirmation from your ISP if they're using binary or decimal for "G", and bits or Bytes for "B"?
    – Spiff
    Commented Aug 6, 2017 at 19:08
  • They use Megabytes, I use the sms service to regularly check my usage. They update it hourly.
    – ulascan
    Commented Aug 6, 2017 at 19:39
  • 1,000,000's of bytes or 1,048,576's of bytes? Also, is it separated out for that router alone or is it all the data usage for all devices on the plan?
    – Spiff
    Commented Aug 7, 2017 at 1:24
  • It is 1,048,576 bytes. The only device on that plan is the router.
    – ulascan
    Commented Aug 7, 2017 at 3:57

0

You must log in to answer this question.

Browse other questions tagged .