nmon – is a another nifty tool to monitor system resources on Linux

nmon stands for Nigel’s performance Monitor for Linux & AIX, developed by IBM employee Nigel Griffiths. Initially, it was developed for IBM AIX operating system, later a version written for Linux too and released as a open source under GPL on 2009.

nmon is a another nifty tool to monitor various system resources such as CPU, memory, network, disks, file systems, NFS, top processes, Power micro-partition and resources (Linux version & processors) on Linux terminal.

It support common architectures like POWER, x86, x86_64, Mainframe & now ARM (Raspberry Pi). This system administrator tuner, benchmark tool gives you a huge amount of important performance information which will help you to troubleshoot the system performance when you have the issues.

For real-time monitoring it uses curses library for low CPU impact and you can see the data directly on the screen and updated every two seconds. Alternatively you can save the data to file for later analysis.

So many command line system performance monitoring tool is available in Linux like Top, Htop, etc but why i wrote about nmon because we can enable/disable the required statistics widgets with any sequence but all other tools not like that.

Install Nmon on Debian/Ubuntu/Mint

Debian based users can install nmon easily from distribution official repository by using below command.

$ sudo apt-get install nmon

Install Nmon on Fedora

Fedora users can install nmon easily from distribution official repository by using below command.

$ sudo dnf install nmon

Install Nmon on RHEL/CentOS

RHEL/CentOS users need to install/enable EPEL Repository in order to install nmon.

$ sudo yum install nmon

Install Nmon on openSUSE

openSUSE users can install nmon easily from distribution official repository by using below command.

$ sudo zypper in nmon

How to use nmon to monitory system performance

nmon wont required high end tech skill to work on it. Just type nmon and hit enter you will be presented with welcome screen similar to this. Welcome screen itself you will get all the major options to work further.

To display/hide particular widgets statistics, just press the associated key. Say for example, if you want to display CPU utilization, just press c and press again the same key c to hide the CPU utilization widgets statistics.

$ nmon
┌nmon─14g─────────────────────Hostname=2daygeek──Refresh= 2secs ───07:09.46───────────────────┐
│                                                                                             │
│  ------------------------------       For help type H or ...                                │
│  #    #  #    #   ####   #    #        nmon -?  - hint                                      │
│  ##   #  ##  ##  #    #  ##   #        nmon -h  - full                                      │
│  # #  #  # ## #  #    #  # #  #                                                             │
│  #  # #  #    #  #    #  #  # #       To start the same way every time                      │
│  #   ##  #    #  #    #  #   ##        set the NMON ksh variable                            │
│  #    #  #    #   ####   #    #                                                             │
│  ------------------------------                                                             │
│                                                                                             │
│  Use these keys to toggle statistics on/off:                                                │
│     c = CPU        l = CPU Long-term   - = Faster screen updates                            │
│     m = Memory     j = Filesystems     + = Slower screen updates                            │
│     d = Disks      n = Network         V = Virtual Memory                                   │
│     r = Resource   N = NFS             v = Verbose hints                                    │
│     k = kernel     t = Top-processes   . = only busy disks/procs                            │
│     h = more options                   q = Quit                                             │
│─────────────────────────────────────────────────────────────────────────────────────────────│
│                                                                                             │
│                                                                                             │
│                                                                                             │
│                                                                                             │
│                                                                                             │
│                                                                                             │
│                                                                                             │
└─────────────────────────────────────────────────────────────────────────────────────────────┘

Check CPU utilization by processor

Just press c key, to see the CPU utilization based on the processor. Each CPU shows (user process, sys process & wait process utilization).

┌nmon─13g──────[H for help]───Hostname=2daygeek──Refresh= 2secs ───07:06.29───────────────────┐
│ CPU Utilisation ────────────────────────────────────────────────────────────────────────────│
│                           +-------------------------------------------------+               │
│CPU  User%  Sys% Wait% Idle|0          |25         |50          |75       100|               │
│ 1   0.5   0.0   0.0   99.5|       >                                         |               │
│ 2   0.0   0.0   0.0  100.0|     >                                           |               │
│                           +-------------------------------------------------+               │
│Avg  0.2   0.2   0.0   99.5|      >                                          |               │
│                           +-------------------------------------------------+               │
│─────────────────────────────────────────────────────────────────────────────────────────────│
│                                                                                             │
│                                                                                             │
│                                                                                             │
│                                                                                             │
│                                                                                             │
│                                                                                             │
│                                                                                             │
│                                                                                             │
└─────────────────────────────────────────────────────────────────────────────────────────────┘

Check memory utilization

Just press m key to see memory utilization stats (cached, active, inactive, buffered, free in MB & free percent)

┌nmon─14g──────[H for help]───Hostname=2daygeek──Refresh= 2secs ───07:24.44───────────────────┐
│ Memory Stats ───────────────────────────────────────────────────────────────────────────────│
│                RAM     High      Low     Swap    Page Size=4 KB                             │
│ Total MB     32079.5     -0.0     -0.0  20479.0                                             │
│ Free  MB     11205.0     -0.0     -0.0  20479.0                                             │
│ Free Percent    34.9%   100.0%   100.0%   100.0%                                            │
│             MB                  MB                  MB                                      │
│                      Cached= 19763.4     Active=  9617.7                                    │
│ Buffers=   172.5 Swapcached=     0.0  Inactive = 10339.6                                    │
│ Dirty  =     0.0 Writeback =     0.0  Mapped   =    11.0                                    │
│ Slab   =   636.6 Commit_AS =   118.2 PageTables=     3.5                                    │
│─────────────────────────────────────────────────────────────────────────────────────────────│
│                                                                                             │
│                                                                                             │
│                                                                                             │
│                                                                                             │
│                                                                                             │
│                                                                                             │
└─────────────────────────────────────────────────────────────────────────────────────────────┘

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...

Close
Please support the site
By clicking any of these buttons you help our site to get better