system.cpu.util is over 100% on windows agent

XMLWordPrintable

    • Type: Incident report
    • Resolution: Fixed
    • Priority: Major
    • 1.8.4, 1.9.0 (alpha)
    • Affects Version/s: 1.6.9, 1.8.3
    • Component/s: Agent (G)
    • None

      system.cpu.util on windows get 101.66667%(avg1) or 100.3333%(avg5) if cpu util is 100% for 1 minute.

      in src/zabbix_agent/cpustat.c


      /* Calculate average cpu usage */
      for(n = pcpus->cpu[i].h_usage_index, j = 0, sum = 0; j < MAX_CPU_HISTORY; j++, n--)
      {
      if(n < 0) n = MAX_CPU_HISTORY - 1;

      sum += pcpus->cpu[i].h_usage[n];

      if(j == 60) /* cpu usage for last minute */

      { pcpus->cpu[i].util1 = ((double)sum)/(double)j; }

      else if(j == 300) /* cpu usage for last five minutes */

      { pcpus->cpu[i].util5 = ((double)sum)/(double)j; }

      }


      variable "j" is start "0", "sum" is added 61 times when j == 60.

            Assignee:
            Unassigned
            Reporter:
            Kodai Terashima
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: