1

I've been having issues with my wifi with frequent drop outs. So I've decided to check if the drop outs are wifi related or internet related by connecting my laptop via ethernet and monitoring it for drop outs. I was wondering if there's a linux tool I can use that will give me information about internet strength or bandwidth (or something) over a period of time. I'd rather not have to sit at my computer and constant browse the internet to make sure it's not dropping out.

Using Ubuntu 14.04

Thanks.

  • 2
    You might consider using mtr to monitor the packet loss between you, the gateway, and the WAN. This should give you some idea about where the loss occurs. – Chris Down Jun 17 '14 at 5:31
  • Could you by chance give me a general idea of how to do this? – Achaldo Jun 17 '14 at 8:46
0

You're looking for a network monitor. There are a very large number of options for this task, and the biggest determiner for what you want probably comes down to preference.

Personally, I am most familiar with a utility called iftop. It is, as its name implies, top but for network activity. It will help you track transfer rates over time, but will not necessarily help you keep track of connectivity itself. For that, logging the connected status is probably much simpler. Since you did not mention what distro you happen to be using, I cannot say for sure what methods are available to you. But, at minimum, you can probably look at the output of dmesg.

It is also possible, for example, if your distro uses systemd, that you will be able to query your network manager's status directly. E.g., if using systemd-networkd as the network manager, you could easily just take a look at the service status:

$ systemctl status systemd-networkd
● systemd-networkd.service - Network Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; disabled)
   Active: active (running) since Sat 2014-06-14 22:07:21 CDT; 2 days ago
     Docs: man:systemd-networkd.service(8)
Main PID: 596 (systemd-network)
  Status: "Processing requests..."
  CGroup: /system.slice/systemd-networkd.service
          └─596 /usr/lib/systemd/systemd-networkd

Jun 16 23:59:00 Icarus systemd-networkd[596]:           wlp3s0: lost carrier
Jun 16 23:59:00 Icarus systemd-networkd[596]:           wlp3s0: DHCP lease lost
Jun 16 23:59:02 Icarus systemd-networkd[596]:           wlp3s0: gained carrier
Jun 16 23:59:05 Icarus systemd-networkd[596]:           wlp3s0: DHCPv4 address 192.168.0.5/24 via 192.168.0.1
Jun 16 23:59:05 Icarus systemd-networkd[596]:           wlp3s0: link configured
Jun 17 00:02:25 Icarus systemd-networkd[596]:           wlp3s0: lost carrier
Jun 17 00:02:25 Icarus systemd-networkd[596]:           wlp3s0: DHCP lease lost
Jun 17 00:02:27 Icarus systemd-networkd[596]:           wlp3s0: gained carrier
Jun 17 00:02:27 Icarus systemd-networkd[596]:           wlp3s0: DHCPv4 address 192.168.0.5/24 via 192.168.0.1
Jun 17 00:02:27 Icarus systemd-networkd[596]:           wlp3s0: link configured

This output shows that my interface has gone down several times in the last two days (these happen to be due to suspending my laptop, but the principle is the same).

  • Thanks! I'm using ubuntu 14.04. Also I'm kind of new to linux. How do I got about logging the connected status? Would it be something along the lines of iftop > log? – Achaldo Jun 17 '14 at 5:33
  • No, if you really want to check connectivity, then iftop probably isn't the way to go. I was more thinking of parsing dmesg. Though, honestly, Chris Down's strategy is likely a better starting place. – HalosGhost Jun 17 '14 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.