nmonchart - webpage graphs from nmon data
|nmonchart is a Korn shell script for AIX or Linux to convert nmon collected files to a webpage (.html) including Google Chart and |
or you could put the .html straight on to your website (assuming Apache is using /var/www/html)
Here is a simple small sample file so you can see what the graphs look like:
|nmonchart33.tar||Current version 33 - 4th Nov 2017 |
- Added Top 15 Disks Graph - particularly useful if the data has 100's or 1000's of disks
|nmonchart32.tar||Version 32 18th Oct 2017 |
- Added for AIX a new memory graph for System%, Process%, Cache% and Free%. Note: in the nmon Analyser it is the MEMNEW graph.
- Added handling for single GPU (normally in pairs)
|nmonchart31.tar||Version 31 - 9th Dec 2016 |
- Fix for Top Processes sort arguments for Linux which handles -t, differently resulting in not having the Top 20 processes on Linux.
- Fix Linux machines with no disks reported in AAA,disks,0 line - we skip graphing the disks.
- Added sampleD.nmon and sampleD.html as a much larger & more interesting set of nmon stats.
- Note: sampleC had some stats faked up my me!
|nmonchart30.tar||Version 30 - 22nd Sept 2016 |
Fix for running the nmonchart Ksh script on Linux. AIX has "print -n" option but Linux does not.
|nmonchart29.tar||Version 29 - 21st July 2016|
|Comments on v29||New Features: for nmonchart version 29|
Zoom In and Out added - thanks to Ivan Goncharov for the hint
- Left-click and drag the mouse to highlight an area to Zoom then when you let go it will Zoom In
- Right-click to Zoom Out (reset) and see the whole graph again
|nmonchart28.tar||Version 28 - 6th July 2016|
|Comments on v28||New Features: for nmonchart version 28|
1) Added PROCCOUNT (count of processes) as this was released via an AIXpert Blog about nmon External Data Collectors
2) Added MORE1 and MORE3 examples for people adding their own stats.
3) Buttons for adapter typo fixed
|nmonchart27.tar||Version 27 - 3rd March 2016|
|Comments on v27||New Features: |
The buttons labels are upper and lowercase = look nicer
Added the nmon Configuration button to pop-up a window with the AAA and BBB data
Unfortunately, this highlights browser behaving differently
- Firefox no scroll bars so use PageDown
- Chrome has scroll bars
- Internet Explorer I get a blank windows but it works for other people
If you do not want the Config button (it does add to the .html size) set
wantCONFIG=0 near the top of the nmonchart script - =1 means we want it.
The Top Process Summary and Top Commands Buttons moved up at the top line to save space
|nmonchart25.tar||12th Feb 2016|
|Comments on v25||New Graphs: |
- Disk Service time in milli-seconds
- Disk Read Service time in milli-seconds
- Disk Write Service time in milli-seconds
- Disk Wait time in milli-seconds
You have to switch the collecting of these stats on by running nmon with the -d option
And this generates extra line in the nmon file starting with DISKSERV DISKREADSERV DISKWRITESERV DISKWAIT
|nmonchart24.tar||15th Jan 2016|
|Comments on v24||New Graphs: |
1) Now supported User Defined Disks Groups - good for nmon for Linux -g auto
2) POWER8 S822LC can have NVidia GPU adapters - GPU stats: GPU Util, memory Util, temperature, Watts and GPU MHz
3) Linux Utilisation all 10 stats: user, nice, system, idle, wait for IO, steal, irq, soft irq, guest and guest nice
|nmonchart23.tar||1st Dec 2015|
|Comments on v23||Small change in handling November and December dates |
- Google chart decided Nov month as 010 was in binary!
Bug identified and fix found by Clifford Weinmann - many thanks
Plus more comments in the code.
|nmonchart22.tar||Initial Release - 8th May 2015|
|nmon version 16 additional stats |
and nmonchart 24 graphs
|All ten Linux Utilisation stats||MHz changing on a S822LC|
|nmon version 16 Nvidia GPU support on S822LC|
|GPU CPU Utilisation||GPU Memory Utilisation||GPU Temperature|
|GPU Electrical Watts Used||GPU MHz|
|nmon Disk Group Graphs||Captured on nmon for Linux with nmon -f -g auto |
So its only disks and the disk partitions
|DG busy, |
DG read, DG write,
DG block size & DG Xfers
|nmon Disk Service & Wait Time||Captured on nmon for AIX with nmon -f -d||Disk Service Time, Disk Wait Time, |
Service Read Time & Service Write Time
|Version 27 new buttons AIX||New buttons Linux||Configuration Details pop-up|
|Versions32 - Mem Use graph ||Versions33 - Top Disk graph |
README for nmonchart 22 by Nigel Griffiths
The Korn shell script file nmonchart transforms .nmon performance capture files into .html files for a web server site.
If your .nmon is called hostname_date_time.nmon and the website pages are at /webpages/docs then use it like this:
./nmonchart hostname_date_time.nmon /webpages/docs/hostname_date_time.html
Then nmonchart Korn shell script needs the Korn shell installed. - it has NOT been tested on Csh or bash. AIX and Linux have Korn Shell called ksh - if your Linux does not have it you should install it.
The script works out if it is running on AIX or Linux and makes two changes based on that. - see the top 10 lines for this.
nmonchart is a fairly simple Korn shell, grep, sed and awk. For data that is in fixed format like physical CPU, run queue and memory stats in the nmon output it is simple to pick out the column and graph it. For data that is not fixed format as it depends on the resources like disk, network, CPUs it is more complex as it has to workout the number of header line (the resource names) and data lines. The graphs like TOPSUM and TOPCMD are quite tricky.
For testing I have supplied a sample nmon file called: sampleC.nmon and a sample output file called: sampleC.html which was generated using the following command: ./nmonchart sampleC.nmon sampleC.html
Output file size
Also note nmonchart output files are typically much smaller than the original nmon file. Something like 20% of the size. This is unlike the nmon Analyser file output which can typically be twice the size.
Summary of the graphs
Graphs not supported
Graphs that are not going to happen and why?
Adding new graphs - I am interested in hearing you ideas on new graphs you would like to have. - They need to add value for most nmon users - Adding graphs from the nmon file is pretty easy as we have already worked though the issues of most formatting options - So it is a cut'n'paste rename the graph and make minor formatting changes for the column, don't forget the button line at the bottom.
- Yet more disks graphs for stupidly high numbers of disks is not a good idea. We could give an option to find the top 20 over used disk names!
nmonchart created web pages or Graph failures
If you transform the nmon data but the webpage does not work - what should you do?
Testing of nmonchart
Using the internal to IBM website we had more than 200 nmon files to test. This includes - Current AIX 6 and 7 - Back dated AIX 6 and 7 including some with nmon errors of 5 years ago - Old AIX 5 files - mostly to check utilisation before upgrading to POWER8
Current Linux on Power from SUSE, Ubuntu and Red Hat Current Linux on x86 and x86_64 from SUSE, Ubuntu and Red Hat and also other hardware like ARM. Other Linux Distro's and some older releases too. I would like more examples from Mainframe and Linux Distro's like Fedora OpenSUSE, Debian etc. and collected by nmon 15 from within a VM especially overworked machines showing CPU Steal utilisation time.
On strange, rare or older nmon files a lot of work has gone in to support oddly formatted data - nmonchart is now pretty robust ... unless you know differently
Upload and Generate Graphs Website
IBMers can use this internal site:
This is just a starter for ten - you will be required to do significant work. You will have to know HTML, scripting and a little PHP. I am not offering hand holding support to get your working.
I set up a crude upload your nmon file webpage and a cron job to create the .html files and a further script to generate a webpage to list the resulting .html files listed by hostname and then the date and listing the OS.
- nmon_upload.html - the upload webpage - nmon_upload.php - the PHP that actually uploads the file - nmonchart_cron - the cron job that runs nmonchart on new uploads and generated the webpage of hosts and graphs.
This is provided "as is" but comes with loads of assumptions in the code:
I may try to clean these up and make them generic.
I would actually like some help doing a much better job and the above has a 8 MB limit and is slow and I would like a multiple file upload system. The 60 second cron job is also crude. The index.html needs to automatically refresh once a minute or so.
I actually have a budget to run a WWW upload website to help those not interested in setting up their own. - expect more information as soon as I can set this up.
Cheers Nigel Griffiths firstname.lastname@example.org Twitter @mr_nmon