Match Performance Monitor Processes Instance to PID

Recently I was troubleshooting a memory leak. Since there were multiple instance of a process with same name it was hard to match PID value with Instance value in Performance Monitor.

Soon I found this great post. In it there is a suggestion to change particular registry value so we will display processes in the format of ProcessName_PID instead of ProcessName#1.

But I just wanted quickly and without any changes map ProcessName to PID. So I decided to create a simple PowerShell function.

Function is named Get-MyPerfToPID

So with it you can easily match PerfMon Name to PID. Sample usage could be something like this:

Get-MyPerfToPID | where { $_.ProcessNamePerf -match “svch” } | ft -AutoSize

ProcessNamePerf   PID
———————    —
svchost#2                  902
svchost#1                   771
svchost                       722

Easy as one two three 🙂

Function is part of My Custom Operating System PowerShell Module and Can be downloaded from Here

Details regarding module can be found Here

C U Soon

This entry was posted in Performance, Performance Monitoring, Troubleshooting, Windows Server and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s