IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
3 replies Latest Post - ‏2013-08-22T16:08:58Z by bh3
1 Post

Pinned topic nmon2web, CGI not working (no aggreagated charts)

‏2013-05-07T22:24:08Z |

I've been attempting to use the nmon to web tool to created aggregated charts for AIX LPARS using nmon data files.  The script appears to run and process files, and I am able to find rrds created, and html created, but the forms on the main page (index.html) are not working.

I attempted to follow the instructions on for installing.  My setup is as follows: copied to "/usr/bin"

contents of html subdir of tar archive copied to "/srv/www/htdocs/nmon"

nmon2web.cgi copied to "/srv/www/cgi-bin"

I edited the script and changed the $NMON_DIR to my directory containing nmon files, and HTML dir to /srv/www/htdocs/nmon.

I edited the nmon2web.cgi and changed $DIRECTORY to the directory I intended the rrds to be created in "/root/rrds", and changed $WEB_DIR to my relative subdir in the htdocs directory "nmon".

When I run the script, it does create rrd files, but creates them in subdirectories under the html folder.  There are also individual html pages for the LPARS under that subdir.  The subdir is named for the serial of the 770.  The form on the index page is not working.  All of the dropdown menus on the form are blank.

I also attempted to use the nmon2web.cfg and nmon2web.cgi.cfg, but am not sure what directory these should be stored in.

Is there a more detailed guide I can use to get started?



  • BruceSpencer
    297 Posts

    Re: nmon2web, CGI not working (no aggreagated charts)

    ‏2013-05-28T15:18:52Z  in response to ErickP

    It looks like the problem is with the $DIRECTORY variable in the cgi script.  Both $DIRECTORY and $WEB_DIR should point to the same directory.  The $DIRECTORY is the full path name of the directory where you put the index.html file.  The $WEB_DIR is the URL path name to the same directory.  For example, on my server I put the nmon files in the "nmon" subdirectory of the web server:

    $DIRECTORY="/var/www/html/nmon";  # full path name

    $WEB_DIR="/nmon";                             # URL subdirectory. 

    The cgi program uses $DIRECTORY to find the rrd data.  It adds the appropriate subdirectories to find the rrdfiles, and then stores the dnamically created charts in $DIRECTORY/$SerialNumber/Shared/SharedPool". 

    The cgi program also dynamically creates the html file for the aggregated charts. To do so, it needs to know the starting URL subdirectory for the data. Here are two examples:$WEB_DIR/index.html       # the nmon2web starting page$WEB_DIR/$SerialNumber/Shared/sharedpool/index.html       # web page for aggregate charts


    • bh3
      2 Posts

      Re: nmon2web, CGI not working (no aggreagated charts)

      ‏2013-08-19T21:47:20Z  in response to BruceSpencer

      I'm having the same issue, whereby the rrd files are created, in subdirectories SERIAL_NO/Shared/hostname/rrddata, but the index.html file has no dropdowns for server names or valid dates.


      My index.html file has the following options in the dropdowns:

      Server Name - Trend  ( no other options )

      Date --Can choose any date, but only in 2010

      Server Name - Trend ( no others )

      System Serial Number ( blank , no choices )

      Start Date  - blank for the year

      End Date - blank for the year

      I used your example above and started over -- no success.  Any ideas, or more info I can provide  to help?  variables:

      my $NMON_DIR="/var/www/html/nmon";    # Source directory for nmon csv files
      my $HTTP_DIR="/var/www/html/nmon";    # Absolute path to index.html
      my $DB_MONTHS=6;                # rrdtool: number of months to retain data before rrd wraps
      my $MAXDISK=25;                 # store the top $MAXDISK disks (eats storage)
      my $GMT_FORMATTED=0;            # Indicates that the NMON was run with -G so the date time is already in GMT/UTC

      nmon2web.cgi variables:

      my $DIRECTORY="/var/www/html/nmon";     # Source directory for server rrd files
      my $WEB_DIR="/nmon";                            # Relative web subdir for HTML


      ls -l /var/www/html/nmon:

      drwxr-xr-x    3 nobody   nobody          256 Aug 19 16:13 021094ADR
      -rw-r--r--    1 root     system        13903 Aug 19 16:30 aixtipshead.gif
      drwxr-xr-x    3 root     system          256 Aug 19 16:30 cgi-bin
      drwxr-xr-x    2 root     system          256 Aug 19 16:30 download
      -rwxr-xr-x    1 nobody   nobody        19059 Aug 19 16:30 index.html
      -rwxr-xr-x    1 root     system        37631 Aug 19 16:30 itrus.gif
      -rwxr-xr-x    1 root     system        13465 Aug 19 16:30 readme.html
      -rw-r--r--    1 nobody   nobody         6574 Aug 19 16:30 server_list.js
      -rw-r--r--    1 nobody   nobody        22170 Aug 19 16:06 <hostnname>_130819_1516.nmon.gz





      • bh3
        2 Posts

        Re: nmon2web, CGI not working (no aggreagated charts)

        ‏2013-08-22T16:08:58Z  in response to bh3

        I went and grabbed the newest version ( 073012 ) of and nmon2web.cgi and all is well now.