You are not logged in.

#1 2017-06-07 18:52:20

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,028

Network monitoring - CLI Apps

Late last week I noticed that our net speed was very erratic.  Paying for 12 so  ±9 to 12MB or better is OK, but when it drops to 4, 1.5, or 6 I have a tendency to get a bit peeved off.  And we phone Fibertel - I call them Fibbertel.  The street monkey's they hire to answer the phones don't have a clue.  It's always "us" - "You need a new computer your speed is fine. (yea, we got that once)", "We did something to Windows (Yes, got rid of it.)" "unplug the modem and plug it in again" blah blah blah, like a broken record .... I tell them I use Linux and it's like they hit a stone wall, "Just a minute I'll pass you to the technical department."

So I went looking for and and have been playing with some CLI network monitoring tools.

We all know about speedtest-cli right?  These, are not that one:

  1. bmon - AWESOME Love it - ASCII

  2. bwm-ng     - NICE! simple - looks like a vnstat display in live mode

  3. cbm - Color Bandwidth Meter - must play with this

  4. collectl - ASCII - CPU | Disks | Network - Nice one.

  5. dstat - NICE - in colour - CPU | Disk | Net | Paging | System

  6. ifstat - simple list nice

  7. iftop - sudo iftop

  8. iptraf - sudo iptraf

  9. nethogs - sudo nethogs

  10. netload - INSTALL: netdiag** - netload eth0

  11. netwatch - INSTALL: netdiag** - sudo trafshow -i eth0 tcp

  12. nload - AWESOME ASCII nload

  13. pktstat - sudo pkstat

  14. slurm - slurm -s -i eth0 Very Nice!!

  15. speedometer - alias = speed (speedometer -r eth0 -t eth0) AWESOME

  16. tcptrack     - read man requires sudo

  17. trafshow - INSTALL: netdiag** - sudo trafshow - it's OK

  18. vnstat - this I know, this I like - I have it in it's own conky!

Anyway, long story here so to shorten this, the techie came today, a 4 day delay.  He confirmed that there was a problem with the modem, so he replaced it. And he told us that they are working in the area as well so that could account for part of the problem.  Problem solved.

Then he asked me to show him how I test net speeds, his work order started "Customer checks net speed himself" .... sooooooo:
2017-06-07_145849_Scrot11.th.jpg
He didn't say much but took some time to look at it all, then asked for the web browser and did his thing connecting to the secret Fibbertel page they have and checked things.

So what are we looking at.
Across the top is one of speedtest download aliases:
w11 - wget #!v11 ISO

alias w11='wget --output-document=/dev/null http://linuxfreedom.com/crunchbang/crunchbang-11-20130506-i686.iso'

I also have c11 - curl #!11 ISO

alias c11='curl -o /dev/null http://linuxfreedom.com/crunchbang/crunchbang-11-20130506-i686.iso'

As you see, both save the ISO to /dev/null

Now for the four windows:

Top Left: speedometer

Description: measure and display the rate of data across a network connection
Monitor network traffic or speed/progress of a file transfer. The program can be used for cases like:

* how long it will take for 38 MiB transfer to finish
* how quickly is another transfer going
* how fast is the upstream on this ADSL line
* how fast is data written to a filesystem.
Homepage: http://excess.org/speedometer

Top Right: dstat

Description: versatile resource statistics tool
Dstat is a versatile replacement for vmstat, iostat and ifstat. Dstat overcomes some of the limitations of these programs and adds some extra features.

Dstat allows you to view all of your network resources instantly, you can for example, compare disk usage in combination with interrupts from your IDE controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval).

Dstat also cleverly gives you the most detailed information in columns and clearly indicates in what magnitude and unit the output is displayed.

Dstat is also unique in letting you aggregate block device throughput for a certain diskset or network bandwidth for a group of interfaces, i.e. you can see the throughput for all the block devices that make up a single filesystem or storage system.

Dstat's output, in its current form, is not suited for post-processing by other tools, it's mostly meant for humans to interpret real-time data as easy as possible.
Homepage: http://dag.wieers.com/home-made/dstat/

Bottom Left: nload

Description: realtime console network usage monitor
Nload  is a console application which monitors network traffic and bandwidth usage in real time. It displays the total amount of data that has been transferred over a network device since the last reboot, the current  bandwidth usage, and the minimum, maximum, and average bandwidth usage measured since it started.

If the user wants, it is also able to display two bars, similar to  progress bars,  presenting the current load graphically. Support for displaying several devices simultaneously is included.
Homepage: http://www.roland-riegel.de/nload/

Bottom Right: bmon

Description: portable bandwidth monitor and rate estimator
bmon is a commandline bandwidth monitor which supports various output methods including an interactive curses interface, lightweight HTML output but also simple ASCII output.

Statistics may be distributed over a network using multicast or unicast and collected at some point to generate a summary of statistics for a set of nodes.
Homepage: http://www.infradead.org/~tgr/bmon/

Now if you have a net speed problem, select your favourite tool and check things out.  I'll leave the other 15 for you to check out, counting speedtest-cli  big_smile  My quick comments are in the list.

And when w11 is done:

 07 Jun 17 @ 15:04:58 ~
   $ w11
--2017-06-07 15:36:34--  http://linuxfreedom.com/crunchbang/crunchbang-11-20130506-i686.iso
Resolving linuxfreedom.com (linuxfreedom.com)... 64.50.179.217
Connecting to linuxfreedom.com (linuxfreedom.com)|64.50.179.217|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 808452096 (771M) [application/octet-stream]
Saving to: ‘/dev/null’

/dev/null     100%[=======================>] 771.00M   566KB/s   in 10m 13ss

2017-06-07 15:46:48 (1.26 MB/s) - ‘/dev/null’ saved [808452096/808452096]

 
 07 Jun 17 @ 15:46:48 ~
   $ 

Enjoy!

** netdiag - be careful with this one

Description: Net-Diagnostics (trafshow,netwatch,statnet,tcpspray,tcpblast)
Netdiag contains a collection of small tools to analyze network traffic and configuration of remote hosts. It is of invaluable help if your system is showing strange network behaviour and you want to find out what your network is doing. The included tools are tcpblast, netload, trafshow, netwatch, statnet, and tcpspray.

User contributed programs:

  1. Post #2 - Hoas: tcpdump - and I had that too roll

  2. Post #3 - earlybird: mtr, colorping - our network guy!

  3. watch this space

Last edited by Sector11 (2017-06-08 17:54:09)


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#2 2017-06-08 06:30:22

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Network monitoring - CLI Apps

Nice list S11, thanks!

My favourite tool is tcpdump(8), the Debian version is almost as good (but lacks firewall integration):

https://packages.debian.org/jessie/tcpdump

More of a troubleshooting application than a monitor but still very useful indeed.

Offline

#3 2017-06-08 10:56:12

Steve
Member
Registered: 2017-01-03
Posts: 642

Re: Network monitoring - CLI Apps

Very handy info Sector11, thankyou.

Offline

#4 2017-06-08 11:26:50

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,271
Website

Re: Network monitoring - CLI Apps

Very nice works S11. I'm sure It's not that easy to find/remember all those names.


Tumbleweed (Server) | KDE Plasma (Wayland)

Offline

Board footer

Powered by FluxBB