{"id":11493,"date":"2019-03-14T09:22:19","date_gmt":"2019-03-14T09:22:19","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=11493"},"modified":"2019-03-14T09:22:19","modified_gmt":"2019-03-14T09:22:19","slug":"bmon-a-powerful-network-bandwidth-monitoring-and-debugging-tool-for-linux","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/14\/bmon-a-powerful-network-bandwidth-monitoring-and-debugging-tool-for-linux\/","title":{"rendered":"bmon \u2013 A Powerful Network Bandwidth Monitoring and Debugging Tool for Linux"},"content":{"rendered":"<p><strong>bmon<\/strong>\u00a0is a simple yet powerful, text-based\u00a0<a href=\"https:\/\/www.tecmint.com\/bcc-best-linux-performance-monitoring-tools\/\" target=\"_blank\" rel=\"noopener\">network monitoring and debugging tool<\/a>\u00a0for Unix-like systems, which captures networking related statistics and displays them visually in a human friendly format. It is a reliable and effective real-time bandwidth monitor and rate estimator.<\/p>\n<p>It can read input using an assortment of input modules and presents output in various output modes, including an interactive curses user interface as well as a programmable text output for scripting purposes.<\/p>\n<p><b>Suggested Read:<\/b>\u00a0<a href=\"https:\/\/www.tecmint.com\/command-line-tools-to-monitor-linux-performance\/\" target=\"_blank\" rel=\"noopener\">20 Command Line Tools to Monitor Linux Performance<\/a><\/p>\n<h3>Install bmon Bandwidth Monitoring Tool in Linux<\/h3>\n<p>Almost all Linux distributions has\u00a0<strong>bmon<\/strong>\u00a0package in the default repositories and can be easily install from default package manger, but the available version might be little older.<\/p>\n<pre>$ sudo yum install bmon      [<strong>On RHEL\/CentOS\/Fedora<\/strong>]\r\n$ sudo dnf install bmon      [<strong>On Fedora 22+<\/strong>]\r\n$ sudo apt-get install bmon  [<strong>On Debian\/Ubuntu\/Mint<\/strong>]\r\n<\/pre>\n<p>Alternatively, you can get\u00a0<code>.rpm<\/code>\u00a0and\u00a0<code>.deb<\/code>\u00a0packages for your Linux distribution from\u00a0<a href=\"https:\/\/pkgs.org\/download\/bmon\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/pkgs.org\/download\/bmon<\/a>.<\/p>\n<p>If you wanted to have a most recent version of\u00a0<strong>bmon<\/strong>\u00a0(i.e version\u00a0<strong>4.0<\/strong>), you need to build it from source using following commands.<\/p>\n<h4>On CentOS, RHEL and Fedora<\/h4>\n<pre>$ git clone https:\/\/github.com\/tgraf\/bmon.git\r\n$ cd bmon\r\n$ sudo yum install make libconfuse-devel libnl3-devel libnl-route3-devel ncurses-devel\r\n$ sudo .\/autogen.sh\r\n$ sudo.\/configure\r\n$ sudo make\r\n$ sudo make install\r\n<\/pre>\n<h4>On Debian, Ubuntu and Linux Mint<\/h4>\n<pre>$ git clone https:\/\/github.com\/tgraf\/bmon.git\r\n$ cd bmon\r\n$ sudo apt-get install build-essential make libconfuse-dev libnl-3-dev libnl-route-3-dev libncurses-dev pkg-config dh-autoreconf\r\n$ sudo .\/autogen.sh\r\n$ sudo .\/configure\r\n$ sudo make\r\n$ sudo make install\r\n<\/pre>\n<h3>How to Use bmon Bandwidth Monitoring Tool in Linux<\/h3>\n<p>Run it as below (for starters:\u00a0<strong>RX<\/strong>\u00a0means received bytes per second and\u00a0<strong>TX<\/strong>\u00a0refers to transmitted bytes per second):<\/p>\n<pre>$ bmon\r\n<\/pre>\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Linux-Bandwidth-Monitoring.gif\"><img decoding=\"async\" class=\"size-full wp-image-24446\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Linux-Bandwidth-Monitoring.gif\" sizes=\"(max-width: 893px) 100vw, 893px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Linux-Bandwidth-Monitoring.gif 893w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Linux-Bandwidth-Monitoring-768x482.gif 768w\" alt=\"bmon - Linux Bandwidth Monitoring\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p>To view more detailed graphical statistics\/information of bandwidth usage, press\u00a0<code>d<\/code>\u00a0key and refer screnshot below.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Detailed-Bandwidth-Statistics.gif\"><img decoding=\"async\" class=\"size-full wp-image-24448\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Detailed-Bandwidth-Statistics.gif\" sizes=\"(max-width: 882px) 100vw, 882px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Detailed-Bandwidth-Statistics.gif 882w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Detailed-Bandwidth-Statistics-768x785.gif 768w\" alt=\"bmon - Detailed Bandwidth Statistics\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p>Press\u00a0<code>[Shift + ?]<\/code>\u00a0to view the quick reference below. To exit the interface, press\u00a0<strong>[Shift + ?]<\/strong>\u00a0again.<\/p>\n<div id=\"attachment_24449\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Quick-Reference.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24449\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Quick-Reference.png\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Quick-Reference.png 840w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Quick-Reference-768x624.png 768w\" alt=\"bmon - Quick Reference\" width=\"840\" height=\"682\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">bmon \u2013 Quick Reference<\/p>\n<\/div>\n<p>To view statistics of a given interface, select it using the\u00a0<code>Up<\/code>\u00a0and\u00a0<code>Down<\/code>\u00a0arrows. However, to monitor a specific interface only, specify it as an argument on the command line as follows.<\/p>\n<p><b>Suggested Read:<\/b>\u00a0<a href=\"https:\/\/www.tecmint.com\/linux-performance-monitoring-tools\/\" target=\"_blank\" rel=\"noopener\">13 Tools to Monitor Linux Performance<\/a><\/p>\n<p>The flag\u00a0<code>-p<\/code>\u00a0sets a policy defining which network interfaces to display, in the example below, we will be monitoring the\u00a0<code>enp1s0<\/code>\u00a0network interface:<\/p>\n<pre>$ bmon -p enp1s0\r\n<\/pre>\n<div id=\"attachment_24450\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Monitor-Ethernet-Bandwidth.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24450\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Monitor-Ethernet-Bandwidth.png\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Monitor-Ethernet-Bandwidth.png 840w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Monitor-Ethernet-Bandwidth-768x624.png 768w\" alt=\"bmon - Monitor Ethernet Bandwidth\" width=\"840\" height=\"682\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">bmon \u2013 Monitor Ethernet Bandwidth<\/p>\n<\/div>\n<p>To use\u00a0<strong>bit per second<\/strong>\u00a0instead of\u00a0<strong>bytes per second<\/strong>, use the\u00a0<code>-b<\/code>\u00a0flag like so:<\/p>\n<pre>$ bmon -bp enp1s0\r\n<\/pre>\n<p>We can also define the intervals per second with the\u00a0<code>-r<\/code>\u00a0flag as follows:<\/p>\n<pre>$ bmon -r 5 -p enp1s0\r\n<\/pre>\n<h3>How to Use bmon Input Modules<\/h3>\n<p><strong>bmon<\/strong>\u00a0has a number of input modules that offer statistical data about interfaces, which includes:<\/p>\n<ol>\n<li><strong>netlink<\/strong>\u00a0\u2013 employs the Netlink protocol to collect interface and traffic control statistics from the kernel. This is the default input module.<\/li>\n<li><strong>proc<\/strong>\u00a0\u2014 reads interface statistics from the\u00a0<strong>\/proc\/net\/dev<\/strong>\u00a0file. It is considered a legacy interface and offered for backwards compatibly. It is a fallback module in case the Netlink interface is not available.<\/li>\n<li><strong>dummy<\/strong>\u00a0\u2013 this is a programmable input module for debugging and testing purposes.<\/li>\n<li><strong>null<\/strong>\u00a0\u2013 disables data collection.<\/li>\n<\/ol>\n<p>To find additional info about a module, invoke the it with the \u201c<strong>help<\/strong>\u201d option set as follows:<\/p>\n<pre>$ bmon -i netlink:help\r\n<\/pre>\n<p>The next command will invoke\u00a0<strong>bmon<\/strong>\u00a0with the\u00a0<strong>proc<\/strong>\u00a0input module enabled:<\/p>\n<pre>$ bmon -i proc -p enp1s0\r\n<\/pre>\n<h3>How to Use bmon Output Modules<\/h3>\n<p><strong>bmon<\/strong>\u00a0also uses output modules to display or export the statistical data collected by the input modules above, which includes:<\/p>\n<ol>\n<li><strong>curses<\/strong>\u00a0\u2013 this is an interactive curses based text user interface, it offers real time rate estimations and a graphical representation of each attribute. It is the default output mode.<\/li>\n<li><strong>ascii<\/strong>\u00a0\u2013 is a straightforward programmable text output meant for human consumption. It can display list of interfaces, detailed counters and graphs to the console. It is the default fallback output mode when curses is not available.<\/li>\n<li><strong>format<\/strong>\u00a0\u2013 is a fully scriptable output mode, it\u2019s meant for consumption by other programs-meaning we can use its output values at a later time in scripts or programs for analysis and more.<\/li>\n<li><strong>null<\/strong>\u00a0\u2013 this disables output.<\/li>\n<\/ol>\n<p>To get more info concerning a module, run the it with the \u201c<strong>help<\/strong>\u201d flag set like so:<\/p>\n<pre>$ bmon -o curses:help\r\n<\/pre>\n<p>The command that follows will invoke\u00a0<strong>bmon<\/strong>\u00a0in\u00a0<strong>ascii<\/strong>\u00a0output mode:<\/p>\n<pre>$ bmon -p enp1s0 -o ascii  \r\n<\/pre>\n<div id=\"attachment_24451\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Ascii-Output-Mode.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24451\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Ascii-Output-Mode.png\" sizes=\"auto, (max-width: 1060px) 100vw, 1060px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Ascii-Output-Mode.png 1060w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-Ascii-Output-Mode-768x520.png 768w\" alt=\"bmon - Ascii Output Mode\" width=\"1060\" height=\"718\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">bmon \u2013 Ascii Output Mode<\/p>\n<\/div>\n<p>We can run the format output module as well, then use the values obtained for scripting or in another program:<\/p>\n<pre>$ bmon -p enp1s0 -o format\r\n<\/pre>\n<div id=\"attachment_24452\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-format-output-mode.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24452\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/bmon-format-output-mode.png\" alt=\"bmon - Format Output Mode\" width=\"653\" height=\"574\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">bmon \u2013 Format Output Mode<\/p>\n<\/div>\n<p>For additional usage info, options and examples, read the\u00a0<strong>bmon<\/strong>\u00a0man page:<\/p>\n<pre>$ man bmon \r\n<\/pre>\n<p>Visit the bmon Github repository:\u00a0<a href=\"https:\/\/github.com\/tgraf\/bmon\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/github.com\/tgraf\/bmon<\/a>.<\/p>\n<p>That\u2019s all for now, test the various features of\u00a0<strong>bmon<\/strong>\u00a0in different scenarios and share your thoughts about it with us via the comment section below.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/bmon-network-bandwidth-monitoring-debugging-linux\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>bmon\u00a0is a simple yet powerful, text-based\u00a0network monitoring and debugging tool\u00a0for Unix-like systems, which captures networking related statistics and displays them visually in a human friendly format. It is a reliable and effective real-time bandwidth monitor and rate estimator. It can read input using an assortment of input modules and presents output in various output modes, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/14\/bmon-a-powerful-network-bandwidth-monitoring-and-debugging-tool-for-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;bmon \u2013 A Powerful Network Bandwidth Monitoring and Debugging Tool for Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-11493","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=11493"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11493\/revisions"}],"predecessor-version":[{"id":11494,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11493\/revisions\/11494"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=11493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=11493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=11493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}