[转帖]How use Nmon and "Java Nmon Analyzer" for Monitor Linux Performance

How use Nmon and "Java Nmon Analyzer" for Monitor Linux Performance

https://linoxide.com/monitoring-2/install-nmon-monitor-linux-performance/

Updated May 9, 2018By Pungki AriantoMONITORINGOPEN SOURCE TOOLS

Nmon is a  resource monitoring tools which can monitor CPU, Memory, Disks, Network and even Filesystem on RHEL / Ubuntu systems. Java Nmon Analyzer is a tool that uses the nmon output as an input. It will graph the nmon output into an informative graph to make it easier to read. This article I will show you how to install and use nmon on linux.

What is nmon and Java Nmon Analyzer

Nmon is short for Nigel’s Performance Monitor. This tool is used to monitor resources on Linux, Power, x86, x86_64, Mainframe and ARM (Raspberry Pi). There is two mode available of nmon.

1. Online Mode, which used to real-time monitoring.
2. Capture Mode, which the output will saved to a CSV file for later processing.

Java Nmon Analyzer will use nmon output as an input data to be processed. So to use it, we will first need to have nmon installed and working on your system. Let’s start.

Features

Nmon is specializing to monitor and analyzing performance which includes :

  • CPU utilization
  • CPU Long-term
  • Memory usage
  • Virtual memory
  • Disks
  • Resource
  • Kernel
  • Filesystem
  • Network
  • NFS
  • Top-processes

Installing nmon

Nmon is available in binaries file or source code file for those who want to compile it by yourself. Binaries file is available on nmon download page while nmon source code is available in compiling nmon page. At this article is written, the latest version of nmon is 14g.

Method 1 : Using pre-compiled binaries file

  • Download nmon_linux_14i.tar.gz
  • Extract it
  • Go to the folder you extracted
  • Choose the appropriate binary file which match your system. For example, if you are using 32-bit version of Ubuntu 13, then you will found a binary file with name nmon_x86_ubuntu13
  • To run it, just type ./nmon_x86_ubuntu13

Method 2 : Compile nmon from the source

If you want to compile nmon by yourself, here’s the steps :

  • Download the source code file
  • Download the makefile
  • Rename the source code file to lmon.c . If you download lmon14g.c, then rename it.
  • Look at the makefile content and file the directive that matches your platform and Linux release
  • Make nmon. For example, if you are using Ubuntu 13.04, then you can type

$ make nmon_x86_ubuntu1304

  • Done. Next, you will find a binary file which name nmon_x86_ubuntu1304
  • Type ./nmon_x86_ubuntu1304 to run it

Note :
If you found about no ncurses.h file, then you need to install ncurses-dev package.

On Debian / Ubuntu based, you can install it using:

$ sudo apt-get install libncurses5-dev

How to Java Nmon Analyzer

Actually, we don’t install Java Nmon Analyzer. But we just run it with Java. This tool can be downloaded from Java Nmon Analyzer download page. After you finish download it, here are the steps how to run it.

  • Download and install nmon (make sure you have it)
  • Make a pipe for nmon

# mkfifo /tmp/nmonnamedpipe

  • Run analyzer agent in the target host :

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

The li.xiang.nmonanalyser.agent.Agent is a syntax. Don’t change it.
If it success, you will see a message below :

  • Run nmon, begin performance capture

# nmon -s 20 -c 360 -F /tmp/nmonnamedpipe

20 second per snapshot, capture 360 snapshots, totally 2 hrs. you can put the command in crontab for long time data capture.

If it success, you will see an IP Address connected. See below :

  • Run Java Nmon Analyzer GUI

# java -jar nmonanal_0.1.2.jar

A pop-up window name System Performance Monitor for LINUX & AIX will show. Then you need to load the data.

  • Click Data Loader > From Agent. Then enter target IP Address and its port. By default, it will use 8187 port number

  • Click OK
  • Wait for couple seconds and the GUI start showing you the result

You can also choose to display the output within the specific time range. The available time range are :

  • 1 minutes
  • 5 minutes
  • 10 minutes
  • 30 minutes
  • 1 hours
  • 2 hours
  • 3 hours
  • 6 hours
  • 12 hours
  • 1 day
  • 2 day

With Java Nmon Analyzer, we can graph nmon output to make it easier to read. This application also easy to use because we don’t need to install it and it has simple menus to understand.

原文地址:https://www.cnblogs.com/jinanxiaolaohu/p/12083555.html

时间: 2024-09-29 22:35:33

[转帖]How use Nmon and "Java Nmon Analyzer" for Monitor Linux Performance的相关文章

nmon +java nmon Alalizy agent 动态交互监控

Nmon is a  resource monitoring tools which can monitor CPU, Memory, Disks, Network and even Filesystem on RHEL / Ubuntu systems. Java Nmon Analyzer is a tool that uses the nmon output as an input. It will graph the nmon output into an informative gra

nmon监控与 nmon analyser分析

nmon监控 一.检查安装环境 # uname –a (查看操作系统信息,所检查服务器为64位操作系统) Linux iZ94pmb2p24Z 2.6.32-431.23.3.el6.x86_64 #1 SMP Thu Jul 31 17:20:51 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux #  lsb_release –a  (查看linux发行商版本,所检查服务器linux版本为:CentOS6.5) LSB Version:    :base-4.0

gogotester java jar 版 可用于linux mac windows 版本

http://files.cnblogs.com/tmpt/target.zip 转载请注明出处.添加了代码混淆.不过有兴趣可以关注我将要发出的git版本.地址稍后发出. 这个软件,在googleCode上有公开的project下载,但是只有exe版本的 : https://code.google.com/p/gogo-tester 无奈mac,还要下虚拟机,crossover,各种,都不好用.还是写个通用版本的吧. google code上有源码分享,虽然不懂.NET,但是还是能了解个大概的.

java应用程序远程登录linux并执行其命令(ssh jar包)

http://www.ganymed.ethz.ch/ssh2/在这个网址下载一个调用ssh和scp命令的jar包. 然后,就可以写程序了.将上面的jar包导入MyEclipse,下面是一个类的实例代码. package hh; import java.io.BufferedReader;     import java.io.IOException;     import java.io.InputStream;    import java.io.InputStreamReader; imp

使用Java管理千台规模Linux服务器_入门

http://www.oschina.net/code/snippet_222919_11734 代码分享 当前位置: 代码分享 » Java  » 网络编程 搜 索 [饶过] 使用Java管理千台规模Linux服务器_入门 rgone 发布于 2012年07月09日 10时, 24评/2769阅 分享到:  收藏 +43 踩顶0 前东家是一家游戏公司,老板很好,当时工作也留下了很多自己原创的管理脚本.现在分享一下在办公环境使用Java.Jsch登录VPN管理Linux的脚本(此处实现JAVA调

JAVA实现远程SSH连接linux并执行命令

package com.codeconch.ssh; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import com.jcraft.jsch.ChannelExec; import com.jcraft.jsch.JSch; import com.jcraft.jsch.JSchException;

将java打jar包成linux后台服务service

将java打jar包成linux后台服务service 第一步:将java程序打成jar包 build.gradle配置文件中加spring-boot-gradle-plugin插件,具体配置如下(配置完成后刷新gradle项目) plugins {   id 'org.springframework.boot' version '1.5.4.RELEASE' } springBoot {   executable = true } 打包,在build.gradle所在的目录下,运行如下命令 g

002-多线程-锁-同步锁-synchronized几种加锁方式、Java对象头和Monitor、Mutex Lock、JDK1.6对synchronized锁的优化实现

一.synchronized概述基本使用 为确保共享变量不会出现并发问题,通常会对修改共享变量的代码块用synchronized加锁,确保同一时刻只有一个线程在修改共享变量,从而避免并发问题. synchronized结论: 1.java5.0之前,协调线程间对共享对象的访问的机制只有synchronized和volatile,但是内置锁在功能上存在一些局限性,jdk5增加了Lock以及ReentrantLock. 2.java5.0,增加了一种新的机制:显式锁ReentrantLock,注意它

java使用jsch远程链接linux执行命令

import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader; import com.jcraft.jsch.Channel;import com.jcraft.jsch.ChannelExec;import com.jcraft.jsch.JSch;import com.jcraft.jsch.JSchException;i