Tutorials

Analyze Linux Performance Using Nmon on CentOS 7

Table of Contents

Introduction

Nmon is a monitoring tool designed for use on AIX and Linux to monitor and analyze computer performance data.

Nmon helpfully presents all the important performance tuning information on one screen and dynamically updates it. Nmon can also capture the same data to a text file for later analysis and graphing for reports. You can easily monitor your system's CPU usage, memory, network, disks, file systems, NFS, top processes, resources and power micro-partition information using nmon.

In this tutorial, I will explain how to use nmon to monitor the performance of your Linux system.

Nmon Features

Nmon monitors the system's performance data, including:

  • CPU utilization
  • Memory usage
  • Disk I/O rates, transfers, and read/write speed
  • Free space on file systems
  • Paging space and paging rates
  • Top processors
  • Kernel statistics
  • NFS
  • Machine details and resources

Requirements

  • A server running CentOS v.7

Installing Nmon

By default, nmon is available in the CentOS 7 repository. You can easily install it by running the following command:

sudo yum install nmon

Working With Nmon

Once the installation has finished, you can launch nmon with the command:

nmon

You will see the following output:

Nmon default page

As you can see from the above image, the nmon command-line utility runs completely in interactive mode and you can easily toggle statistics using shortcut keys.

You can use the following nmon keyboard shortcuts to display different system stats:

  • t = Top Process Stats
  • c = CPU by Processor
  • l = Longer term CPU Averages
  • m = Memory and Swap Stats
  • j = JFS Usage Stats
  • h = Help Information
  • n = Network Stats
  • d = Disk I/O Stats
  • o = Disk Busy Map
  • k = Kernel Stats and Load average
  • v = Virtual Memory Stats
  • g = User defined disk groups
  • v = Verbose Simple Checks
  • b = Black and White Mode
  • N = NFS

Check CPU By Processor

If you want to collect some statistics on CPU performance, click c. You will see the following output:

Nmon CPU performance

Check Top Processes

To get stats on the top processes that are running on your system, click t. You will see the following output:

Nmon top processes

Check Network Statistics

To get the network stats of your Linux system, click n. You will see the following output:

Nmon network info

Get System Information

A very useful keyboard shortcut for system administrators is r which gives information on different resources such as machine architecture, operating system version, Linux version and CPU.

Nmon system info

Disk I/O Graphs

Use d to get information about disks. You will see the following output:

Nmon disk info

Check Kernel Information

Another important keyboard shortcut is k, which is used to display some brief information on the kernel of your system. You will see the following output:

Nmon kernel info

Troubleshooting

If you are using PuTTY as your SSH client you may find that the nmon output does not look quite right.

PuTTY lqqqk output

This is due to terminal emulation settings and can be adjusted in a couple of different ways. You could try changing the font that PuTTY is using. The change can be made inside PuTTY Configuration, under the Window->Appearance->Font settings section. Use the Change button to select a different font. This screenshot shows changing from the default "Courier New" to "Lucida Sans Unicode". Other font options may work as well.

PuTTY change font

Another option would be to change from the UTF8 character set to one of the ISO-8859-15 character sets. The change can be made inside PuTTY Configuration, under the Window->Appearance->Translation section. Use the "Remote character set:" drop-down menu to select a different character set. This screenshot shows choosing ISO-8859-15:1999 (Latin-9, "euro")

PuTTY change character set

Either changing the font or the character set in your PuTTY connection settings should allow the output to display properly.

PuTTY nmon fixed output

 
  • Hey, Here we are going to share one of the best portal freecell solitaire free online games as these games are of cards and for winning these games you must know about the power moves of the game.

Log In, Add a Comment