[ZBX-1202] proc_info get value is different from value of Windows Task Manager. Created: 2009 Nov 05  Updated: 2017 May 30  Resolved: 2009 Nov 05

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 1.6.4
Fix Version/s: 1.6.6, 1.9.0 (alpha)

Type: Incident report Priority: Minor
Reporter: Kazuo Ito Assignee: Alexander Vladishev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

zabbix server : IBM X336 / CentOS 5.3 / zabbix 1.6.4
zabbix agentd : DEL optiplex 745 / WindowsXP / zabbix 1.6.4


Attachments: File 8214-zabbix-1.6.6.patch     JPEG File proc_info_01.jpg     JPEG File proc_info_02.jpg     File zbx164_proc_info.diff.tar.gz    

 Description   

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 */

{ *lastValue = value; /* HERE!! value WAS SET *lastValue WHEN count==1 */ }

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;
}
//////////////////////////////////////////////////////////////////////////////////////////////////



 Comments   
Comment by Kazuo Ito [ 2009 Nov 05 ]

proc_info get value is different from value of Windows Task Manager.

Comment by Kazuo Ito [ 2009 Nov 05 ]

proc_info get value is different from value of Windows Task Manager.

Comment by Kazuo Ito [ 2009 Nov 05 ]

I upload the patch which I tested in zbbix1.6.4

Comment by richlv [ 2009 Nov 05 ]

thanks for the report - if possible, screenshots showing english version of the frontend would be appreciated

Comment by Alexander Vladishev [ 2009 Nov 05 ]

Thank you!
Fixed in version pre1.6.7, revision 8216.

Comment by richlv [ 2009 Dec 16 ]

closing resolved issues

Generated at Thu Mar 28 20:53:32 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.