-
Incident report
-
Resolution: Fixed
-
Minor
-
1.6.4
-
None
-
zabbix server : IBM X336 / CentOS 5.3 / zabbix 1.6.4
zabbix agentd : DEL optiplex 745 / WindowsXP / zabbix 1.6.4
proc_info get value is different from value of Windows Task Manager.
compare "proc_info[<process>,wkset,sum]" and Memory Usage of Windows Task Manager.
For example, in monitoring "proc_info[AcroRd32.exe,wkset,sum]", ZABBIX displayed the value as 7,056k, but the real value was 3,528k.
3,528 + 3,528 = 7,056
variable "count" in the case of 1, sets variable "value" in variable "*lastValue".
after processing add variable [value] to variable [*lastValue], two times of values are added to only the first process.
In src\libs\zbxsysinfo\win32\proc.c there is following code.(1.7 is the same)
//////////////////////////////////////////////////////////////////////////////////////////////////
/* Recalculate final value according to selected type */
if (count==1) /* First instance */
switch(type)
{ case 0: /* min */ *lastValue = min((*lastValue),value); break; case 1: /* max */ *lastValue = max((*lastValue),value); break; case 2: /* avg */ *lastValue = ((*lastValue) * (count-1) + value) / count; break; case 3: /* sum */ *lastValue = (*lastValue) + value; /* HERE!! value WAS ADDED TO *lastValue */ break; default: return SYSINFO_RET_FAIL; } return SYSINFO_RET_OK;
}
//////////////////////////////////////////////////////////////////////////////////////////////////