Install and Use nmon Tool To Monitor Linux Systems Performance

How do I install nmon command under Linux operating systems to find out performance information for my CPU, memory, network, disk, virtual memory, top process and other part of my HP server running on Debian Linux or CentOS Linux 6.x amd64 bit server?

This systems administrator, tuner, benchmark tool gives you a huge amount of important performance information in one go with a single binary.

Tutorial details
Difficulty level Intermediate
Root privileges Yes
Requirements None
Est. reading time N/A
It works on Linux, IBM AIX Unix, Power, x86, amd64 and ARM based system such as Raspberry Pi. The nmon command displays and records local system information. The command can run either in interactive or recording mode.

Debian / Ubuntu Linux Install nmon

Type the following apt-get command:
# apt-get install nmon
Sample outputs:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 52.5 kB of archives.
After this operation, 164 kB of additional disk space will be used.
Get:1 squeeze/main nmon amd64 13g+debian-1 [52.5 kB]
Fetched 52.5 kB in 1s (32.0 kB/s)
Selecting previously deselected package nmon.
(Reading database ... 29511 files and directories currently installed.)
Unpacking nmon (from .../nmon_13g+debian-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up nmon (13g+debian-1) ...

A note about RHEL / CentOS Linux user

You can download nmon binary version by visiting this page.

Compiling Nmon Under RHEL / CentOS / Fedora / Scientific Linux

Grab the source code and makefile using wget command:
$ wget
$ wget

You need to install ncurses-devel package, enter:
# yum install ncurses-devel
Rename file, enter:
$ mv lmon14g.c lmon.c
Open the makefile and find the the directive that matches your platform and Linux release:
$ vi makefile
To compile for RHEL/CentOS v5.x, enter:
$ make nmon_x86_rhel52
Sample outputs:

cc -o nmon_x86_rhel52 lmon.c -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -g

You can move nmon_x86_rhel52 to /usr/local/sbin, enter:
# mv nmon_x86_rhel52 /usr/local/sbin/nmon

How do I use nmon?

Simply type the following command:
# nmon
Sample outputs:

Command to analyze Linux server performance - cpu / memory / network / disk and much more

Fig.01: nmon startup screen

nmon keyboard shortcuts

  • q – To stop and exit nmon.
  • h – To see quick help (hint) screen and press h again to remove the hints.
  • Use the following command to turn on or off stats:
    • c – See cpu stats.
    • m – See memory stats.
    • d – See disk stats.
    • k – See kernel stats.
    • n – See network stats.
    • N – See NFS stats.
    • j – See file system stats.
    • t – See top process.
    • V – See virtual memory stats.
    • . – See only busy disks/procs.
    • v – Verbose mode (display as Ok/warning/danger on screen).

Sample output from my home server:

nmon Command Examples

Fig.02: nmon command in action

How do I set default monitoring options for nmon?

To see the memory, network, disk and processor statistics immediately after the nmon command is started, run (or add in your shell startup file):
# export NMON=mndc
Run the nmon command:
# nmon

Capturing and analyzing data with nmon

You can capture the data to a file for later analysis and graphing. Type the following command:
# nmon -f -s2 -c 30
# nmon -ft -s 30 -c 120
nmon will run as a daemon in the background and you can log out. nmon will complete the data file capture and it will save in a file *.nmon file such as nas02_120806_0202.nmon. Where,

  1. -f : Start data collect mode and output in spreadsheet format.
  2. -s 2 : Wait between 2 seconds refreshing the screen.
  3. -c30 : Total number of refreshes (30).
  4. -t : Spreadsheet includes top processes.
  5. -d disks : to increase the number of disks [default 256]
  6. -x : Capacity planning (15 min for 1 day = -fdt -s 900 -c 96)

You need to download nmonanalyser which is an Excel spreadsheet that takes an output file from nmon and produces some nice graphs to aid in analysis and report writing.

Check out related media

See a quick installation and demo of nmon command:

(Video 01: nmon Linux installation and quick usage demo)

Recommended readings:

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 24 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
24 comments… add one
  • Leszek Aug 6, 2012 @ 6:28

    Very useful, thanks!

  • Miki Aug 6, 2012 @ 7:42

    It’s much better organized than top

  • Ahmed Kamel Aug 6, 2012 @ 9:17

    this tool is java based and can work on multi platforms better than working on excel noly

    you can pass the .nmon file to it and it will display a graph for the results

    • 🐧 nixCraft Aug 6, 2012 @ 11:05

      Nice find.

      Appreciate your comment.

      • marimuthu May 10, 2016 @ 11:44

        NMON installation has been done through your guides. really happy with us

  • David Aug 6, 2012 @ 16:48

    This page is great !!


  • Steve Aug 6, 2012 @ 20:26

    Try htop – it’s probably better

    • Ken Apr 23, 2017 @ 14:45

      Htop is nice, but it’s not nearly as informative. For example, you can not see network traffic at all. And even some of the areas that Htop provides information on, it’s not nearly as in depth as nmon.

  • Jalal Hajigholamali Aug 9, 2012 @ 17:37

    very nice article……

  • Umair Sep 1, 2012 @ 7:40

    Is it possible that it automatically output the result in a custom LOG FILE at regular intervals ????

  • Pablo Serrano Sep 4, 2012 @ 8:52

    I don’t know this tool, and see very useful. Other tool like this, it’s atop, vivek knows :)

  • MP Apr 5, 2013 @ 10:16

    Noce one

    It working fin for me.

  • sibin May 15, 2013 @ 6:33

    Hi I used nmon precompiled binary file to monitor my server (centos 6.4).Its recorded 230 kb and 630 kb data for 10 minutes.I used java nmon analyzer to see the graphs but it closed suddenly when I tried to open the file.I dont know why is it happened.I installed java and set environment variables successfully but this software didnt worked for me.Any help?Its very urgent for me.

  • Abhi Jul 25, 2013 @ 11:09

    am not able to use nmon -F *********** command.
    What setting/config should be done in order to use the -F mode.

    Could someone breifly explain this.

  • Muhamed Aug 12, 2013 @ 0:57

    what if i want to uninstall this tool ?

  • George Feb 26, 2014 @ 8:46

    Is there a way to run this tool locally on a system to get the system stats of a remote machine over the network. The remote machine should not be installed with nmon tool at all.

  • Abhishek Feb 26, 2014 @ 10:11

    Hi George,

    I dont think thats possible. We need to get the NMON installed on the machines which needs to be monitored.

  • surendra Jul 26, 2014 @ 4:10

    Thanks fos sharing knowledage on nmon…………….

    Could you please share the RHEL 5 version i686 nmon rpm package/ biniaries files.

  • Guilhem Aug 10, 2014 @ 10:22


    I have developped a complete Application over Splunk which uses Nmon and provides an Entreprise class solution to exploit Nmon performance monitors for large and historical vision:

    The Application is open source, Splunk itself can be used for free with Up to 500mb of volume indexing per day.

    The solution provides many interfaces to Analyse Nmon data and is compatible with AIX, Linux and Solaris.

  • Williams Abioye May 18, 2015 @ 12:23

    Thanks for the guide, very helpful, what if I want to uninstall NMON.

  • Tom Rose Aug 13, 2015 @ 15:05

    Is there a document that defines the structure of the CSV file? i.e. for each record type, what data appears in each field.

    I have been searching for a week and canot find anything,and i do not fancy revverse engineeering the C code of nmon or the VB of the Excel nmon analyzer

  • JRC Jan 19, 2016 @ 21:00

    trying to install Nmon for linux with command rpm_nmon, got this message:
    error: failed dependencies: () (64bit) is needed for nmon-15g-4.2.x86_64
    Where can i get such dependency ?


  • Bowman Kelley May 30, 2016 @ 19:15

    NMON is invaluable now! Thanks for the concise tutorial. Installed without a hitch.

  • Deepak Jun 6, 2016 @ 9:51

    Very Useful .. Thanks a lot.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum