nmon (Nigel’s Performance Monitor) shows the most important performance data of a Linux system in a single console window: CPU load per core, memory, disk I/O, network traffic, file systems and the most active processes. You decide with a keystroke which sections are displayed. On top of that, nmon can write the values to a file for hours or days – ideal for tracking down sporadic load peaks on a server.
Installation
# Ubuntu / Debian
sudo apt install nmon
# Fedora / RHEL (EPEL)
sudo dnf install nmon
Interactive view
After starting it with nmon, only a start screen appears at first. The following keys toggle the individual sections on and off – they are stacked below each other:
| Key | Display |
|---|---|
| c | CPU utilisation per core |
| l | CPU history as a long-term graph |
| m | Memory and swap |
| d | Disk read and write rates |
| n | Network interfaces |
| j | File systems and usage |
| t | Top processes |
| k | Kernel statistics (load, context switches) |
| + / – | Double / halve the refresh interval |
| h | Help |
| q | Quit |
A good basic view for servers is c m d n. So that you do not have to press the keys on every start, the selection can be preset through an environment variable:
NMON=cmdnt nmon
To make this permanent, put export NMON=cmdnt in your ~/.bashrc.
Long-term recording
The real strength of nmon: it can collect measurements in the background. The following example takes a sample every 60 seconds for 24 hours (1440 samples):
mkdir -p ~/nmon
nmon -f -s 60 -c 1440 -m ~/nmon
-f– write to a file instead of displaying (keeps running in the background)-s 60– interval between two samples in seconds-c 1440– number of samples-m ~/nmon– target directory
The file is then called, for example, server_261130_0400.nmon. For a daily recording a cron entry is a good fit:
0 0 * * * /usr/bin/nmon -f -s 60 -c 1440 -m /var/log/nmon
30 0 * * * find /var/log/nmon -name '*.nmon' -mtime +30 -delete
The second line deletes recordings older than 30 days.
Analysing recordings
The .nmon files are CSV text and can be turned into charts with suitable tools:
- nmonchart – a script by the nmon author that generates an HTML page with interactive charts you can open in a browser
- NMONVisualizer – a Java program for the desktop that can compare several files and servers
Both are linked from the nmon project page.
nmon, htop or btop?
If you mainly want to see and kill processes, htop is the better choice. nmon shows its strengths when it comes to the interplay of CPU, memory, disks and network – and above all when recording over longer periods, which htop and btop cannot do.
Originally published in 2012, completely revised in November 2026.