nmon Command

The nmon (Nigel's Monitor) command is a powerful and versatile system performance monitoring tool for Linux and AIX. It provides a comprehensive, real-time view of various system resources, including CPU, memory, disk I/O, network I/O, top processes, and more. It can also save data for later analysis.

Syntax

nmon [OPTIONS]

Description

nmon can operate in two main modes: interactive mode for real-time monitoring and data collection mode for saving performance statistics to a file. In interactive mode, users can press various keys to toggle different statistics views. The collected data files (.nmon) can be imported into the nmon analyzer spreadsheet tool for graphical analysis.

Key features of nmon:

  • Real-time display of system performance metrics.
  • Monitors CPU, memory, disk, network, and top processes.
  • Supports data collection for historical analysis.
  • Lightweight and low overhead.
  • Useful for identifying performance bottlenecks and trends.

Common Options

Option Description
-s <seconds> Data collection interval in seconds.
-c <count> Number of data collection snapshots.
-f Output data to a file (default filename is hostname_YYMMDD_HHMM.nmon).
-t Include top processes in the output.
-A Include all sections in the output file.
-F <filename> Specify the output filename.
-h Display help information.

Examples

Start real-time interactive monitoring

nmon

Launches nmon in interactive mode. Press keys like c, m, d, n, t to view different statistics.

Collect performance data for 1 hour (30s interval, 120 snapshots)

nmon -f -s 30 -c 120

Collects data every 30 seconds for 120 times, saving it to a .nmon file.

Collect data with top processes and custom filename

nmon -F my_server_perf.nmon -t -s 60 -c 60

Saves performance data, including top processes, to my_server_perf.nmon, with 60 snapshots at 60-second intervals.

Analyze a .nmon file (using nmon analyzer)

# Download nmon analyzer spreadsheet (e.g., nmon_analyzer_v34a.xlsm) # Open the .xlsm file in Excel or LibreOffice Calc # Import the .nmon data file into the spreadsheet

Steps to visualize the collected performance data using the nmon analyzer spreadsheet.

See also