Friday, January 25, 2013

Meet nmon, the task manager that runs in a terminal

A few weeks ago on the Linux Action Show Chris and Matt covered nmon as their desktop app pick for the week. While they provided a great in depth look on it, I also wanted to look into it as well out of my own personal interest, so I went ahead and installed nmon on my Ubuntu machine and started playing with it.

To install nmon on a debian/ubuntu distro, the package is already in the distro repos. To install, simply run:
sudo apt-get install nmon
and within a few seconds nmon should be installed, as the program is small because it is a very lightweight terminal program.

After installation, don't close the terminal. Just type in "nmon" and the program will launch. You are welcomed with a screen that shows you what keys to press to display certain parts of the tool. You can see what I mean in the image below.
So, if I wanted to monitor my CPU and RAM at the same time, all I'd have to do is press c and m. To get them to hide, just press the letters again. nmon by default has a 2 second refresh rate, but you can increase the refresh rate using the designated key, which is "-" by default.

Finally to exit the program, you press "q". You can also close the terminal but I prefer to close open processes first, then the terminal to avoid killing the program.

From the picture above, it's no that hard to actually use nmon. Just press a certain key to get a statistic to display, and then press the key again to hide the statistic. The nmon program takes very little resources and takes virtually no CPU to run.

If you're looking for a system monitor like program that runs in a terminal, and is easy to use, nmon is for you. I use it every day and I personally recommend using it.