Monitoring is one of the main task that anyone SystemAdmin or even a normal user should know about to get the best out of their systems/servers & avoid any issues.
Bundles for a portion of the directions referenced here are accessible on EPEL store. The direction to introduce EPEL repo on your framework is referenced underneath.
1- Iftop command
Iftop command provides real time monitoring of network bandwidth. It helps us measure the total data moving in & out of the individual socket connections i.e. it captures packets moving in and out from our network adapters & than it sums up to find the bandwidth being utilized by our servers.
Now to install it on your systems, run the following command from your terminal,
yum install iftop
Than to start monitoring the network, run the following command,
2- tcptrack command
Next on the list of Linux Network Traffic monitoring commands is ‘tcptrack’ command. This command is quite similar to iftop command. Tcptrack captures packets & calculate network bandwidth for each tcp connection, it used pcap library to do so.
To install it on your systems, use the following command,
yum install tcptrack
Next, to start using it & get the network stats, open terminal & run the following command,
3- Nload command
Nload command is used to get information regarding incoming & outgoing traffic of the server. It produces a graph separately to indicate the incoming as well as outgoing traffic. But one downside to this command is that, it does not support many options i.e. we won’t get much information related to individual processes but one can adjust the scale.
Install it using the following command,
yum install nload
Now to start using it, run
4- Iptraf commands
This is one of the useful network monitoring tool & I use it all the time. Iptraf provides a colorful & interactive list of traffic going in & out to other servers or hosts. This produces a list with all hosts from which traffic is going in & out of from our system.
To install it on the system, use one of the following commands,
yum install iptraf-ng
Now to get the network traffic reports, run the following command.
Netdiag is a collection of network diagnostics tools & commands like netwatch, trafshow & netload commands are all part of it. So we only need to install netdiag package to get all these commands,
yum install netdiag
Now let’s discuss the Netwatch, Trafshow & Netload command one by one
5- Netload command
Of all the commands that are part of netdiag package, netload is simplest to learn in the sense that it provided only a simple report on current network traffic. It also shows total number of data transferred since its start, other than that it doesn’t support much other options for any detailed report.
To get the netload report, run the netload command followed by the ethernet port name. For example,
# netload en0sp3
That’s all on Linux Network Traffic Monitoring tutorial.