Nmon性能分析工具

简介: 一.简述 Nmon是一款计算机性能系统监控工具,因为它免费,体积小,安装简单,耗费资源低,广泛应用于AIX和Linux系统。nmon的使用需要2部分:nmon采集数据和nmon_analyzer可视化分析数据 二.

一.简述

Nmon是一款计算机性能系统监控工具,因为它免费,体积小,安装简单,耗费资源低,广泛应用于AIX和Linux系统。nmon的使用需要2部分:nmon采集数据和nmon_analyzer可视化分析数据

nmonforLinux

二.下载

根据服务器类型选择对应的nmon版本,nmon_analyser在win下都可以使用

Nmon下载地址
nmon_analyzer_v61下载地址
nmon_analyser_v60下载地址

三.性能数据采集

1.解压

tar -zxvf nmon_linux_14g.tar.gz

2.赋权

chmod 755 nmon_linux_x86_64

3.执行采集

执行命令:nmon_linux_x86_64 [-h] [-s ] [-c ] [-f -d -t -r ] [-x],其中,常用-s采集间隔时间,-c采集时间长度,-f输出文件格式化,-m输出文件路径

./nmon_linux_x86_64 -s10 -c60 -f -m ./

nmon帮助文档

[carbondata@carbondata soft]$ ./nmon_linux_x86_64 -h

Hint: nmon_linux_x86_64 [-h] [-s <seconds>] [-c <count>] [-f -d <disks> -t -r <name>] [-x]

        -h            FULL help information
        Interactive-Mode:
        read startup banner and type: "h" once it is running
        For Data-Collect-Mode (-f)
        -f            spreadsheet output format [note: default -s300 -c288]
        optional
        -s <seconds>  between refreshing the screen [default 2]
        -c <number>   of refreshes [default millions]
        -d <disks>    to increase the number of disks [default 256]
        -t            spreadsheet includes top processes
        -x            capacity planning (15 min for 1 day = -fdt -s 900 -c 96)

Version - nmon 14g

For Interactive-Mode
        -s <seconds>  time between refreshing the screen [default 2]
        -c <number>   of refreshes [default millions]
        -g <filename> User Defined Disk Groups [hit g to show them]
                      - file = on each line: group_name <disks list> space separated
                      - like: database sdb sdc sdd sde
                      - upto 64 disk groups, 512 disks per line
                      - disks can appear more than once and in many groups
        -b            black and white [default is colour]
        example: nmon_linux_x86_64 -s 1 -c 100

For Data-Collect-Mode = spreadsheet format (comma separated values)
        Note: use only one of f,F,z,x or X and make it the first argument
        -f            spreadsheet output format [note: default -s300 -c288]
                         output file is <hostname>_YYYYMMDD_HHMM.nmon
        -F <filename> same as -f but user supplied filename
        -r <runname>  used in the spreadsheet file [default hostname]
        -t            include top processes in the output
        -T            as -t plus saves command line arguments in UARG section
        -s <seconds>  between snap shots
        -c <number>   of snapshots before nmon stops
        -d <disks>    to increase the number of disks [default 256]
        -l <dpl>      disks/line default 150 to avoid spreadsheet issues. EMC=64.
        -g <filename> User Defined Disk Groups (see above) - see BBBG & DG lines
        -N            include NFS Network File System
        -I <percent>  Include process & disks busy threshold (default 0.1)
                      don't save or show proc/disk using less than this percent
        -m <directory> nmon changes to this directory before saving to file
        example: collect for 1 hour at 30 second intervals with top procs
                 nmon_linux_x86_64 -f -t -r Test1 -s30 -c120

        To load into a spreadsheet:
        sort -A *nmon >stats.csv
        transfer the stats.csv file to your PC
        Start spreadsheet & then Open type=comma-separated-value ASCII file
         The nmon analyser or consolidator does not need the file sorted.

Capacity planning mode - use cron to run each day
        -x            sensible spreadsheet output for CP =  one day
                      every 15 mins for 1 day ( i.e. -ft -s 900 -c 96)
        -X            sensible spreadsheet output for CP = busy hour
                      every 30 secs for 1 hour ( i.e. -ft -s 30 -c 120)

Interactive Mode Commands
        key --- Toggles to control what is displayed ---
        h   = Online help information
        r   = Machine type, machine name, cache details and OS version + LPAR
        c   = CPU by processor stats with bar graphs
        l   = long term CPU (over 75 snapshots) with bar graphs
        m   = Memory stats
        L   = Huge memory page stats
        V   = Virtual Memory and Swap stats
        k   = Kernel Internal stats
        n   = Network stats and errors
        N   = NFS Network File System
        d   = Disk I/O Graphs
        D   = Disk I/O Stats
        o   = Disk I/O Map (one character per disk showing how busy it is)
        o   = User Defined Disk Groups
        j   = File Systems 
        t   = Top Process stats use 1,3,4,5 to select the data & order
        u   = Top Process full command details
        v   = Verbose mode - tries to make recommendations
        b   = black and white mode (or use -b option)
        .   = minimum mode i.e. only busy disks and processes

        key --- Other Controls ---
        +   = double the screen refresh time
        -   = halves the screen refresh time
        q   = quit (also x, e or control-C)
        0   = reset peak counts to zero (peak = ">")
        space = refresh screen now

Startup Control
        If you find you always type the same toggles every time you start
        then place them in the NMON shell variable. For example:
         export NMON=cmdrvtan

Others:
        a) To you want to stop nmon - kill -USR2 <nmon-pid>
        b) Use -p and nmon outputs the background process pid
        c) To limit the processes nmon lists (online and to a file)
           Either set NMONCMD0 to NMONCMD63 to the program names
           or use -C cmd:cmd:cmd etc. example: -C ksh:vi:syncd
        d) If you want to pipe nmon output to other commands use a FIFO:
           mkfifo /tmp/mypipe
           nmon -F /tmp/mypipe &
           grep /tmp/mypipe
        e) If nmon fails please report it with:
           1) nmon version like: 14g
           2) the output of cat /proc/cpuinfo
           3) some clue of what you were doing
           4) I may ask you to run the debug version

        Developer Nigel Griffiths
        Feedback welcome - on the current release only and state exactly the problem
        No warranty given or implied.

四.性能数据分析

1.解压需要的文件nmon analyser v60.xlsm

2.使用nmon analyser v60.xlsm将源数据文件转为.xlsx文件

3.转换并保存

4.性能指标查看

主要查看指标包括:CPU使用情况、磁盘I/O、内存使用情况、网络使用情况等

五.问题

1.打开nmon analyser v60.xlsm时 的问题

a).WPS

下载WPS的vba模块

百度云盘: https://pan.baidu.com/s/1R4lSyDZ2HkspHT4fBfSE8w
提取码:abwr

b).Office

目录
相关文章
|
2月前
|
Rust 数据可视化 安全
Rust性能分析工具概览:perf、flamegraph 与其他
Rust作为一种高性能、内存安全的编程语言,在构建大型系统和微服务时备受青睐。然而,优化Rust程序的性能需要有效的工具。本文将对Rust中常用的性能分析工具进行介绍,包括perf、flamegraph等,并探讨它们如何帮助开发者定位和解决性能瓶颈。
|
30天前
|
数据可视化 关系型数据库 编译器
【C/C++ 单线程性能分析工具 Gprof】 GNU的C/C++ 性能分析工具 Gprof 使用全面指南
【C/C++ 单线程性能分析工具 Gprof】 GNU的C/C++ 性能分析工具 Gprof 使用全面指南
106 2
|
8月前
|
SQL 关系型数据库 MySQL
第09章 性能分析工具的使用【2.索引及调优篇】【MySQL高级】1
第09章 性能分析工具的使用【2.索引及调优篇】【MySQL高级】1
74 0
|
2天前
|
Web App开发 JavaScript 前端开发
JavaScript中的性能优化:代码优化技巧与性能分析工具
【4月更文挑战第22天】本文探讨JavaScript性能优化,包括代码优化技巧和性能分析工具。建议避免全局查找、减少DOM操作、使用事件委托、优化循环和异步编程以提升代码效率。推荐使用Chrome DevTools、Lighthouse和jsPerf等工具进行性能检测和优化。持续学习和实践是提升JavaScript应用性能的关键。
|
30天前
|
缓存 Linux iOS开发
【C/C++ 集成内存调试、内存泄漏检测和性能分析的工具 Valgrind 】Linux 下 Valgrind 工具的全面使用指南
【C/C++ 集成内存调试、内存泄漏检测和性能分析的工具 Valgrind 】Linux 下 Valgrind 工具的全面使用指南
65 1
|
1月前
|
监控 Linux 测试技术
【 C/C++ 性能分析工具 CPU 采样分析器 perf 】掀开Linux perf性能分析的神秘面纱
【 C/C++ 性能分析工具 CPU 采样分析器 perf 】掀开Linux perf性能分析的神秘面纱
65 0
|
2月前
|
IDE 小程序 前端开发
1月开发者日回顾|IDE性能分析工具即将上线,lifetimes等多个自定义组件参数更新
1月开发者日回顾|IDE性能分析工具即将上线,lifetimes等多个自定义组件参数更新
51 0
|
2月前
|
IDE 小程序 API
【社区每周】IDE性能分析工具即将上线;多项数字化产品支持沙箱调试(1月第三期)
【社区每周】IDE性能分析工具即将上线;多项数字化产品支持沙箱调试(1月第三期)
20 0
|
8月前
|
JSON 关系型数据库 MySQL
第09章 性能分析工具的使用【2.索引及调优篇】【MySQL高级】4
第09章 性能分析工具的使用【2.索引及调优篇】【MySQL高级】4
58 0
|
8月前
|
SQL 缓存 Linux
XHProf - PHP性能分析工具
XHProf - PHP性能分析工具的安装使用
116 1

热门文章

最新文章