• 1 reply
  • Latest Post - ‏2014-04-15T22:24:21Z by BruceSpencer
1 Post

Pinned topic nmon2web.cgi is not working

‏2014-04-15T11:59:21Z |


When i am trying to execute the nmon2web.cgi, I am getting below error. This error is showstopper for my nmon2web automation work.

I have checked the date filed in nmon file it has correct format 

Month '-1' out of range 0..11 at ./nmon2web.cgi line 445


Please help on this 

Updated on 2014-04-15T12:02:05Z at 2014-04-15T12:02:05Z by jaffi
  • BruceSpencer
    297 Posts

    Re: nmon2web.cgi is not working


    The nmon2web.cgi received an invalid endmonth in the request sent by the browser (index.html).  The valid months are 0-11. The cgi program received "-1". 

    Here are lines 444 and 445 in my nmon2web.cgi script.  Do our line numbers match? 

      444   $UTC_START=timelocal(0,0,0,$form_data{'startday'},$form_data{'startmonth'} - 1,$form_data{'startyear'});
      445   $UTC_END=timelocal(0,0,0,$form_data{'endday'},$form_data{'endmonth'} - 1,$form_data{'endyear'});

    If we match, then I'm confused why the error occurs on line 445 but not 444.  The most likely causes (below) would cause errors on both lines.

    Possible causes include:

    • Running nmon2web.cgi from the command line.  It needs to run as a cgi program. The browser (index.html) provides the date range.
    • Javascript not enabled on the browser.  Javascript is used to fill the drop down menu's, including the month.
    • Hitting the submit button on the browser before selecting the end date.
    • Any modifications of the index.html file that would impact Javascript (you might look at the Javascript console for errors)


    If this doesn't help, provide a more detailed explanation.