{"id":11832,"date":"2019-03-17T13:29:51","date_gmt":"2019-03-17T13:29:51","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=11832"},"modified":"2019-03-17T13:29:51","modified_gmt":"2019-03-17T13:29:51","slug":"nmon-analyze-and-monitor-linux-system-performance","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/17\/nmon-analyze-and-monitor-linux-system-performance\/","title":{"rendered":"Nmon: Analyze and Monitor Linux System Performance"},"content":{"rendered":"<p>If you are looking for a very easy to use performance monitoring tool for Linux, I highly recommend to install and use the\u00a0<strong>Nmon<\/strong>\u00a0command-line utility.<\/p>\n<div id=\"attachment_6410\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/Nmon.jpeg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-6410\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/Nmon-620x383.jpeg\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/Nmon-620x383.jpeg 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/Nmon.jpeg 681w\" alt=\"Install Nmon in Linux\" width=\"620\" height=\"383\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Nmon Monitoring Tool<\/p>\n<\/div>\n<p><strong>Nmon<\/strong>\u00a0is a system\u2019s administrator tuner, benchmark tool that can be used to display performance data about the followings:<\/p>\n<ol>\n<li>cpu<\/li>\n<li>memory<\/li>\n<li>network<\/li>\n<li>disks<\/li>\n<li>file systems<\/li>\n<li>nfs<\/li>\n<li>top processes<\/li>\n<li>resources<\/li>\n<li>power micro-partition<\/li>\n<\/ol>\n<p>A very nice thing I really like about this tool is the fact that it is fully interactive and helps the Linux user or the system administrator with the necessary command to get the most out of it.<\/p>\n<h3>Installing Nmon Monitoring Tool in Linux<\/h3>\n<p>If you are using a\u00a0<strong>Debian\/Ubuntu<\/strong>\u00a0based Linux distribution you can easily install the\u00a0<strong>Nmon<\/strong>\u00a0command-line utility by grabbing it from the default repositories.<\/p>\n<p>To install,\u00a0Open a new terminal (<strong>CTRL+ALT+T<\/strong>) and use the following command.<\/p>\n<pre>$ sudo apt-get install nmon<\/pre>\n<p>Are you a\u00a0<strong>Fedora<\/strong>\u00a0user? To install in your machine open a new terminal and run the following command.<\/p>\n<pre># yum install nmon\r\n<\/pre>\n<p><strong>CentOS<\/strong>\/<strong>RHEL<\/strong>\u00a0users can install it, by installing\u00a0<a href=\"https:\/\/www.tecmint.com\/how-to-enable-epel-repository-for-rhel-centos-6-5\/\" target=\"_blank\" rel=\"noopener\">EPEL repository<\/a>\u00a0as shown:<\/p>\n<pre># yum install epel-release\r\n# yum install nmon\r\n<\/pre>\n<h3>How to use Nmon to Monitor Linux Performance<\/h3>\n<p>Once the installation of\u00a0<strong>Nmon<\/strong>\u00a0has been finished and you launch it from the terminal by typing the \u2018<strong>nmon<\/strong>\u2018 command you will be presented with the following output.<\/p>\n<pre># nmon<\/pre>\n<div id=\"attachment_6400\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-6400\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon1-595x450.png\" sizes=\"auto, (max-width: 595px) 100vw, 595px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon1-595x450.png 595w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon1.png 652w\" alt=\"Nmon Preview\" width=\"595\" height=\"450\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Nmon Preview<\/p>\n<\/div>\n<p>As you guys can see from the above screenshot, the nmon command-line utility runs completely in interactive mode and it presents the user with the keys to toggle statistics.<\/p>\n<h4>Check CPU by processor<\/h4>\n<p>For example, if you would like to collect some statistics on\u00a0<strong>CPU<\/strong>\u00a0performance you should hit the \u2018<strong>c<\/strong>\u2018 key on the keyboard of the system you are using. After hitting the \u2018<strong>c<\/strong>\u2018 key on my keyboard I get a very nice output that gives me information on my\u00a0<strong>CPU<\/strong>\u00a0usage.<\/p>\n<div id=\"attachment_6402\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-6402\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon2-596x450.png\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon2-596x450.png 596w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon2.png 657w\" alt=\"Monitor CPU by Processor\" width=\"596\" height=\"450\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">CPU by Processor<\/p>\n<\/div>\n<p>The following are the keys you can use with the\u00a0 utility to get information on other system resources present in your machine.<\/p>\n<ol>\n<li><strong>m<\/strong>\u00a0= Memory<\/li>\n<li><strong>j<\/strong>\u00a0= Filesystems<\/li>\n<li><strong>d<\/strong>\u00a0= Disks<\/li>\n<li><strong>n<\/strong>\u00a0= Network<\/li>\n<li><strong>V<\/strong>\u00a0= Virtual Memory<\/li>\n<li><strong>r<\/strong>\u00a0= Resource<\/li>\n<li><strong>N<\/strong>\u00a0= NFS<\/li>\n<li><strong>k<\/strong>\u00a0= kernel<\/li>\n<li><strong>t<\/strong>\u00a0= Top-processes<\/li>\n<li><strong>.<\/strong>\u00a0= only busy disks\/procs<\/li>\n<\/ol>\n<h4>Top Process Statistics<\/h4>\n<p>To get stats on top processes that are running on your Linux system press the key \u2018<strong>t<\/strong>\u2018 on your keyboard and wait for the information to show up.<\/p>\n<div id=\"attachment_6403\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-6403\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon3-596x450.png\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon3-596x450.png 596w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon3.png 653w\" alt=\"Monitor Linux Running Processes\" width=\"596\" height=\"450\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Top Processes<\/p>\n<\/div>\n<p>Those familiar with the\u00a0<a href=\"https:\/\/www.tecmint.com\/12-top-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">top utility<\/a>\u00a0will understand and be able to interpret the above information very easy. If you are new to Linux system administering and have never used the top utility before, run the following command in your terminal and try to compare the produced output with the above one. Do they look similar, or is it the same output?<\/p>\n<pre># top<\/pre>\n<p>It looks like I am running the top process monitoring utility when I use the key \u2018<strong>t<\/strong>\u2018 with the Nmon tool to me.<\/p>\n<h4>Check Network Statistics<\/h4>\n<p>How about some network stats? Just press \u2018<strong>n<\/strong>\u2018 on your keyboard.<\/p>\n<div id=\"attachment_6404\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-6404\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon4-596x450.png\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon4-596x450.png 596w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon4.png 653w\" alt=\"Monitor Linux Network Statistics\" width=\"596\" height=\"450\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Network Statistics<\/p>\n<\/div>\n<h4>Disk I\/O Graphs<\/h4>\n<p>Use the \u2018<strong>d<\/strong>\u2018 key to get information on disks.<\/p>\n<div id=\"attachment_6405\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-6405\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon5-598x450.png\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon5-598x450.png 598w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon5.png 654w\" alt=\"Monitor Linux Disk I\/O\" width=\"598\" height=\"450\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Monitor Disk I\/O<\/p>\n<\/div>\n<h4>Check Kernel Information<\/h4>\n<p>A very important key to use with this tool is \u2018<strong>k<\/strong>\u2018, it is used to display some brief information on the kernel of your system.<\/p>\n<div id=\"attachment_6406\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-6406\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon6-593x450.png\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon6-593x450.png 593w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon6.png 652w\" alt=\"Kernel Information\" width=\"593\" height=\"450\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Check Linux Kernel Information<\/p>\n<\/div>\n<h4>Get System Information<\/h4>\n<p>A very useful key for me is the key \u2018<strong>r<\/strong>\u2018 which is used to give information on different resources such as machine architecture, operating system version, Linux version and CPU. You can get an idea of the importance of the key \u2018<strong>r<\/strong>\u2018 by looking the following screenshot.<\/p>\n<div id=\"attachment_6407\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-6407\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon7-596x450.png\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon7-596x450.png 596w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon7.png 656w\" alt=\"Get Linux System Information\" width=\"596\" height=\"450\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">System Information<\/p>\n<\/div>\n<h4>Check File System Statistics<\/h4>\n<p>To get stats on the file systems press \u2018<strong>j<\/strong>\u2018 on your keyboard.<\/p>\n<div id=\"attachment_6408\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-6408\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon8-591x450.png\" sizes=\"auto, (max-width: 591px) 100vw, 591px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon8-591x450.png 591w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon8.png 653w\" alt=\"Monitor Linux File System\" width=\"591\" height=\"450\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">File System Statistics<\/p>\n<\/div>\n<p>As you can see from the above screenshot, we get information on size of the file system, used space, free space, type of the file system and the mount point.<\/p>\n<h4>Display NFS Data<\/h4>\n<p>The key \u2018<strong>N<\/strong>\u2018 can help to collect and display data on NFS.<\/p>\n<div id=\"attachment_6409\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-6409\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon9-599x450.png\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon9-599x450.png 599w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/04\/nmon9.png 654w\" alt=\"Monitor NFS\" width=\"599\" height=\"450\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">NFS Data<\/p>\n<\/div>\n<p>So far it has been very easy to work with the\u00a0<strong>Nmon<\/strong>\u00a0utility. There are many other thing you need to know about the utility and one of them is the fact that you can use in data captured mode. If you don\u2019t like the data to be displayed on the screen you can easily capture a small sample file with the following command.<\/p>\n<pre># nmon -f -s13 -c 30<\/pre>\n<p>After running the above command you will get a file with \u2018<strong>.nmon<\/strong>\u2018 extension in the directory where you were while working with the tool. What is the \u2018<strong>-f<\/strong>\u2018 option? The following is a simple and short explanation of the options used in the above command.<\/p>\n<ol>\n<li>The\u00a0<strong>-f<\/strong>\u00a0means you want the data saved to a file and not displayed on the screen.<\/li>\n<li>The<strong>\u00a0-s13<\/strong>\u00a0means you want to capture data every 13 seconds.<\/li>\n<li>The\u00a0<strong>-c 30<\/strong>\u00a0means you want thirty data points or snap shots.<\/li>\n<\/ol>\n<h3>Conclusion<\/h3>\n<p>There are many tools that can do the job of the\u00a0<strong>Nmon<\/strong>\u00a0utility, but none of them is so easy to use and friendly to a Linux beginner. Unfortunately the tool does not have as many features as other tools such as\u00a0<a href=\"https:\/\/www.tecmint.com\/linux-performance-monitoring-with-collectl-tool\/\" target=\"_blank\" rel=\"noopener\">collectl<\/a>\u00a0and it can not provide in-depth stats to the user.<\/p>\n<p>At the end I can say it is a very nice utility for a Linux system administrator, especially for someone that is not familiar with command-line options and commands.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/nmon-analyze-and-monitor-linux-system-performance\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are looking for a very easy to use performance monitoring tool for Linux, I highly recommend to install and use the\u00a0Nmon\u00a0command-line utility. Nmon Monitoring Tool Nmon\u00a0is a system\u2019s administrator tuner, benchmark tool that can be used to display performance data about the followings: cpu memory network disks file systems nfs top processes resources &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/17\/nmon-analyze-and-monitor-linux-system-performance\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Nmon: Analyze and Monitor Linux System Performance&#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-11832","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\/11832","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=11832"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11832\/revisions"}],"predecessor-version":[{"id":11833,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11832\/revisions\/11833"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=11832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=11832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=11832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}