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 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/SunshineKimi/p/12184796.html

时间: 2024-10-10 22:11:29

nmon +java nmon Alalizy agent 动态交互监控的相关文章

[转帖]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 AriantoMONITORING, OPEN SOURCE TOOLS Nmon is a  resource monitoring tools

linux系统监控图表展示--nmon和nmon analyser

1. 下载及说明 nmon工具下载地址: http://cznic.dl.sourceforge.net/project/nmon/nmon_linux_14i.tar.gz nmon analyser工具下载地址: https://www.ibm.com/developerworks/community/wikis/form/anonymous/api/wiki/61ad9cf2-c6a3-4d2c-b779-61ff0266d32a/page/b7fc61a1-eef9-4756-8028-

学习Spring必学的Java基础知识(2)----动态代理

学习Spring必学的Java基础知识(2)----动态代理 引述要学习Spring框架的技术内幕,必须事先掌握一些基本的Java知识,正所谓“登高必自卑,涉远必自迩”.以下几项Java知识和Spring框架息息相关,不可不学(我将通过一个系列分别介绍这些Java基础知识,希望对大家有所帮助.): [1] Java反射知识-->Spring IoC :http://www.iteye.com/topic/1123081 [2] Java动态代理-->Spring AOP :http://www

浅谈Java的内存模型以及交互

本文的内存模型只写虚拟机内存模型,物理机的不予描述. Java内存模型 在Java中,虚拟机将运行时区域分成6中,如下图:              程序计数器:用来记录当前线程执行到哪一步操作.在多线程轮换的模式中,当当前线程时间片用完的时候记录当前操作到哪一步,重新获得时间片时根据此记录来恢复之前的操作. 虚拟机栈:这就是我们平时所说的栈了,一般用来储存局部变量表.操作数表.动态链接等. 本地方法栈:这是另一个栈,用来提供虚拟机中用到的本地服务,像线程中的start方法,JUC包里经常使用的

【java】java反射机制,动态获取对象的属性和对应的参数值,并属性按照字典序排序,Field.setAccessible()方法的说明【可用于微信支付 签名生成】

方法1:通过get()方法获取属性值 package com.sxd.test.controller; public class FirstCa{ private Integer num; private String name; private Boolean flag; public Integer getNum() { return num; } public void setNum(Integer num) { this.num = num; } public String getNam

Java语言中反射动态代理接口的解释与演示

Java语言中反射动态代理接口的解释与演示 Java在JDK1.3的时候引入了动态代理机制.可以运用在框架编程与平台编程时候捕获事件.审核数据.日志等功能实现,首先看一下设计模式的UML图解: 当你调用一个接口API时候,实际实现类继承该接口,调用时候经过proxy实现. 在Java中动态代理实现的两个关键接口类与class类分别如下: java.lang.reflect.Proxy java.lang.reflect.InvocationHandler 我们下面就通过InvocationHan

Java下拼接执行动态SQL语句(转)

在实际业务中经常需要拼接动态SQL来完成复杂数据计算,网上各类技术论坛都有讨论,比如下面这些问题: http://bbs.csdn.net/topics/390876591 http://bbs.csdn.net/topics/390981627 https://www.linkedin.com/groups/SQL-Query-Help-needed-137774.S.5948812806903119877?trk=groups_items_see_more-0-b-ttl http://bb

本地java代码和javascript进行交互(java和js互调)

在android的开发过程中,有很多时候需要用到本地java代码和javascript进行交互.android对交互进行了很好的封装,在开发中我们可以很简单的用java代码调用webview中的js,也可以用webview中的js来调用本地的java代码,这样我们可以实现很多原来做不了的功能,比如点击网页上的电话号码后,手机自动拨打电话,点击网页中的笑话,自动发送短信等. 废话不多说,这次教程的目标如下 android 中的java代码调用webview里面的js脚本 webview中的js脚本

Java下拼接执行动态SQL语句

Java拼接动态SQL的一般做法有       1.使用动态语句 很多数据库都提供了处理动态SQL的语法,如Oracle的EXECUTE IMMEDIATE语句.MSSQL的EXEC和SP_EXECUTESQL.Mysql的预处理语句等.这些功能让我们在数据库端来处理动态查询提供了极大遍历,但这种方式只适用于相对简单地动态查询,复杂的情况经常会采用下面的方式. 2.使用存储过程 对于复杂的情况,一般会在存储过程中来拼接动态SQL.使用存储过程完成相对灵活,但编码复杂度过高,有时运行效率较低. 3