- 7 Best Linux Network Monitor Tools for System Administrators
- Linux network monitor tools
- Speedometer
- iftop
- SS – Socket Statistics
- IPTraf
- NetHogs – Monitor Per Process Network Bandwidth
- Netstat
- nload – Displays Network Usage
- Monitoring Network Bandwidth and Speed in Linux
- Tools for Monitoring Internet traffic and speed in Linux
- 1. NetSpeed – GNOME shell extension for desktop users
- 2. Fast – Netflix’s Internet speed tester
- 3. speedtest-cli: check upload and download speed
- 4. NetHogs – Check bandwidth utilization per program basis
- 5. nload – Real-Time internet traffic monitoring
- 6. CBM – Color Bandwidth Meter
- 7. iPerf – Test network performance between two hosts
- 8. vnStat – Network traffic logger
- 9. iftop – The ‘top’ of Network Usage
7 Best Linux Network Monitor Tools for System Administrators
Network performance assessment is a critical task for system administrators. System admins are often required to master more than one Linux network monitor tools because every tools offer something unique to the system analysis. There are plenty of Linux network monitoring tools out there. Although each tool has different scope for usage, learning about most of them can be useful. It is essential as an system admin to find unauthorized usage of network resources.
Linux network monitor tools
Speedometer
This tool gives you graphical representation of your network speed. You can see your network’s up and down stream or RX and TX speed. Which essentially gives you speed at which data coming and going out of your Linux machine. Now to use the speedometer use the following command.
Speedometer in terminal
-R option is for your receiving interface on which your internet is working
-T option is for your transmitting interface which is also same as receiving interface.
After issuing the above mentioned command, you can see the RX and TX speed in graphical manner which is pretty handy if you want a quick glance or snapshot of your network usage overtime.
Installation
On Debian or Debian based distros like , Ubuntu, Linux Mint, Kali etc.
Installation on Arch or Arch based system like Manjaro, AntergOS, BlackArch etc.
For any other Linux distro, you can download the source from github and compile it locally.
iftop
Next is iftop on the list. It’s very popular among system admins. iftop is a free and open source program. One of the best Command-line Linux network monitoring tool that produces a frequently updated list of network connections. By default, the connections are listed by bandwidth usage, starting from “top” bandwidth consuming process. To use iftop use the following command with root privileges.
iftop
After issuing the commands, Terminal screen will give you a real time information about all the incoming and outgoing network traffic on your computer. First column shows the source address and second column shows the destination address. Three columns on the right hand side shows the data sent in past two seconds, 10 seconds and 40 seconds respectively. There are few more option available, pressing the H key takes you to the health menu which shows you all the options available.
SS – Socket Statistics
This Linux Network monitor tool is similar to netstat but a lot simpler and faster. Typing ss on CLI interface gives you a lot of information which is pretty hard to comprehend. So following options are recommend to use with SS for more easily understandable output. SS usally comes per-installed with most major distros.
Linux SS command
Command used above gives you list of all listening sockets.
-t option gives you list of all the TCP connection which is currently established. Similarly, -u option gives you the list of UDP connection.
One more usefull option is dst.
This will show you the information, how a particulate IP is connected to your network. Which is pretty handy if you are investigating a specific IP address.
IPTraf
The IPTraf Linux network monitor is an ncurses-based IP LAN monitor (so it’s text-based) that is interactive and generates network statistics such as: TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and more.
IPTraf
Now, the only problem with IPTraf is that it is old. It hasn’t been updated since 2005 (as far as I can see). It may be old but it’s far from being useless. The iptraf tool still installs, still runs, and is just as useful as it was when it was still in active development. It provides multiple options to filter your network traffic.
Installation
On RHEL, CentOS and Fedora server using yum command from terminal.
Under Debian or Ubuntu, IPTraf can be installed by
On Arch or Arch based systems
NetHogs – Monitor Per Process Network Bandwidth
NetHogs is an open source piece of program (similar to Linux top command). It tracks each process’s network activity on your Linux system. It also helps you finding the real-time network traffic bandwidth usage by each program or application. Nethogs is interactive in nature. It uses the ncurses library. It expects to launch in a terminal window and get input from the user, there’s no GUI for the program.
nethogs
Instead of dividing down the traffic per protocol or per subnet, like most of such Linux network monitor do, it groups bandwidth by process – and It does not require any special kernel module to be loaded. So if there’s sudden spike in network usage, you can fire up NetHogs and immediately see which PID is causing this, and if it’s some kind of spinning process, kill it.
Installation
On Rad-Hat and CentOS based systems
On Debian and Ubuntu
On Arch or Arch based systems
Netstat
Netstat is basically a command line Linux network monitor tool which list out all the network connection established by processes running on your system. It mainly lists out all the UDP, TCP socket connections and also the Unix socket connection. Not only sockets it can also easily list the listening sockets that are actually waiting for the incoming connections, so it would be good if you check that the open port 80(http) is running on the system or not. Mostly it comes per-installed with your Linux distro, it is a very useful tool for the network and the system administrators.
netstat
If you don’t have net-tools installed on your system, which provides Netstat, you can install it by following commands:
nload – Displays Network Usage
nload is a another very good piece of program, nload is very easy to use command-line tool for inspecting network traffic and bandwidth usage in real time. It uses graphs to visualize the incomming and outgoing traffic. In addition, it also displays information such as the total amount of transferred data and minimum and maximum network usage.
nload – Displays Network Usage
Installation
On Red-Hat and CentOS based systems
That’s our top picks for Linux network monitor tools, if you feel otherwise please let us know in the comments.
Источник
Monitoring Network Bandwidth and Speed in Linux
Last updated October 7, 2020 By Sergiu 25 Comments
Brief: In this article, we list some open source utilities to monitor the network traffic, bandwidth and internet speed in Linux.
Monitoring internet speed can be a crucial step in understanding your connection and it can help you find possible problems. It will also help you troubleshoot any connectivity problems you might have and find possible bottlenecks.
Tools for Monitoring Internet traffic and speed in Linux
I am going to present you different tools to help monitor your internet speed. I have provided installation instructions for Ubuntu/Debian based distributions but the tools can be easily installed in other distributions.
It doesn’t matter if you are a beginner that wants a simple, working solution, a guru looking to get as much information about your network as possible, if you prefer GUI or CLI programs, I’ll help you find the right tool for the job.
1. NetSpeed – GNOME shell extension for desktop users
NetSpeed is a GNOME shell extension that displays the sum of your download and upload speed in your gnome panel. Clicking on it displays the separate values in a drop-down.
It is applicable only if you use the GNOME desktop environment. If you are not familiar already, read this tutorial to know how to use GNOME Shell extensions.
2. Fast – Netflix’s Internet speed tester
Fast is an open-source CLI utility powered by Netflix fast.com service. Although the code for the website itself isn’t open-source, Netflix have explained how it works here. Fast is the perfect tool for someone that just wants to check the download speed in a very simple manner.
You can install it using snap. Make sure to enable Snap support in your distribution and then run the following command:
Once installed, you can run the utility by typing in:
Once again, after a few seconds, you’ll get your result:
3. speedtest-cli: check upload and download speed
speedtest-cli is an open-source command line interface for testing internet bandwidth using speedtest.net (which, itself, isn’t open-source). It is a quick little tool for checking your download and upload speed.
speedtest-cli is available in most distros and can easily be installed using the package manager. On Debian/Ubuntu, you can use the following command:
Once installed, simply run:
After a few seconds, you’ll get information about which server was used for checking your connection, as well as the details concerning your internet speed. Use man speedtest to learn about additional options (such as not performing download test with –no-download).
4. NetHogs – Check bandwidth utilization per program basis
NetHogs is a simple open-source utility that runs in the terminal. Instead of breaking the traffic down per protocol or per subnet, it groups bandwith by process. It is very helpful for finding the PID of a hanging program or just for seeing what is eating your bandwidth. It relies mostly on /proc, so most features are Linux-only.
Luckily, NetHogs is included in many distros. That means you can install and remove it using your normal package manager. On Debian/Ubuntu, you can use this:
To run it, simply use:
Conveniently, you can specify devices after the command (such as sudo nethogs eth0). You also have additional parameters, such as choosing a delay for the refresh rate (-d), version info (-V), tracemode (-t) and a few others which you can check out in the man pages (man nethogs).
5. nload – Real-Time internet traffic monitoring
nload is an open-source console application that allows you to monitor network traffic and bandwidth usage in real time. It visualizes incoming and outgoing traffic using graphs, while also providing additional information (total amount of transferred data, min/max network usage etc.). It’s a simple to use tool that can be really helpful at times.
You can install it in Debian and Ubuntu based distributions using the command:
To run it, simpy type in:
You can control its various aspects from the manpage (man nload).
6. CBM – Color Bandwidth Meter
CBM is a very simple tool that displays (in color) network traffic on all connected devices, in a very stripped-down manner.
CBM is a slightly older piece of software that can be found in most distro repositories. This makes installing and removing it using the package manager very easy.
Using CBM is just as easy as installing it. You run:
The commands are displayed in the bottom of your terminal so that you can control them easily.
7. iPerf – Test network performance between two hosts
iPerf is tool used for network performance measurement and tuning and can produce standardized performance measurements for any network. It has client and server functionality, and can create data streams to measure bandwidth, loss and other parameters between the two ends in one or both directions. There are two implementations: the original iPerf (iPerf2) and a non-backwards compatible implementation iPerf3.
The easiest way to install (or remove) iPerf or iPerf3 is using the package manager. For example, in Ubuntu:
Then you can just run the one you want:
Note: For all further examples, if you are using iPerf3 simply replace all instances of iperf with iperf3.
However, doing so will only display your options. To run iPerf, you need a minimum of 2 machines: one to act as a client and one to act as a server. For the server, you’ll use:
This will open the machine for listening on port 5001. To connect to another machine and run a test, you’ll use:
Where server_address is, of course, the address of the server you are trying to connect to. This can be either an IP address, or something like ping.online.net. The iPerf3 team has a list of servers to use for testing purposes.
iPerf is a widely used tool that has a lot of specific uses and many options. I won’t go into those, since it is beyond the scope of this article. However, you can check out the manpage (man iperf / man iperf3) or the documentation.
8. vnStat – Network traffic logger
vnStat is an open-source console-based network traffic monitor that uses the network interface statistics provided by the kernel as information source for its periodic logs. This means that vnStat won’t actually be sniffing any traffic and also ensures light CPU usage. It can be run without root permissions.
As with many other networking tools, vnStat is include in most distribution repositories. This means you can very easily install (and remove) it using your package manager.
To use it in the most basic way, simply enter:
vnStat offers you more advanced features too, such as the ability to use databases (importing them or exporting output to a file). You can check these out in the manpage (man vnstat). More examples can be found on the official website.
9. iftop – The ‘top’ of Network Usage
iftop is a free open-source software command-line system monitor tool that produces a frequently updated list of network connections between pairs of hosts. The connections can be ordered by different parameters, but they ordered by default by bandwidth usage, with only the “top” bandwidth consumers shown.
Wrapping Up
In this article I showed you multiple tools you can use to monitor different statistics concerning the performance of your network. There is a tool that is right for everyone, and you can pick and choose the one that fits your specific needs. I hope this article was a good introduction to the world of internet monitoring.
What is your favorite tool and how are you using it? Let us know in the comments section!
Like what you read? Please share it with others.
Источник