Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-5849

proc.num is not calculating the 32bit processes on a 64bit Windows machine

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.0.2, 2.0.3
    • Fix Version/s: None
    • Component/s: Agent (G)
    • Environment:
      Windows 2008 64bit

      Description

      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;
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              rohrbage Gerald Rohrbach
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: