proc.num is not calculating the 32bit processes on a 64bit machine.
Probably reason might be that EnumProcessModules is used instead of EnumProcessModulesEx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682631(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682633(v=vs.85).aspx
int PROC_NUM(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result) { HANDLE hProcess; DWORD procList[MAX_PROCESSES], dwSize; int i, proccount, max_proc_cnt, proc_ok = 0, user_ok = 0; char procName[MAX_PATH], userName[MAX_PATH], baseName[MAX_PATH], uname[MAX_NAME]; if (num_param(param) > 2) return SYSINFO_RET_FAIL; if (0 != get_param(param, 1, procName, sizeof(procName))) return SYSINFO_RET_FAIL; if (0 != get_param(param, 2, userName, sizeof(userName))) *userName = '\0'; if (0 == EnumProcesses(procList, sizeof(DWORD) * MAX_PROCESSES, &dwSize)) return SYSINFO_RET_FAIL;
- duplicates
-
ZBX-9143 Zabbix agent does not see some processes since Windows 7
- Closed