How use Nmon and “Java Nmon Analyzer” for Monitor Linux Performance
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:
- Nmon helps in monitoring CPU utilization.
- Monitors Memory usage.
- Monitors Virtual memory.
- Monitors disks.
- Monitors filesystem.
- Monitors resources.
- Monitors kernel.
- Monitors network.
- 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:
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:
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:
Working with Analyser
Step 1: Before performing this step make sure to download and install Java Nmon Analyser from the site given :
Step 2: Make a pipe for nmon
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.
Please Login to comment...