Ad Widget

Collapse

floating point issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bibi23
    Member
    • Oct 2005
    • 64

    #1

    floating point issue

    Hi,

    I install zabbix 1.1.4 and i found error with floating point data.
    I want to monitor cpu load on linux host, but i get strange graph. see attached file.

    Is there any fix for this problem ??

    Thanks

    my config:
    Centos 4.4
    php 5.1.6 / GD 2.0.28
    memory limit = 16M
    apache 2.0.59
    oracle 10g XE
    Attached Files
    Last edited by bibi23; 29-11-2006, 18:22. Reason: adding config
  • nereid
    Junior Member
    • Nov 2004
    • 1

    #2
    Hi

    same problem here.

    Value stored correctly in db but seem to be round when graphing.

    load 0.9000 graph as 1

    Comment

    • bibi23
      Member
      • Oct 2005
      • 64

      #3
      temporary fix

      Hi,

      the problem seems to be related to the use of the function round in the function convert_units.

      I comment round test line, and graph is OK.

      Need more investigation by Project developpers.

      the problem is visible for the net.tcp.service [pop] graph.

      ex:
      if($units=="")
      {
      ### if(($value - round($value)) < 0.01)
      ### {
      ### return sprintf("%.0f",$value);
      ### }
      ### else
      ### {
      return sprintf("%.2f",$value);
      ### }
      }

      Comment

      • Calimero
        Senior Member
        • Nov 2006
        • 481

        #4
        Same problem here. Solved it by changing config.inc.php as you did and it works fine now. Thanks

        Small patch attached for the lazy ones
        Attached Files

        Comment

        • nbakker
          Junior Member
          • May 2006
          • 14

          #5
          Same problem here....

          Comment

          Working...