1 2 Previous Next 15 Replies Latest reply on Apr 18, 2011 3:07 PM by lamw

    Illegal division by zero at line 3502

    vancod Enthusiast

      ESXi - v4.1 (currant as of last november - there are some outstanding patches)
      vCenter Server 4.1.0 build-258902
      vMA 4.1.0.0 build 268837
      Script version 4.1.6

       

      This is a large env - 6 clusters with several dozen hosts and many VMs

       

      I get the following:

       

      [donv@las01-vma HealthCheck]$ ./vmwarevSphereHealthCheck.pl --server <server> --username <user> --password <passwd> --type vcenter --report vCS01_Config.html


      Generating VMware vSphere Health Report 4.1.6 "vCS01_Config.html" ...

       

      This can take a few minutes depending on environment size.
      Get a cup of coffee/tea and check out http://www.virtuallyghetto.com

       

      Illegal division by zero at ./vmwarevSphereHealthCheck.pl line 3502.

       

       

      I did generate the verbose output if required - but it's 1.28MB of text.

        • 1. Re: Illegal division by zero at line 3502
          lamw Guru
          Community WarriorsVMware Employees

          Hello,

           

          I removed your output file as it actually contains license keys from your environment, please be careful when sharing output from your environment. You can always use --demo option which will mask away any sensitive information which includes license keys.

           

          Regarding your division by zero, I believe this has been resolved in an unrelease version of the script which you can find here - http://vghetto.svn.sourceforge.net/viewvc/vghetto/scripts/vmwarevSphereHealthCheck.pl?view=log

           

          4.1.7 contains a few minor fixes, still waiting for some feedback on some other reported issues. Please give that version a try and see if you hit the problem still

           

          Thanks

          1 person found this helpful
          • 2. Re: Illegal division by zero at line 3502
            vancod Enthusiast

            Better - I get what appears to be complete output (it's HUGE, so I'm still parsing through it)

             

            But I get a couple of these:

            Use of uninitialized value in concatenation (.) or string at ./vmwarevSphereHealthCheck.pl line 3808.

            And about 3 dozen of these:

            Use of uninitialized value in concatenation (.) or string at ./vmwarevSphereHealthCheck.pl line 1651.

            (I'd hazard to guess one for each host)

             

            I can share the output privately if you like.

             

            Thanks for catching the private data in the output - I kind of forgot it would need sanitizing......

             

             

            Say - I haven't looked at the CSS (I think you're just using some special divs?) - but is there any way to get the output of this "old-school style" where it's just one huge page?  I rather liked it that way....

             

            Thanks

            • 3. Re: Illegal division by zero at line 3502
              lamw Guru
              VMware EmployeesCommunity Warriors

              Let me take a look at these lines when I get a chance.

               

              Regarding just a flat report, take a look at --printerfriendly option. All available options are documented in the documentation

              • 4. Re: Illegal division by zero at line 3502
                lamw Guru
                Community WarriorsVMware Employees

                Regarding 3808 - This is WRT to cluster affinity rules, do you have any in your environment? If so, could you break down what that looks like?

                 

                Regarding 1651 - This is WRT to extracting the managemement IP Address of your vCenter Server which is exposed in each ESX(i) host if it's being managed by vCenter.

                 

                If you would like to share your output privately, I can see if I can correlate the details but I suspect if you can provide more information regarding the above, it may point me in the right direction. If not, I could provide you with some debugging lines to add which will help me figure out what's causing the "uninit values"

                • 5. Re: Illegal division by zero at line 3502
                  vancod Enthusiast

                  We have LOTS of rules - see attached.

                   

                  I've cleansed the output, I have no issue sharing.....

                  • 6. Re: Illegal division by zero at line 3502
                    lamw Guru
                    VMware EmployeesCommunity Warriors

                    So for the second issue which you're seeing several dozen is mapping back to the management IP Address of your vCenter server, what I try to do in the script is perform a DNS lookup so you get the nice hostname. It looks like it can't get a resolution and then the variable is left as NULL.

                     

                    e.g.

                    172.30.252.201 (  )

                     

                    Can you see on the host you're running the script if it's able to perform a DNS lookup, just curious if it works outside of the script. I may need to do a quick sanity check on the variable if it does not resolve properly.

                    • 7. Re: Illegal division by zero at line 3502
                      Touffi Enthusiast

                      Je suis absent jusqu'au 25 avril  2011, pour toutes questions urgentes veuillez SVP, contacter mes remplaçants ou le servicedesk 031 325 88 88. Vos messages seront traités à mon retour.

                      Jonsen Robert BIT         +41 31 32 33957

                      Schaible Andreas BIT  +41 31 32 35681

                      Locher Hanspeter BIT +41 31 32 32653

                      • 8. Re: Illegal division by zero at line 3502
                        vancod Enthusiast

                        Sadly, DNS in this environment is in disarray at the moment, but reverse lookups are failing.  I will re-run the script once this is remediated.

                        • 9. Re: Illegal division by zero at line 3502
                          lamw Guru
                          VMware EmployeesCommunity Warriors

                          I believe I've resolved all the issues you've ran into, go ahead and give the latest version 4.1.8 a try and let me know if you're still seeing any additional errors outside of the DNS resolves.

                           

                          Thanks

                          • 10. Re: Illegal division by zero at line 3502
                            vancod Enthusiast

                            I now get 12 of these:
                            (there are 6 hosts in this env)
                            Use of uninitialized value in concatenation (.) or string at ./vmwarevSphereHealthCheck.pl line 1653.

                            • 11. Re: Illegal division by zero at line 3502
                              lamw Guru
                              VMware EmployeesCommunity Warriors

                              Yes, that line maps to the DNS reverse lookup ... interesting it's in an eval block, so even if it fails, it should just default to "N/A"

                              • 12. Re: Illegal division by zero at line 3502
                                vancod Enthusiast

                                ??

                                Both forward and reverse DNS are fully functional here....

                                • 13. Re: Illegal division by zero at line 3502
                                  lamw Guru
                                  VMware EmployeesCommunity Warriors

                                  Can you add two print statements to line 1649-1650 and see what you get from your system?

                                   

                                                           eval {
                                                                                         $ipaddress = inet_aton($local_host->summary->managementServerIp);

                                                                                         print "DEBUG: " . $ipaddress . "\n";
                                                                                         $dnsname = gethostbyaddr($ipaddress, AF_INET);

                                                                                         print "DEBUG: " . $dnsname . "\n";
                                                            };

                                  • 14. Re: Illegal division by zero at line 3502
                                    vancod Enthusiast

                                    I now get 12 of these:

                                    DEBUG: ¬1
                                    Use of uninitialized value in concatenation (.) or string at ./vmwarevSphereHealthCheck.pl line 1652.
                                    DEBUG:
                                    Use of uninitialized value in concatenation (.) or string at ./vmwarevSphereHealthCheck.pl line 1655.

                                    1 2 Previous Next