转:http://www.cnblogs.com/mululu/p/6398483.html

		<div class="blogStats">

			<div id="blog_stats">

随笔- 76 

文章- 1 

评论- 2 

		</div><!--end: blogStats -->
</div><!--end: navigator 博客导航栏 --> <div id="post_detail">

Nmon的安装及使用

一、下载Nmon

根据CPU的类型选择下载相应的版本:

http://nmon.sourceforge.net/pmwiki.php?n=Site.Download
wget http://sourceforge.net/projects/nmon/files/download/nmon_x86_12a.zip

二、初始化工具

1
2
3
4
[root@mululu ~]# cd /opt
[root@mululu opt]# mkdir nmon
[root@mululu opt]# cd nmon
[root@mululu nmon]#wget <a href="http://sourceforge.net/projects/nmon/files/download/nmon_x86_12a.zip/download">http://sourceforge.net/projects/nmon/files/download/nmon_x86_12a.zip</a>

  

[root@mululu nmon]# unzip nmon_x86_12a.zip
Archive: nmon_x86_12a.zip
inflating: nmon_x86_rhel45
inflating: nmon_x86_rhel52
inflating: nmon_x86_sles9
inflating: nmon_x86_sles10
inflating: nmon_x86_ubuntu810
inflating: nmon_x86_fedora10
inflating: nmon_x86_opensuse10
[root@mululu nmon]# ls
nmon1 nmon_x86_fedora10 nmon_x86_rhel45 nmon_x86_sles10 nmon_x86_ubuntu810
nmon_x86_12a.zip nmon_x86_opensuse10 nmon_x86_rhel52 nmon_x86_sles9
[root@mululu nmon]# mv nmon_x86_ubuntu810 nmon
[root@mululu nmon]# chmod +x nmon
[root@mululu nmon]#ls
nmon nmon1 nmon_x86_12a.zip nmon_x86_fedora10 nmon_x86_opensuse10 nmon_x86_rhel45 nmon_x86_rhel52 nmon_x86_sles10 nmon_x86_sles9

然后直接运行 nmon 即可,直接运行nmon可以实时监控系统资源的使用情况,执行下面的步骤可以展现一段时间系统资源消耗的报告。

下面是直接执行nmon命令实时监控系统资源消耗情况的截图:

[root@mululu nmon]#./nmon

CPU、内存、磁盘和网络的消耗情况都被很直观的展现出来。

按键“C”可以查看CPU相 关信息;

按键“D”可以查看磁盘信息;

按键“T”可以查看系统的进程信息;

“M”对应内存、“N”对应网络等等;

完整的快捷键对应内容可以通过帮助(按键 “H”)查看。

可以显示Linux系统CPU、内存、进程信息,包括了CPU的用户、系统、等待和空闲状态值,可用内存、缓存大小以及进程的CPU消耗等详细指标。该种方式显示信息实时性强,能够及时掌握系统承受压力下的运行情况,每颗CPU利用率是多少、内存使用多少、网络流量多少、磁盘读写……这些数据均是实时刷新,一目了然。

三.生成nmon报告。

1).采集数据:
#./nmon -s10 -c60 -f -m /home/

参数解释:
-s10 每 10 秒采集一次数据。
-c60 采集 60 次,即为采集十分钟的数据。
-f 生成的数据文件名中包含文件创建的时间。
-m 生成的数据文件的存放目录。

这样就会生成一个 nmon 文件,并每十秒更新一次,直到十分钟后。
生成的文件名如: _090824_1306.nmon ,"" 是这台主机的主机名。

nmon -h查看更多帮助信息。

解决方式:

先看看这个命令属于哪个软件包:
[root@mululu ~]# yum provides */lsb_release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.psychz.net
* epel: mirrors.solfo.com
* extras: mirror.san.fastserv.com
* updates: mirror.lax.hugeserver.com
base/filelists_db | 5.1 MB 00:00
epel/filelists_db | 7.8 MB 00:00
extras/filelists_db | 31 kB 00:00
updates/filelists_db | 614 kB 00:00
vz-base/filelists | 825 B 00:00
vz-updates/filelists | 3.0 kB 00:00
redhat-lsb-core-4.0-7.el6.centos.i686 : LSB base libraries support for CentOS
Repo : base
Matched from:
Filename : /usr/bin/lsb_release
dkms-2.2.0.3-28.git.7c3e7c5.el6.noarch : Dynamic Kernel Module Support Framework
Repo : epel
Matched from:
Filename : /usr/lib/dkms/lsb_release
dkms-2.2.0.3-26.el6.noarch : Dynamic Kernel Module Support Framework
Repo : installed
Matched from:
Filename : /usr/lib/dkms/lsb_release
redhat-lsb-core-4.0-7.el6.centos.i686 : LSB base libraries support for CentOS
Repo : installed
Matched from:
Filename : /usr/bin/lsb_release 可以看出,属于redhat-lsb这个包,那么接着使用yum安装这个包:

[root@mululu ~]# yum install -y redhat-lsb

[root@mululu ~]#lsb_release -r

2).生成报表:
下载 nmon analyser (生成性能报告的免费工具):
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Power%20Systems/page/nmon_analyser

将之前生成的 nmon 数据文件传到 Windows 机器上,用 Excel 打开分析工具 nmon analyser v33C.xls 。点击 Excel 文件中的 "Analyze nmon data" 按钮,选择 nmon 数据文件,这样就会生成一个分析后的结果文件: hostname_090824_1306.nmon.xls ,用 Excel 打开生成的文件就可以看到结果了。

如果宏不能运行,需要做以下操作:
工具 -> 宏 -> 安全性 -> 中,然后再打开文件并允许运行宏。

下面是在测试环境中生成的NMON报告截图:

红色区域为不同指标的分析报告。

3).

定时任务

除配合性能测试的短期监控,我们也可以实现对系统的定期监控,作为运营维护阶段的参考。定期监控实现如下:

1)   执行命令:#crontab  –e

2)   在最后一行添加如下命令:
0 8 * * 1,2,3,4,5  /nmon/nmon_x86_rhel5  -f -N -m /nmon/log  -s 30 -c 1200
表示:
周一到周五,从早上08点开始,监控10个小时(到18:00整为止),输出到/nmon/log

自动按天采集数据:
在 crontab 中增加一条记录:
0 0 * * * root nmon -s300 -c288 -f -m /home/ > /dev/null 2>&1

300*288=86400 秒,正好是一天的数据。

	</div>
<div class="postDesc">posted @ <span id="post-date">2017-02-14 17:12</span> <a href="https://www.cnblogs.com/mululu/">西瓜汁拌面</a> 阅读(<span id="post_view_count">21929</span>) 评论(<span id="post_comment_count">0</span>) <a href="https://i.cnblogs.com/EditPosts.aspx?postid=6398483" rel="nofollow">编辑</a> <a href="#" onclick="AddToWz(6398483);return false;">收藏</a></div>
</div>
<script type="text/javascript">var allowComments=true,cb_blogId=301161,cb_entryId=6398483,cb_blogApp=currentBlogApp,cb_blogUserGuid='27a0866c-1569-e611-9fc1-ac853d9f53cc',cb_entryCreatedDate='2017/2/14 17:12:00';loadViewCount(cb_entryId);var cb_postType=1;var isMarkdown=false;</script>

注册用户登录后才能发表评论,请 登录注册访问网站首页。
</div><!--end: forFlow -->
</div><!--end: mainContent 主体内容容器--> <div id="sideBar">
<div id="sideBarMain">

公告

昵称:西瓜汁拌面
园龄:2年5个月
粉丝:13
关注:8
		<div id="calendar"><div id="blog-calendar" style=""><table id="blogCalendar" class="Cal" cellspacing="0" cellpadding="0" title="Calendar">
<tbody><tr><td colspan="7"><table class="CalTitle" cellspacing="0">
<tbody><tr><td class="CalNextPrev"><a href="javascript:void(0);" onclick="loadBlogCalendar('2019/01/01');return false;">&lt;</a></td><td align="center">2019年2月</td><td class="CalNextPrev" align="right"><a href="javascript:void(0);" onclick="loadBlogCalendar('2019/03/01');return false;">&gt;</a></td></tr>
</tbody></table></td></tr><tr><th class="CalDayHeader" align="center" abbr="日" scope="col">日</th><th class="CalDayHeader" align="center" abbr="一" scope="col">一</th><th class="CalDayHeader" align="center" abbr="二" scope="col">二</th><th class="CalDayHeader" align="center" abbr="三" scope="col">三</th><th class="CalDayHeader" align="center" abbr="四" scope="col">四</th><th class="CalDayHeader" align="center" abbr="五" scope="col">五</th><th class="CalDayHeader" align="center" abbr="六" scope="col">六</th></tr><tr><td class="CalOtherMonthDay" align="center">27</td><td class="CalOtherMonthDay" align="center">28</td><td class="CalOtherMonthDay" align="center">29</td><td class="CalOtherMonthDay" align="center">30</td><td class="CalOtherMonthDay" align="center">31</td><td align="center">1</td><td class="CalWeekendDay" align="center">2</td></tr><tr><td class="CalWeekendDay" align="center">3</td><td align="center">4</td><td align="center">5</td><td align="center">6</td><td align="center">7</td><td align="center">8</td><td class="CalWeekendDay" align="center">9</td></tr><tr><td class="CalWeekendDay" align="center">10</td><td class="CalTodayDay" align="center">11</td><td align="center">12</td><td align="center">13</td><td align="center">14</td><td align="center">15</td><td class="CalWeekendDay" align="center">16</td></tr><tr><td class="CalWeekendDay" align="center">17</td><td align="center">18</td><td align="center">19</td><td align="center">20</td><td align="center">21</td><td align="center">22</td><td class="CalWeekendDay" align="center">23</td></tr><tr><td class="CalWeekendDay" align="center">24</td><td align="center">25</td><td align="center">26</td><td align="center">27</td><td align="center">28</td><td class="CalOtherMonthDay" align="center">1</td><td class="CalOtherMonthDay" align="center">2</td></tr><tr><td class="CalOtherMonthDay" align="center">3</td><td class="CalOtherMonthDay" align="center">4</td><td class="CalOtherMonthDay" align="center">5</td><td class="CalOtherMonthDay" align="center">6</td><td class="CalOtherMonthDay" align="center">7</td><td class="CalOtherMonthDay" align="center">8</td><td class="CalOtherMonthDay" align="center">9</td></tr>
		<div id="leftcontentcontainer">
<div id="blog-sidecolumn"><div id="sidebar_search" class="sidebar-block">

搜索

 
 

最新评论

<div id="RecentCommentsBlock"><ul>
<li class="recent_comment_title"><a href="https://www.cnblogs.com/mululu/p/5959362.html#4158130">1. Re:IO实时监控命令iostat详解</a></li>
<li class="recent_comment_body">我也总结了一篇,和博主分享:<a href="" target="_blank"></a></li>
<li class="recent_comment_author">--果冻想</li>
<li class="recent_comment_title"><a href="https://www.cnblogs.com/mululu/p/9081526.html#3981091">2. Re:python实现简单的http接口自动化</a></li>
<li class="recent_comment_body">哈哈哈哈或或或</li>
<li class="recent_comment_author">--西瓜汁拌面</li>

(转载):nmon使用的更多相关文章

  1. Linux下使用NMON监控、分析系统性能 -转载

    原帖地址:http://blog.itpub.net/23135684/viewspace-626439/ 谢谢原帖大人 一.下载nmon. 根据CPU的类型选择下载相应的版本:http://nmon ...

  2. 【原创】使用Nmon_Analyzer处理较大nmon文件的方法

    1 编写目的 进行性能测试时,测试服务器使用的操作系统是Linux或Unix时,我们一般会使用Nmon工具进行操作系统资源监控数据的收集.Nmon工具是一款非常优秀的性能监控和分析工具,它能够实时地收 ...

  3. [转载]你需要知道的 16 个 Linux 服务器监控命令

    转载自: 你需要知道的 16 个 Linux 服务器监控命令 如果你想知道你的服务器正在做干什么,你就需要了解一些基本的命令,一旦你精通了这些命令,那你就是一个 专业的 Linux 系统管理员. 有些 ...

  4. 【OS】NMON的简介和使用

    [OS]NMON的简介和使用 目前NMON已开源,以sourceforge为根据地,网址是http://nmon.sourceforge.net. 1. 目的 本文介绍操作系统监控工具Nmon的概念. ...

  5. nmon安装与使用

    一.检查安装环境 1,# uname –a (查看操作系统信息,所检查服务器为64位操作系统) Linux jmeter 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 ...

  6. (转)使用 Nmon 监控 Linux 的系统性能

    看到一个使用Nmon的文章,写的很基础,适合新手,转载之.下面是原文的信息: 作者:Hitesh Jethva 译者:sonofelice 校对:wxy 传送门:linux.cn/article-68 ...

  7. nmon与nmonanalyser系统性能分析

    nmon与nmonanalyser系统性能分析(图表) - [系统架构] 2011-05-15 版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明http://www.blogbus.c ...

  8. nmon 命令

    nmon 命令 用途 以交互方式显示本地系统统计信息并以记录方式记录系统统计信息. 语法 交互方式: nmon [ -h ] nmon [ -s < seconds >] [ -c < ...

  9. nmon 命令(转)

    转载:https://www.cnblogs.com/kongzhongqijing/articles/4057487.html 一.基本使用 nmon目前可支持AIX和LINUX,可到以下地址去免费 ...

随机推荐

  1. Vuex 刷新后数据丢失问题 Typescript

    问题描述:Vuex保存的数据在页面刷新后会全部丢失清除 问题解决方案:使用sessionstorage进行保存,在页面刷新时保存至sessionStorage,页面在加载时再进行填充   (另有vue ...

  2. 关于MQ的几件小事(三)如何保证消息不重复消费

    1.幂等性 幂等(idempotent.idempotence)是一个数学与计算机学概念,常见于抽象代数中. 在编程中一个幂等操作的特点是其任意多次执行所产生的影响均与一次执行的影响相同.幂等函数,或 ...

  3. iOS - UIWebView和WKWebView的比较和选择-作为H5容器的一些探究

    一.Native开发中为什么需要H5容器 Native开发原生应用是手机操作系统厂商(目前主要是苹果的iOS和google的Android)对外界提供的标准化的开发模式,他们对于native开发提供了 ...

  4. python运行出现TypeError: super() takes at least 1 argument (0 given)错误

    在写继承子类的时候出现了TypeError: super() takes at least 1 argument (0 given)的error: 源代码(python3中完美可运行): class ...

  5. 在pivotal cloud foundry上申请账号和部署应用

    Created by Wang, Jerry, last modified on Jul 04, 2016 URL: http://run.pivotal.io/ maintain your mobi ...

  6. PCI总线学习

    PCI总线概述: 因为不实际操作了,所以就写一些方法论上的东西,纪念一下. PCI总线有三个非常显著的优点: 1. 在计算机和外设传输数据时具有更好的性能. 2. 能够尽量独立于具体的平台. 3. 可 ...

  7. OpenStack kilo版(4) Glance部署

    Glance简介 Glance-api:接受云系统镜像的构建.删除.读取请求 Glance-Registry:云系统的镜像注册服务 部署在controller节点 配置数据库 MariaDB [(no ...

  8. VS代码自动排版

    1, ctrl+a 2, ctrl+k 3, ctrl+f

  9. springboot系列(六) 使用模板引擎

    这里就转载一篇大牛的文章 https://blog.csdn.net/caychen/article/details/79625927 这篇文章详细介绍了thymeleaf和freemarker引擎木 ...

  10. python生成器学习

    python生成器学习: 案例分析一: def demo(): for i in range(4): yield i g=demo() g1=(i for i in g) #(i for i in d ...