• Statistics could not be checked on 6.x

    By Jan den Otter 2 decades ago

    When checking 6.x servers (from 6.0.2 CF1 to 6.5) I get an error Statistics could not be checked). When doing a show stats manually I see that the 6.x servers add a line (1 statistics found) to the result.

    So I went out for the BCC5.5 and the notes c++ api and even without experience in C++ ( or C for that matter) I changed the code in the statcheck function as follows:

           //get the text to the right of the = sign and convert to a number<br/>
                LNString stat_value_string;<br/>
                LNNumber stat_value_set = LNString(stat_value_item[x]);<br/>
                LNINT len = 0;<br/>
    <br/>
               // Added to take the extra line of domino 6 servers into account<br/>
                LNINT loceol=0;    // Location of eol<br/>
                LNSTATUS erroreol; // result of search for eol<br/>
                erroreol = response.Find (&quot;\n&quot;, loc, &amp;loceol);// search for eol<br/>
    


                if (erroreol == 0 &amp;&amp; loceol &gt; 0) len = loceol - loc - 2;<br/>
                else len = response.GetCharacterCount() - loc -1;<br/>
    

    // end of modification

                <br/>
                response.GetSubString(loc+1, len, &amp;stat_value_string);<br/>
                LNNumber stat_value_found = stat_value_string;<br/>
    



    The result is that it now works and that I got more ideas that I will try to work out.

    • thanks

      By Ian Cherrill 2 decades ago

      Jan,



      Thanks for fixing that. When I wrote this I was (and still am) monitoring R5 servers. Hopefully an R6 upgrade is coming this year. I guess the output of the console has changed slightly. I'll try to incorporate your change in to an official release of Chksrv. It woul dbe nice to be able to check R5 and R6 servers at the same time, so I'll see if that is possible.



      Best wishes, Ian

      • It does both

        By Jan den Otter 2 decades ago

        Ian



        The fix will still allow the scanning of R5 servers, in our environment we have both. We even have one 4.6.x server but that is no longer supported so I have not really checked if it worked.



        Jan

      • It does both

        By Jan den Otter 2 decades ago

        Ian



        The fix will still allow the scanning of R5 servers, in our environment we have both. We even have one 4.6.x server but that is no longer supported so I have not really checked if it worked.



        Jan

        • great...

          By Ian Cherrill 2 decades ago

          Thanks Jan, that sounds perfect. I'll try to get the change added and then release a version 1.01 as soon as possible (it might take a couple of weeks due to circumstances beyond my control!). Ian