views:

268

answers:

1

I am trying to audit memory usage of applications using perfmon. The application pool processes in perfmon by default looks like w3wp.exe #1, w3wp.exe #2... Microsoft has a KB article http://support.microsoft.com/default.aspx?scid=kb;EN-US;281884 which shows how to associate PID's to processes. But PID's change when an application pool is recycled.

Is it possible to assign static PID's for each application pool which never change after recycle? also is there any other way to associate applicationpool name to a process in perfmon. I am trying to log Process/Working Set(memory) for each application pool.

+2  A: 

There's no way to use a static PID - they're allocated by the O/S when a process starts. Recycling necessarily shuts down the process and starts a new one, which gives it a new PID.

See also this question about PIDs

Tony Lee