Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-2902

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

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: