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

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 1.8.4, 1.9.0 (alpha)
    • 1.6.9, 1.8.3
    • 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.

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

              Created:
              Updated:
              Resolved: