By Mouhamadou Diaw

I was looking for tools to monitor linux servers and I found an interesting one nmon ( short for Nigel’s Monitor). I did some tests. In this blog I am describing how to install nmon and how we can use it
I am using a Oracle Enterprise Linux System.

1
2
3
4
5
[root@condrong nmon]# cat /etc/issue
Oracle Linux Server release 6.8
Kernel \r on an \m
[root@condrong nmon]#

For the installation I used the repository epel

1
2
3
4
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum search nmon
yum install nmon.x86_64

Once installed, the tool is launched by just running the nmon command

1
[root@condrong nmon]# nmon

nmon1

If we type c we have CPU statistics
nmon2
If we type m we have memory statistics
nmon3
If we type t we can see Top Processes and so on
nmon4

nmon can be also scheduled. The data are collected in a file and this file can be analyzed later. For this we can use following options

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
OPTIONS
       nmon follow the usual GNU command line syntax, with long options starting
       with  two  dashes  (‘-’).   nmon  [-h] [-s ] [-c ] [-f -d
        -t -r ] [-x] A summary of options is included below.
       -h     FULL help information
              Interactive-Mode: read startup banner and type"h"  once  it  is
              running For Data-Collect-Mode (-f)
       -f            spreadsheet output format [note: default -s300 -c288]
              optional
       -s   between refreshing the screen [default 2]
       -c    of refreshes [default millions]
       -d     to increase the number of disks [default 256]
       -t            spreadsheet includes top processes
       -x            capacity planning (15 min for 1 day = -fdt -s 900 -c 96)

In my example I just create a file my_nmon.sh and execute the script

1
2
3
4
5
6
[root@condrong nmon]# cat my_nmon.sh
#! /bin/bash
nmon -f -s 60 -c 30
[root@condrong nmon]# chmod +x my_nmon.sh
[root@condrong nmon]# ./my_nmon.sh

Once executed, the script will create a file in the current directory with an extension .nmon

1
2
3
[root@condrong nmon]# ls -l *.nmon
-rw-r--r--. 1 root root 55444 Oct 18 09:51 condrong_181018_0926.nmon
[root@condrong nmon]#

To analyze this file, we have many options. For me I downloaded the nmon_analyzer
This tool works with Excel 2003 on wards and supports 32-bit and 64-bit Windows.
After copying my nmon output file in my windows station, I just have to launch the excel file and then use the button Analyze nmon data
nmon5
And below I show some graphs made by the nmon_analyzer
nmon6

nmon7

nmon8

Conclusion
As we can see nmon is a very useful tool which can help monitoring our servers. It works also for Aix systems.