意见箱
恒创运营部门将仔细参阅您的意见和建议,必要时将通过预留邮箱与您保持联络。感谢您的支持!
意见/建议
提交建议

nomon+ pyNmonAnalyzer实现基于python的nmon监控性能数据可视化

来源:恒创科技 编辑:恒创科技编辑部
2022-09-22 00:02:08

pip install pyNmonAnalyzer

nnmon for linux from sourceforge:​​https://sourceforge.net/projects/nmon/​​


nomon+ pyNmonAnalyzer实现基于python的nmon监控性能数据可视化

github project地址:​​https://github.com/madmaze/pyNmonAnalyzer​​

readme:

usage: pyNmonAnalyzer [-h] [-x] [-d] [--force] [-i INPUT_FILE] [-o OUTDIR]
[-c] [-b] [-t REPORTTYPE] [-r CONFFNAME]
[--dygraphLocation DYGRAPHLOC] [--defaultConfig]
[-l LOGLEVEL]

nmonParser converts NMON monitor files into time-sorted CSV/Spreadsheets for
easier analysis, without the use of the MS Excel Macro. Also included is an
option to build an HTML report with graphs, which is configured through
report.config.

optional arguments:
-h, --help show this help message and exit
-x, --overwrite overwrite existing results (Default: False)
-d, --debug debug? (Default: False)
--force force using of config (Default: False)
-i INPUT_FILE, --inputfile INPUT_FILE
Input NMON file
-o OUTDIR, --output OUTDIR
Output dir for CSV (Default: ./report/)
-c, --csv CSV output? (Default: False)
-b, --buildReport report output? (Default: False)
-t REPORTTYPE, --reportType REPORTTYPE
Should we be generating a "static" or "interactive"
report (Default: interactive)
-r CONFFNAME, --reportConfig CONFFNAME
Report config file, if none exists: we will write the
default config file out (Default: ./report.config)
--dygraphLocation DYGRAPHLOC
Specify local or remote location of dygraphs library.
This only applies to the interactive report. (Default:
http://dygraphs.com/dygraph-dev.js)
--defaultConfig Write out a default config file
-l LOGLEVEL, --log LOGLEVEL
Logging verbosity, use DEBUG for more output and
showing graphs (Default: INFO
用法示例:
首先生成报告配置,最有可能的默认设置是您需要的全部。这将创建./report.config $> pyNmonAnalyzer --defaultConfig

使用用于test.nmon的交互式图形构建HTML报告并将结果存储到testReport
$> pyNmonAnalyzer -b -o testReport -i test.nmon

使用用于test.nmon的静态图构建HTML报告并将结果存储到testReport
$> pyNmonAnalyzer -b -t static -o testReport -i test.nmon

编译CSV格式的表以获取test.nmon中的数据,并将结果存储到testOut
$> pyNmonAnalyzer -c -o testOut -i test.nmon

组态:
要控制绘制哪些项目的图形(CPU,MEM等),您需要配置report.config文件。这对于AIX NMON系统尤其重要。为了了解配置文件的外观,运行pyNmonAnalyzer --defaultConfig此命令将在您的本地目录中生成“ report.config”。它包含两个示例,一个示例用于Linux,另一个示例用于AIX系统。根据设备名称进行调整,对于Linux,您需要将DISKBUSY设置为sda1或sdb1或任何其他版本。您应该能够使用任何 nmon性能统计信息,例如DISKBUSY,DISKREAD,CPU1,CPU2等。

故障排除:
它崩溃了或我的图形什么都没有显示!
您是否查看了当前的report.config?它是根据您的设备名称定制的吗?
我的交互式报告将不会显示!我做错了什么?
由于交互式报表使用JavaScript加载CSV文件,因此需要允许您的浏览器读取本地文件(如果您在本地查看)。Firefox对我而言是最可靠的,chrome当前不允许JS访问本地文件。

  



上一篇: 租用美国服务器:潜在的风险与应对策略。 下一篇: MongoDB 5.0 扩展开源文档数据库操作