LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-18-2017, 11:25 AM   #1
stan ellison
LQ Newbie
 
Registered: Jun 2017
Posts: 7

Rep: Reputation: Disabled
Tracking Data use in mobile broadband


When I used a land line broadband modem I could check my Internet data use using a program called vnstat. Now I have switched to a mobile broadband data dongle, vnstat shows 0 use. Is there an equivalent to vnstat for mobile broadband, a filter for use with mobile broadband or an alternative way of keeping track of how much data I am using? I have Mint 18.1 Cinnamon.
 
Old 09-19-2017, 09:19 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
A web search for data usage mobile broadband turns up a number of links.

Most of them seem to be for proprietary solutions available from various carriers. This one, though,from the Ubuntu forums, may prove useful.

Oh, and welcome to LQ.

Last edited by frankbell; 09-19-2017 at 09:21 PM.
 
Old 09-19-2017, 09:55 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,981

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Hello and welcome to LQ.

This is a good collection of ideas. http://www.binarytides.com/linux-com...nitor-network/

Tell us how your data is connected to pc may help.
 
Old 09-20-2017, 01:25 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by stan ellison View Post
When I used a land line broadband modem I could check my Internet data use using a program called vnstat. Now I have switched to a mobile broadband data dongle, vnstat shows 0 use.
once you have an internet connection, you can measure its data usage.
doesn't matter whether it's wired or wireless.
you might have to tell vnstat to use a different interface?
have a look-see with 'ip link'.
 
Old 09-20-2017, 04:13 PM   #5
stan ellison
LQ Newbie
 
Registered: Jun 2017
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thank you to everyone for your replies. The dongle connects by USB. It's vnstat that I wanted to use. It gives me the exact information I want. My problem was getting it to look at the mobile broadband data dongle instead of the landline modem. I'd previously used ifconfig which produced the same information as ip link.

ip link got me this
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:25:11:59:cc:58 brd ff:ff:ff:ff:ff:ff
3: enp0s26f7u1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 02:0c:e7:0b:01:02 brd ff:ff:ff:ff:ff:ff
1: lo is another dongle, not currently in use.
2: enp2s0 is the old landline modem which is no longer in use.
3: enp0s26f7u1 is, I think, the one I was trying to look at. Just my luck that it was an 11 digit id and I was reading the last digit as 'l' instaed of '1'.

1: lo reads 'Not enough data available yet.' and has done for over 24 hours. That's why I assume it's inactive.
3: enp0s26f7u1 also reads 'Not enough data available yet.' but it has only been up for a short while. I expect I'll know tomorrow if it is the one I want.
 
Old 09-22-2017, 08:41 AM   #6
stan ellison
LQ Newbie
 
Registered: Jun 2017
Posts: 7

Original Poster
Rep: Reputation: Disabled
Over 24 hours later I was still getting 'Not enough data available yet.' I found a web page with the command 'vnstat -l -i enp0s26f7u1' to capture live data use and this showed that 'enp0s26f7u1' was the USB modem and that it was being monitored. Another command on that page was -u to create a new database for enp0s26f7u1. I did this and it worked.
 
Old 09-22-2017, 12:39 PM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
'lo' is the loopback device.
it's not relevant here. ignore it.
the other two - well neither looks like a mobile broadband dongle.
are you actually connected to the internet? <==!!!

what is the manufacturer & model of the dongle? what are its specs? how does it connect? usb?
maybe the output of 'lsusb' can shed some light.
 
Old 09-22-2017, 01:47 PM   #8
stan ellison
LQ Newbie
 
Registered: Jun 2017
Posts: 7

Original Poster
Rep: Reputation: Disabled
Yes I am on line. I'm using it to post this.

It's a Vodafone data dongle. I'm not sure of the model. It's 3G plugged into a USB port.

lsusb gets
Code:
stan@stan-Veriton-L480 ~ $ lsusb
Bus 002 Device 004: ID 13ba:0001 PCPlay Konig Electronic CMP-KEYPAD12 Numeric Keypad
Bus 002 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 19d2:1048 ZTE WCDMA Technologies MSM 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
stan@stan-Veriton-L480 ~ $
The Logitech device is going to be the keyboard, mouse dongle, so it must be the ZTE WCDMA Technologies MSM.

vnstat now gets
Code:
stan@stan-Veriton-L480 ~ $ vnstat

                      rx      /      tx      /     total    /   estimated
 lo: Not enough data available yet.
 enp0s26f7u1:
       Sep '17      7.62 MiB  /    1.19 MiB  /    8.80 MiB  /   10.00 MiB
     yesterday         0 KiB  /       0 KiB  /       0 KiB
         today      7.62 MiB  /    1.19 MiB  /    8.80 MiB  /      12 MiB

 enp2s0:
       Aug '17      1.64 GiB  /  364.74 MiB  /    1.99 GiB
       Sep '17      3.01 GiB  /  644.81 MiB  /    3.64 GiB  /    5.00 GiB
     yesterday         0 KiB  /       0 KiB  /       0 KiB
         today         0 KiB  /       0 KiB  /       0 KiB  /      --    

stan@stan-Veriton-L480 ~ $
looking at those results, they don't look right. I'll check again later but there is not as much use as I would expect to see.

Any Ideas you have would be welcome.
 
Old 09-22-2017, 03:05 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,981

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Don't use vnstat then. Use some of these ideas. http://dsl-n55u.wikidot.com/formatti...-on-the-router
 
Old 09-22-2017, 04:31 PM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
i would expect a normal 3G/4G dongle to show up with a different prefix than enp* (your 'ip link' output) but i might be wrong.

in any case, it's an interface, it must have a name, and whatever you do next you must find that first.
 
Old 09-22-2017, 05:54 PM   #11
stan ellison
LQ Newbie
 
Registered: Jun 2017
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
i would expect a normal 3G/4G dongle to show up with a different prefix than enp* (your 'ip link' output) but i might be wrong.

in any case, it's an interface, it must have a name, and whatever you do next you must find that first.
Do you have suggestions as to how I would do that?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Mobile broadband not working after installing mobile partner J.A.X Linux - Newbie 1 08-17-2015 09:26 AM
mythbuntu and Virgin Mobile Mobile broadband adapter MC 760 Tom Nichol Linux - Networking 2 10-20-2011 07:44 AM
Mobile Broadband Software/Utility That enables Me To Check My Data Bundle Balance? jeeves101 Linux - Software 1 09-16-2011 02:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration