-
Incident report
-
Resolution: Fixed
-
Major
-
1.6.9, 1.8.3
-
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.