Nmon command line: Linux System performance monitoring tool

Source: Internet
Author: User

If you're looking for a very easy-to-use Linux performance monitoring tool right now, I highly recommend installing and using the Nmon command-line utility.

Nmon Monitoring Tools

The Nmon is a system administrator-oriented tuning and benchmarking tool that can be used to display performance data about the following:

    • Processor
    • Memory
    • Internet
    • Disk
    • File system
    • Network File System (NFS)
    • The process that consumes the most resources
    • Resources
    • Power Micro-Partitioning

One of the places I really like about this tool is that it's completely interactive and can help Linux users or system administrators make the most of the necessary commands.

Installing the Nmon monitoring tool in Linux

If you're using a Debian-based Linux distribution, it's easy to install the Nmon command-line utility, just get it from the default repositories. To install it, just open a new terminal (press ctrl+alt+t) and use the command below.

    1. $ sudo apt-get install Nmon

Are you a Fedora user? To install in your machine, open a new terminal and run the command below.

    1. $ sudo yum install Nmon

Centos/rhel users can install it only if they download Nmon from http://pkgs.repoforge.org/nmon/. Alternatively, you can also enable the Rpmforge software library by enabling the method (http://www.tecmint.com/install-and-enable-rpmforge-repository-in-rhel-centos-6-5-4/ ) to install it.

How do I monitor Linux performance using Nmon?

Once the Nmon is installed, you can start it by typing the "nmon" command from the terminal and you will see the following output.

    1. # Nmon

Nmon Preview

As you can see from the above screen, the Nmon command-line utility runs completely in interactive mode, which displays the keys for the user to toggle display statistics.

View CPU by processor

For example, if you want to collect some statistics on CPU performance, you should press the "C" button on the keyboard of the system you are using. When I press the "C" button on my keyboard, I get a very detailed output showing the information about CPU usage.

CPU usage information by processor

Here are some keys you can use with this utility to get information about other system resources in your 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 = The process that consumes the most resources
    10. . = only busy disks/processes are displayed

Statistics on processes with the most resources consumed

To get statistics on the most expensive processes running on a Linux system, just press the "T" button on your keyboard and wait for information to appear.

The process that consumes the most resources

Those who are familiar with the top utility are easy to understand and can interpret the above information. If you are new to Linux system management and have never used the top utility before, you might want to run the following command in the terminal and try to compare the resulting output to the above output. Do they look similar, or do they say the output is the same?

    1. # Top

When I use the button "T" and the Nmon tool, it seems as if I was running the top process monitoring utility.

View statistics on the Web

Want to know some statistics on the Internet? Just press "n" on the keyboard.

Network statistics

Disk input/Output graphics

Use the "D" button to get information about the disk.

Monitoring disk input/output

View kernel information

A very important key that is used in conjunction with the tool is "K", which can be used to display some brief information about your system kernel.

View Linux kernel information

Get System Information

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

System Information

View File System Statistics

To get statistics on the file system, press "J" on the keyboard.

File System Statistics

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

displaying NFS data

Press "N" to help collect and display NFS data.

NFS Data

So far, it has been easy to use the Nmon utility. For this utility, you also need to know a lot of other aspects, one of which is the fact that you can use it in data capture mode. If you don't like the data displayed on the screen, you can easily capture a small sample file using this command.

    1. # nmon-f-s13-c 30

After running this command, you will get a file with the ". Nnmon" extension in the directory where you use the tool. What does the "-f" option mean? The following is a concise explanation of the options used in the above command.

    • -F means that you want to save the data to a file that is not displayed on the screen.
    • -s13 means you want to capture data every 13 seconds.
    • The-c 30 means you want 30 data points or a snapshot.

Conclusion

There are many tools that have the functionality of the Nmon utility, but for Linux beginners, no one is as easy to use and user friendly as it is. Unfortunately, this tool is not as rich as other tools such as COLLECTL, nor does it provide users with in-depth and detailed statistics.

Finally, I can say that it is a useful tool for Linux system administrators, especially for system administrators who are unfamiliar with command-line options and commands.

Nmon command line: A tool for monitoring the performance of Linux systems

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.