Nmon command line: A Tool for Linux system performance monitoring

Source: Internet
Author: User

If you are looking for a very easy-to-use Linux performance monitoring tool, I strongly recommend installing and using the Nmon command line utility.

Nmon Monitoring Tool

Nmon is a system administrator tuning and benchmarking tool that displays performance data for the following:

  • Processor
  • Memory
  • Network
  • Disk
  • File System
  • Network File System NFS)
  • Processes that consume the most resources
  • Resources
  • Power Differential Zone

One thing I like very much about this tool is that it is completely interactive and can help Linux users or system administrators maximize the use of this necessary command.

Install the Nmon monitoring tool in Linux

If you are using a Debian-based Linux release, it is easy to install the Nmon command line utility, as long as you get it from the default software library. To install it, just open a new terminal and press CTRL + ALT + T), use the following command.

 
 
  1. $ sudo apt-get install nmon 

Are you a Fedora user? To install it on your machine, open a new terminal and run the following command.

 
 
  1. $ sudo yum install nmon 

CentOS/RHEL users only need to download the nmoninstallation token from http://pkgs.repoforge.org/nmon. In addition, you can install it by enabling the method http://www.tecmint.com/install-and-enable-rpmforge-repository-in-rhel-centos-6-5-4/ of the RPMForge software library.

How to Use Nmon to monitor Linux performance?

Once the Nmon installation is complete, you can start it from the terminal by typing the "nmon" command, and the following output will be displayed.

 
 
  1. # nmon 

Nmon Preview

You can see from the above screen that the nmon command line utility runs completely in interactive mode and displays the keys for switching to display statistics.

View CPU by processor

For example, if you want to collect statistics on CPU performance, you should press the "c" button on the keyboard of your system. After pressing the "c" button on the keyboard, I got a very detailed output, showing information about CPU usage.

CPU usage information displayed by processor

The following are some buttons that you can use with the utility to obtain information about other system resources on the machine.

 
 
  1. M = memory
  2. J = File System
  3. D = Disk
  4. N = Network
  5. V = Virtual Memory
  6. R = Resource
  7. N = NFS
  8. K = Kernel
  9. T = process that consumes the most resources
  10. . = Only busy disks/processes are displayed

Process statistics that consume the most resources

To obtain statistics about the processes that consume the most resources in Linux, press the "t" button on the disk and wait for the information to appear.

Processes that consume the most resources

Those familiar with top utilities can easily understand and interpret the above information. If you have just been familiar with Linux system management and have never used the top utility before, you may wish to run the following command on the terminal and try to compare the output with the above output. Are they similar, or are they the same as output?

 
 
  1. # top 

When using the buttons t and Nmon, it seems like running the top process monitoring utility.

View network statistics

Want to know some network statistics? Just click "n" on the keyboard ".

Network statistics

Disk input/output graphics

Press the "d" button to obtain disk information.

Monitoring disk input/output

View kernel information

A very important button used with this tool is "k", which can be used to display brief information about your system kernel.

View Linux kernel information

Obtain system information

For me, a very useful button is "r", which can be used to display information about different resources, such as the machine architecture, operating system version, Linux version, and CPU. If you look at the screen below the keyboard, you will be able to get a general idea of the importance of the "r" button.

System Information

View statistics on the file system

To obtain statistics on the file system, press "j" on the keyboard ".

File System statistics

You can see from the screen above that we have obtained information about the file system size, used space, idle space, file system type, and mount point.

Display NFS data

Press "N" to collect and display NFS data.

NFS data

So far, it is very easy to use the Nmon utility. You need to know more about this utility. One of them is the fact that you can use it in data capture mode. If you do not like data display on the screen, you can use the following command to easily capture a small sample file.

 
 
  1. # nmon -f -s13 -c 30 

After running the preceding command, you will get a file with the ". nnmon" extension in the directory where the tool is used. What does the "-f" option mean? The following briefly explains the options used in the above command.

  • -F indicates that you want to save the data to a file and it is not displayed on the screen.
  • -S13 means you want to capture data every 13 seconds.
  • -C 30 means you want 30 data points or snapshots.

Conclusion

Many tools have functions of Nmon utility, but for Linux beginners, none of them are as easy to use and user-friendly as they are. Unfortunately, this tool is not as versatile as other tools such as collectl, and it cannot provide users with in-depth and detailed statistics.

Finally, I can say that it is a practical tool suitable for Linux system administrators, especially for system administrators who are not familiar with command line options and commands.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.