{"id":21,"date":"2018-07-25T07:07:31","date_gmt":"2018-07-25T07:07:31","guid":{"rendered":"http:\/\/kidds.co.za\/?p=21"},"modified":"2018-07-25T07:10:06","modified_gmt":"2018-07-25T07:10:06","slug":"linux-net-traffic-monitoring-tools","status":"publish","type":"post","link":"https:\/\/kidds.co.za\/index.php\/2018\/07\/25\/linux-net-traffic-monitoring-tools\/","title":{"rendered":"Linux net traffic monitoring tools"},"content":{"rendered":"<header class=\"entry-header\">\n<h1 class=\"entry-title\">18 commands to monitor network bandwidth on Linux server<\/h1>\n<div class=\"below-title-meta\">\n<div class=\"adt\">By\u00a0<span class=\"author\"><a title=\"Posts by Silver Moon\" href=\"https:\/\/www.binarytides.com\/author\/admin\/\" rel=\"author\">Silver Moon<\/a>\u00a0<\/span><span class=\"meta-sep\">|<\/span>\u00a0April 4, 2014<\/div>\n<\/div>\n<\/header>\n<div class=\"entry-content\">\n<div id=\"post_start\"><\/div>\n<h3>Network monitoring on Linux<\/h3>\n<p>This post mentions some linux command line tools that can be used to monitor the network usage. These tools monitor the traffic flowing through network interfaces and measure the speed at which data is currently being transferred. Incoming and outgoing traffic is shown separately.<\/p>\n<p>Some of the commands, show the bandwidth used by individual processes. This makes it easy to detect a process that is overusing network bandwidth.<\/p>\n<p>The tools have different mechanisms of generating the traffic report. Some of the tools like nload read the &#8220;\/proc\/net\/dev&#8221; file to get traffic stats, whereas some tools use the pcap library to capture all packets and then calculate the total size to estimate the traffic load.<\/p>\n<p>Here is a list of the commands, sorted by their features.<\/p>\n<pre class=\"highlight \">1. Overall bandwidth - nload, bmon, slurm, bwm-ng, cbm, speedometer, netload\r\n\r\n2. Overall bandwidth (batch style output) - vnstat, ifstat, dstat, collectl\r\n\r\n2. Bandwidth per socket connection - iftop, iptraf, tcptrack, pktstat, netwatch, trafshow\r\n\r\n3. Bandwidth per process - nethogs<\/pre>\n<h4>1. Nload<\/h4>\n<p>Nload is a commandline tool that allows users to monitor the incoming and outgoing traffic separately. It also draws out a graph to indicate the same, the scale of which can be adjusted. Easy and simple to use, and does not support many options.<\/p>\n<p>So if you just need to take a quick look at the total bandwidth usage without details of individual processes, then nload will be handy.<\/p>\n<pre class=\"terminal\">$ nload<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6773\" src=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/nload.png\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/nload.png 640w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/nload-300x225.png 300w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/nload-600x450.png 600w\" alt=\"nload command linux\" width=\"640\" height=\"480\" \/><\/p>\n<p>Installing Nload &#8211; Fedora and Ubuntu have got it in the default repos. CentOS users need to get nload from Epel repositories.<\/p>\n<pre class=\"terminal\"># fedora or centos\r\n$ yum install nload -y\r\n\r\n# ubuntu\/debian\r\n$ sudo apt-get install nload<\/pre>\n<h4>2. iftop<\/h4>\n<p>Iftop measures the data flowing through individual socket connections, and it works in a manner that is different from Nload. Iftop uses the pcap library to capture the packets moving in and out of the network adapter, and then sums up the size and count to find the total bandwidth under use.<\/p>\n<p>Although iftop reports the bandwidth used by individual connections, it cannot report the process name\/id involved in the particular socket connection. But being based on the pcap library, iftop is able to filter the traffic and report bandwidth usage over selected host connections as specified by the filter.<\/p>\n<pre class=\"terminal\">$ sudo iftop -n<\/pre>\n<p>The n option prevents iftop from resolving ip addresses to hostname, which causes additional network traffic of its own.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6774\" src=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/iftop.png\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/iftop.png 640w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/iftop-300x225.png 300w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/iftop-600x450.png 600w\" alt=\"iftop command linux\" width=\"640\" height=\"480\" \/><\/p>\n<p>Install iftop &#8211; Ubuntu\/Debian\/Fedora users get it from default repos. CentOS users get it from Epel.<\/p>\n<pre class=\"terminal\"># fedora or centos\r\nyum install iftop -y\r\n\r\n# ubuntu or debian\r\n$ sudo apt-get install iftop<\/pre>\n<h4>3. iptraf<\/h4>\n<p>Iptraf is an interactive and colorful IP Lan monitor. It shows individual connections and the amount of data flowing between the hosts. Here is a screenshot<\/p>\n<pre class=\"terminal\">$ sudo iptraf<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6777\" src=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/iptraf.png\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/iptraf.png 640w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/iptraf-300x225.png 300w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/iptraf-600x450.png 600w\" alt=\"iptraf linux command\" width=\"640\" height=\"480\" \/><\/p>\n<p>Install iptraf<\/p>\n<pre class=\"terminal\"># Centos (base repo)\r\n$ yum install iptraf\r\n\r\n# fedora or centos (with epel)\r\n$ yum install iptraf-ng -y\r\n\r\n# ubuntu or debian\r\n$ sudo apt-get install iptraf iptraf-ng<\/pre>\n<h4>4. nethogs<\/h4>\n<p>Nethogs is a small &#8216;net top&#8217; tool that shows the bandwidth used by individual processes and sorts the list putting the most intensive processes on top. In the event of a sudden bandwidth spike, quickly open nethogs and find the process responsible. Nethogs reports the PID, user and the path of the program.<\/p>\n<pre class=\"terminal\">$ sudo nethogs<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6780\" src=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/nethogs.png\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/nethogs.png 640w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/nethogs-300x225.png 300w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/nethogs-600x450.png 600w\" alt=\"nethogs command linux\" width=\"640\" height=\"480\" \/><\/p>\n<p>Install Nethogs &#8211; Ubuntu, Debian, Fedora users get from default repos. CentOS users need Epel<\/p>\n<pre class=\"terminal\"># ubuntu or debian (default repos)\r\n$ sudo apt-get install nethogs\r\n\r\n# fedora or centos (from epel)\r\n$ sudo yum install nethogs -y<\/pre>\n<h4>5. bmon<\/h4>\n<p>Bmon (Bandwidth Monitor) is a tool similar to nload that shows the traffic load over all the network interfaces on the system. The output also consists of a graph and a section with packet level details.<\/p>\n<p><a href=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/bmon.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-6791\" src=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/bmon-640x480.png\" alt=\"bmon linux network monitor\" width=\"640\" height=\"480\" \/><\/a><\/p>\n<p>Install Bmon &#8211; Ubuntu, Debian and Fedora users can install from default repos. CentOS users need to setup repoforge, since its not available in Epel.<\/p>\n<pre class=\"terminal\"># ubuntu or debian\r\n$ sudo apt-get install bmon\r\n\r\n# fedora or centos (from repoforge)\r\n$ sudo yum install bmon<\/pre>\n<p>Bmon supports many options and is capable of producing reports in html format. Check the man page for more information<\/p>\n<h4>6. slurm<\/h4>\n<p>Slurm is &#8216;yet&#8217; another network load monitor that shows device statistics along with an ascii graph. It supports 3 different styles of graphs each of which can be activated using the c, s and l keys. Simple in features, slurm does not display any further details about the network load.<\/p>\n<pre class=\"terminal\">$ slurm -s -i eth0<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6783\" src=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/slurm.png\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/slurm.png 640w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/slurm-300x225.png 300w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/slurm-600x450.png 600w\" alt=\"slurm command linux\" width=\"640\" height=\"480\" \/><\/p>\n<p>Install slurm<\/p>\n<pre class=\"terminal\"># debian or ubuntu\r\n$ sudo apt-get install slurm\r\n\r\n# fedora or centos\r\n$ sudo yum install slurm -y<\/pre>\n<h4>7. tcptrack<\/h4>\n<p>Tcptrack is similar to iftop, and uses the pcap library to capture packets and calculate various statistics like the bandwidth used in each connection. It also supports the standard pcap filters that can be used to monitor specific connections.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6784\" src=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/tcptrack.png\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/tcptrack.png 640w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/tcptrack-300x225.png 300w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/tcptrack-600x450.png 600w\" alt=\"tcptrack command linux\" width=\"640\" height=\"480\" \/><\/p>\n<p>Install tcptrack &#8211; Ubuntu, Debian and Fedora have it in default repos. CentOS users need to get it from RepoForge as it is not available in Epel either.<\/p>\n<pre class=\"terminal\"># ubuntu, debian\r\n$ sudo apt-get install tcptrack\r\n\r\n# fedora, centos (from repoforge repository)\r\n$ sudo yum install tcptrack<\/pre>\n<h4>8. Vnstat<\/h4>\n<p>Vnstat is bit different from most of the other tools. It actually runs a background service\/daemon and keeps recording the size of data transfer all the time. Next it can be used to generate a report of the history of network usage.<\/p>\n<pre class=\"terminal\">$ service vnstat status\r\n * vnStat daemon is running<\/pre>\n<p>Running vnstat without any options would simply show the total amount of data transfer that took place since the date the daemon is running.<\/p>\n<pre class=\"terminal\">$ vnstat\r\nDatabase updated: Mon Mar 17 15:26:59 2014\r\n\r\n   eth0 since 06\/12\/13\r\n\r\n          rx:  135.14 GiB      tx:  35.76 GiB      total:  170.90 GiB\r\n\r\n   monthly\r\n                     rx      |     tx      |    total    |   avg. rate\r\n     ------------------------+-------------+-------------+---------------\r\n       Feb '14      8.19 GiB |    2.08 GiB |   10.27 GiB |   35.60 kbit\/s\r\n       Mar '14      4.98 GiB |    1.52 GiB |    6.50 GiB |   37.93 kbit\/s\r\n     ------------------------+-------------+-------------+---------------\r\n     estimated      9.28 GiB |    2.83 GiB |   12.11 GiB |\r\n\r\n   daily\r\n                     rx      |     tx      |    total    |   avg. rate\r\n     ------------------------+-------------+-------------+---------------\r\n     yesterday    236.11 MiB |   98.61 MiB |  334.72 MiB |   31.74 kbit\/s\r\n         today    128.55 MiB |   41.00 MiB |  169.56 MiB |   24.97 kbit\/s\r\n     ------------------------+-------------+-------------+---------------\r\n     estimated       199 MiB |      63 MiB |     262 MiB |<\/pre>\n<p>To monitor the bandwidth usage in realtime, use the &#8216;-l&#8217; option (live mode). It would then show the total bandwidth used by incoming and outgoing data, but in a very precise manner without any internal details about host connections or processes.<\/p>\n<pre class=\"terminal\">$ vnstat -l -i eth0\r\nMonitoring eth0...    (press CTRL-C to stop)\r\n\r\n   rx:       12 kbit\/s    10 p\/s          tx:       12 kbit\/s    11 p\/s<\/pre>\n<p>Vnstat is more like a tool to get historic reports of how much bandwidth is used everyday or over the past month. It is not strictly a tool for monitoring the network in real time.<\/p>\n<p>Vnstat supports many options, details about which can be found in the man page.<\/p>\n<p>Install vnstat<\/p>\n<pre class=\"terminal\"># ubuntu or debian\r\n$ sudo apt-get install vnstat\r\n\r\n# fedora or centos (from epel)\r\n$ sudo yum install vnstat<\/pre>\n<h4>9. bwm-ng<\/h4>\n<p>Bwm-ng (Bandwidth Monitor Next Generation) is another very simple real time network load monitor that reports a summary of the speed at which data is being transferred in and out of all available network interfaces on the system.<\/p>\n<pre class=\"terminal\">$ bwm-ng<\/pre>\n<pre class=\"terminal\">bwm-ng v0.6 (probing every 0.500s), press 'h' for help\r\n  input: \/proc\/net\/dev type: rate\r\n  \/         iface                   Rx                   Tx                T\r\not==========================================================================\r\n==           eth0:           0.53 KB\/s            1.31 KB\/s            1.84\r\nKB             lo:           0.00 KB\/s            0.00 KB\/s            0.00\r\nKB--------------------------------------------------------------------------\r\n--          total:           0.53 KB\/s            1.31 KB\/s            1.84\r\nKB\/s<\/pre>\n<p>If the console size is sufficiently large, bwm-ng can also draw bar graphs for the traffic using the curses2 output mode.<\/p>\n<pre class=\"terminal\">$ bwm-ng -o curses2<\/pre>\n<p>Install Bwm-NG &#8211; On CentOS bwm-ng can be installed from Epel.<\/p>\n<pre class=\"terminal\"># ubuntu or debian\r\n$ sudo apt-get install bwm-ng\r\n\r\n# fedora or centos (from epel)\r\n$ sudo apt-get install bwm-ng<\/pre>\n<h4>10. cbm &#8211; Color Bandwidth Meter<\/h4>\n<p>A tiny little simple bandwidth monitor that displays the traffic volume through network interfaces. No further options, just the traffic stats are display and updated in realtime.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6801\" src=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/cbm.png\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/cbm.png 640w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/cbm-300x225.png 300w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/cbm-600x450.png 600w\" alt=\"cbm linux network monitor\" width=\"640\" height=\"480\" \/><\/p>\n<pre class=\"terminal\">$ sudo apt-get install cbm<\/pre>\n<h4>11. speedometer<\/h4>\n<p>Another small and simple tool that just draws out good looking graphs of incoming and outgoing traffic through a given interface.<\/p>\n<pre class=\"terminal\">$ speedometer -r eth0 -t eth0<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6794\" src=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/speedometer.png\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/speedometer.png 640w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/speedometer-300x225.png 300w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/speedometer-600x450.png 600w\" alt=\"speedometer linux network monitor\" width=\"640\" height=\"480\" \/><\/p>\n<p>Install speedometer<\/p>\n<pre class=\"terminal\"># ubuntu or debian users\r\n$ sudo apt-get install speedometer<\/pre>\n<h4>12. Pktstat<\/h4>\n<p>Pktstat displays all the active connections in real time, and the speed at which data is being transferred through them. It also displays the type of the connection, i.e. tcp or udp and also details about http requests if involved.<\/p>\n<pre class=\"terminal\">$ sudo pktstat -i eth0 -nt<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6795\" src=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/pktstat.png\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/pktstat.png 640w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/pktstat-300x225.png 300w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/pktstat-600x450.png 600w\" alt=\"pktstat linux network monitor\" width=\"640\" height=\"480\" \/><\/p>\n<pre class=\"terminal\">$ sudo apt-get install pktstat<\/pre>\n<h4>13. Netwatch<\/h4>\n<p>Netwatch is part of the netdiag collection of tools, and it too displays the connections between local host and other remote hosts, and the speed at which data is transferring on each connection.<\/p>\n<pre class=\"terminal\">$ sudo netwatch -e eth0 -nt<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6797\" src=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/netwatch.png\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/netwatch.png 640w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/netwatch-300x225.png 300w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/netwatch-600x450.png 600w\" alt=\"netwatch linux network monitor\" width=\"640\" height=\"480\" \/><\/p>\n<pre class=\"terminal\">$ sudo apt-get install netdiag<\/pre>\n<h4>14. Trafshow<\/h4>\n<p>Like netwatch and pktstat, trafshow reports the current active connections, their protocol and the data transfer speed on each connection. It can filter out connections using pcap type filters.<\/p>\n<p>Monitor only tcp connections<\/p>\n<pre class=\"terminal\">$ sudo trafshow -i eth0 tcp<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6806\" src=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/trafshow.png\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/trafshow.png 640w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/trafshow-300x225.png 300w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/trafshow-600x450.png 600w\" alt=\"trafshow linux network monitor\" width=\"640\" height=\"480\" \/><\/p>\n<pre class=\"terminal\">$ sudo apt-get install netdiag<\/pre>\n<h4>15. Netload<\/h4>\n<p>The netload command just displays a small report on the current traffic load, and the total number of bytes transferred since the program start. No more features are there. Its part of the netdiag.<\/p>\n<pre class=\"terminal\">$ netload eth0<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6798\" src=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/netload.png\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/netload.png 640w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/netload-300x225.png 300w, https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2014\/03\/netload-600x450.png 600w\" alt=\"netload linux network monitor\" width=\"640\" height=\"480\" \/><\/p>\n<pre class=\"terminal\">$ sudo apt-get install netdiag<\/pre>\n<h4>16. ifstat<\/h4>\n<p>The ifstat reports the network bandwidth in a batch style mode. The output is in a format that is easy to log and parse using other programs or utilities.<\/p>\n<pre class=\"terminal\">$ ifstat -t -i eth0 0.5\r\n  Time           eth0       \r\nHH:MM:SS   KB\/s in  KB\/s out\r\n09:59:21      2.62      2.80\r\n09:59:22      2.10      1.78\r\n09:59:22      2.67      1.84\r\n09:59:23      2.06      1.98\r\n09:59:23      1.73      1.79<\/pre>\n<p>Install ifstat &#8211; Ubuntu, Debian and Fedora users have it in the default repos. CentOS users need to get it from Repoforge, since its not there in Epel.<\/p>\n<pre class=\"terminal\"># ubuntu, debian\r\n$ sudo apt-get install ifstat\r\n\r\n# fedora, centos (Repoforge)\r\n$ sudo yum install ifstat<\/pre>\n<h4>17. dstat<\/h4>\n<p>Dstat is a versatile tool (written in python) that can monitor different system statistics and report them in a batch style mode or log the data to a csv or similar file. This example shows how to use dstat to report network bandwidth<\/p>\n<pre class=\"terminal\">$ dstat -nt\r\n-net\/total- ----system----\r\n recv  send|     time     \r\n   0     0 |23-03 10:27:13\r\n1738B 1810B|23-03 10:27:14\r\n2937B 2610B|23-03 10:27:15\r\n2319B 2232B|23-03 10:27:16\r\n2738B 2508B|23-03 10:27:17<\/pre>\n<p>Install dstat<\/p>\n<pre class=\"terminal\">$ sudo apt-get install dstat<\/pre>\n<h4>18. collectl<\/h4>\n<p>Collectl reports system statistics in a style that is similar to dstat, and like dstat it is gathers statistics about various different system resources like cpu, memory, network etc. Over here is a simple example of how to use it to report network usage\/bandwidth.<\/p>\n<pre class=\"terminal\">$ collectl -sn -oT -i0.5\r\nwaiting for 0.5 second sample...\r\n#         &lt;----------Network----------&gt;\r\n#Time       KBIn  PktIn  KBOut  PktOut \r\n10:32:01      40     58     43      66 \r\n10:32:01      27     58      3      32 \r\n10:32:02       3     28      9      44 \r\n10:32:02       5     42     96      96 \r\n10:32:03       5     48      3      28<\/pre>\n<p>Install Collectl<\/p>\n<pre class=\"terminal\"># Ubuntu\/Debian users\r\n$ sudo apt-get install collectl\r\n\r\n#Fedora\r\n$ sudo yum install collectl<\/pre>\n<h3>Summary<\/h3>\n<p>Those were a few handy commands to quickly check the network bandwidth on your linux server. However these need the user to login to the remote server over ssh. Alternatively web based monitoring tools can also be used for the same task.<\/p>\n<p>Ntop and Darkstat are some of the basic web based network monitoring tools available for Linux. Beyond these lie the enterprise level monitoring tools like Nagios that provide a host of features to not just monitor a server but entire infrastructure.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>18 commands to monitor network bandwidth on Linux server By\u00a0Silver Moon\u00a0|\u00a0April 4, 2014 Network monitoring on Linux This post mentions some linux command line tools that can be used to monitor the network usage. These tools monitor the traffic flowing through network interfaces and measure the speed at which data is currently being transferred. Incoming [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":2,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":23,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/posts\/21\/revisions\/23"}],"wp:attachment":[{"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}