NetXMS Support Forum

English Support => General Support => Topic started by: Spheron on September 16, 2026, 05:12:28 PM

Title: Process.Count returns 0 even EXE is running
Post by: Spheron on September 16, 2026, 05:12:28 PM

Hello @all,

we are running NetXMS at V6.2.5. We notice since the last versions, that process.count returns 0 even the checked EXE is running.

Have anyone else this behaviour to?

Greetings
Marco
Title: Re: Process.Count returns 0 even EXE is running
Post by: Alex Kirhenshtein on September 16, 2026, 06:44:27 PM
Hi Marco,

Yes, this is a bug in the Windows agent: https://github.com/netxms/netxms/issues/3656

Process.Count never sees the most recently started process on the machine. So it returns 0 while your EXE is the newest running process, and goes back to 1 as soon as something else starts after it - that's why it looks random. It's not specific to 6.2, so downgrading won't help. Process.CountEx and the other Process.* metrics have the same problem.

Until it's fixed: if the process runs as a service, monitor the service instead (service name, not display name; 0 means running):
System.ServiceState(ServiceName)
Otherwise, with the WMI subagent loaded (SubAgent = wmi.nsm in nxagentd.conf), this returns the real count:
WMI.Query(root\cimv2,"SELECT ProcessId FROM Win32_Process WHERE Name='yourapp.exe'",%%count%%)
Title: Re: Process.Count returns 0 even EXE is running
Post by: Spheron on September 17, 2026, 01:09:50 PM

Hi Alex,

thanks for the infos. The checked EXE is unfortunately not a service. So i give the WMI thing a try...

Do you patch this in the V6.2.6 ?

Greetings
Marco

PS: As allways: Great Support... Many thanks...  ;D