转: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. POJ3255(Roadblocks)--次短路径

    点这里看题目 3228K 485MS G++ 2453B 根据题意和测试用例知道这是一个求次短路径的题目.次短路径,就是比最短路径长那么一丢丢的路径,而题中又是要求从一点到指定点的次短路径,果断Dij ...

  2. python数据统计出海品牌

    当国内市场处于红海之中时,市场全球化已成为大势所趋.越来越多的国产品牌远走高飞,纷纷将品牌拿出来. 2019年,中国品牌十大品牌中,华为品牌力指数同比增长22%,阿里巴巴品牌力指数增长48%,小米品牌 ...

  3. 大专生自学web前端到找到工作的经验

    先做个自我介绍,我13年考上一所很烂专科民办的学校,学的是生物专业,具体的学校名称我就不说出来献丑了.13年我就辍学了,我在那样的学校,一年学费要1万多,但是根本没有人学习,我实在看不到希望,我就退学 ...

  4. CVE-2019-11517 CSRF in Wampserver 3.1.4-3.1.8

    https://www.cnblogs.com/iAmSoScArEd/ Affected product:WampServer 3.1.4-3.1.8 Offiical description:&q ...

  5. java基本数据类型包装

    1. 2. 左边的是对象,自动装箱为对象,右边的是基本的数据类型. 3. 如果m,n换成128就超出范围,结果就不一样. 是因为把在这区间内的值都放在了常量池里面. Integer m = Integ ...

  6. c# 输出参数-out

  7. jquery中的ajax方法(备忘)

    参考:https://www.cnblogs.com/tylerdonet/p/3520862.html w3school:http://www.w3school.com.cn/jquery/ajax ...

  8. 跨域访问支持(Spring Boot、Nginx、浏览器)

    原文:http://www.itmuch.com/work/cors/ 最近家中事多,好久没有写点啥了.一时间竟然不知从何说起.先说下最近家里发生的事情吧: 老爸肺气肿住院: 老妈甲状腺囊肿 儿子喘息 ...

  9. es6 class extends

    Class和普通构造函数有何区别   JS构造函数 function MathHandle(x, y){ this.x = x; this.y = y; } MathHandle.prototype. ...

  10. artDialog提示框

    API网址 http://aui.github.io/artDialog/doc/index.html 相关资料下载 https://code.google.com/archive/p/artdial ...