I am trying to confirm a behavior I am seeing or am looking for help in identifying my problem.
When using Performance Monitor to collect data on multiple instances of the same process, the same instance name is associated with different PIDs. Specifically looking at the \.NET CLR Memory()\Process ID
and \Process()\ID Process
values.
I identified the behavior with the Microsoft Dynamics Nav Server process, duplicated it on another server and reproduced the problem on a 3rd server using the w3wp process.
Is this expected behavior?
Did I incorrectly assume that both values would be the same?
My guess is that the .NET metrics handle the instance names differently than the other performance metrics, but I have not found anything documented that supports this theory.
Background and How to Duplicate
In trying to collect Performance Monitor data to send to our monitoring system (Zabbix). Due to how PerfMon handles multiple instances of the same process I am using a Powershell script to translate from friendly name to instance name through the PID. I then use the collected instance name to pull the required metrics from PerfMon and report it back using the friendly name.
The following Powershell commands provide different process IDs for the same instance name:
PS > (Get-Counter "\Process(microsoft.dynamics.nav.server#3)\ID Process").CounterSamples.CookedValue
3308
PS > (Get-Counter "\.NET CLR Memory(microsoft.dynamics.nav.server#3)\Process ID").CounterSamples.CookedValue
3324
The microsoft.dynmaics.nav.server#3
instance is associated with PID 3308 and 3324 depending on which metric you pull.
I have duplicated the problem with w3wp on another server:
PS > (Get-Counter "\Process(w3wp#2)\ID Process").CounterSamples.CookedValue
5924
PS > (Get-Counter "\.NET CLR Memory(w3wp#2)\Process ID").CounterSamples.CookedValue
4396
The w3wp#2
instance is associated with PID 5924 and 4396.
I have also double checked the values directly in Performance Monitor.
My work around is to just pull the instance names a second time for the .NET based metrics so I have a solution to my process.
I am more trying to understand why this is required with this question.
tl;dr; Is Microsoft gaslighting me?
0 Answers