Recent Changes - Search:

Home Page



Other tools


edit SideBar

Nmon2json

nmon2json - reformat you nmon files to JSON format

nmon2json is a Korn shell script for AIX or Linux to convert nmon collected files to JSON
- which is Python friendly and accepted by online performance tools like Splunk and ELK(logstash)

It is ~450 lines of fairly simple Ksh script so please fix bugs or add functions and let me know the changes.

Syntax:

  • nmon2json nmonfile.nmon
    • Single level output
  • nmon2json -m nmonfile.nmon
    • Multi level output
  • nmon2json -h
    • Output help & version

Options:

  • Default
    • All data goes into an unnamed array of dictionaries (in Python terms)
  • -m
    • In Python terms, an "info": {...} dictionary once then followed by a "samples": array of dictionaries

Example:

  • nmon2json myfile.nmon >single_level.json
  • nmon2json -m myfile.nmon >multi_level.json

For example of generated JSON data:

Possible "to do" projects:

  • Extract individual network stats
  • Extract individual disk stats
  • Problem with the above two is with many networks and 100's of disks this would be a massive increase in the volume of data - let me know what you think. Yes, no, make it optional?

Downloads

Download FileComments
nmon2json_python_example_code_v26.pyPython v3 example program of reading the nmon2json output files &
extracting the data - to get you started.
Assumes some Python & you can edit to suite your files.
The code near the end covers both single & multiple level formats.
nmon2json_v26.tarVersion 26 - 14th Dec 2017
includes sample input & output files
Edit - History - Print - Recent Changes - Search
Page last modified on December 14, 2017, at 01:04 PM