Linux usage history of CPU Memory and Disk usage using nmon
How to monitor your Linux servers with nmon
The advantage of the nmon tool over top is it will, using a simple ncurses interface, display the usage for CPU, memory, network, disks, file system, NFS, top processes, resources, and power micro-partition. What's best is that you get to choose what nmon displays. And since it's text-based, you can secure shell into your servers and get a quick glimpse.
How to create Linux usage history file
- Install nmon
- $ sudo apt-get install nmon
- create a directory nmon
- $ mkdir ~/nmon
- $ cd ~/nmon
- create an executable file named monitor.sh with contents, collect every 30 seconds for 1440 times (12 hours)
-
#! /bin/sh nmon -f -s 30 -c 1440
-
- From the nmon directory run the command
- $ ./monitor.sh
- Install Korn shell, if not installed
- Install nmonChart
- Convert your.nmon file to an html page like this.
If your .nmon is called hostname_date_time.nmon and the website pages are at /webpages/docs then use it like this:
./nmonchart hostname_date_time.nmon /webpages/docs/hostname_date_time.html