Open In App

How use Nmon and “Java Nmon Analyzer” for Monitor Linux Performance

Last Updated : 01 Dec, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Nmon or Nigel’s Performance Monitor is a tool that is used for the purpose of monitoring resources on Linux,  x86_64, Mainframe, etc. With the help of Nmon, you can monitor CPUs, disks, memory, and a couple of other things. There are two modes of Nmon:

  • Online mode: This is used for the purpose of real-time monitoring. 
  • Capture mode: In this, the output is saved in a CSV file and is processed later.

Java Nmon analyzer uses the output from the nmon as its input, for running Java Nmon analyzer, having Nmon installed is a prerequisite.

Features of Nmon:

  1. Nmon helps in monitoring CPU utilization.
  2. Monitors Memory usage.
  3. Monitors Virtual memory.
  4. Monitors disks.
  5. Monitors filesystem.
  6. Monitors resources.
  7. Monitors kernel.
  8. Monitors network.
  9. Monitors Top-processes.

Getting started with Nmon and Java Nmon Analyzer

Step 1: Installing NMON

You can install nmon from the official nmon site. The link to the site is:

 https://nmon.sourceforge.net/pmwiki.php?n=Site.Download

 

After installing the appropriate tar file according to your system and version, install the downloaded package from the below command:

yum install nmon

 

 Step 2: Start the NMON service

After installing nmon start it by typing the below command:

nmon

 

A window like this will appear after writing the above command. There are various commands to see various statistics:

 

Let us look at the analysis that NMON provides, there are a lot of options available but we will see some of them for demonstration purposes:

Example 1: CPU statistics

To see the CPU statistics type ‘c’.

 

Example 2: Memory statistics:

To see the memory statistics type ‘m’.

 

Example 3: Network statistics

To see the network statistics type ‘n’.

 

Likewise, you can try the other options also to see the required statistics.

Step 3. Working with java nmon analyzer

Java is required for running the nmon analyzer, so make sure that your system has JDK installed. Use the below commands to install JDK.

sudo yum install java-<version>-openjdk

Confirm the installation by typing:

java -version

 

Working with Analyser

Step 1: Before performing this step make sure to download and install Java Nmon Analyser from the site given :

https://sourceforge.net/projects/jnmonanalyser/postdownload 

 

  Step 2: Make a pipe for nmon

mkfifo /tmp/nmonnamedpipe

 

  Step 3: Running the analyzer in the target host:

java -cp nmonanal_0.1.2.jar li.xiang.nmonanalyser.agent.Agent

 

 Step 4. Running nmon to capture performance:

nmon -s 18 -c 360 -F /tmp/nmonnamedpipe

 

Step 5: Running Nmon GUI to analyze:

After running the above command use the below command to run the java nmon analyzer GUI, a pop-up window of System performance monitor will appear:

java -jar nmonanal_0.1.2.jar

 

Click on the top left corner of the newly appeared screen and click on data loader and select From an agent in the drop-down menu.

 

After selecting the above option a box will appear in which you have to enter the IP address of the agent and the default port on which the agent is listening. The default port is 8187.

 

Click on connect and wait for some time till the process is finished.

So this was the explanation about Nmon and Java Nmon Analyzer in a clear, step-wise manner. 


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads