windowsconfigurationperformancecounterperfmon

How to get ONLY w3wp instances when specifying performance counters for Perfmon/LogMan on Windows?


Hopefully this question has a simple answer i'm overlooking! I have an IIS webserver with multiple sites on it. In Perfmon, they show up as w3wp#1, w3wp#2, etc... I'm writing a Logman script that will collect performance counter data using the counters/instances that I specify and I want to ONLY collect any w3wp worker processes.

I've tried a couple ways, but no luck:

    \.NET CLR Memory(*w3wp*)\
    \.NET CLR Memory(w3wp#*)\
    \.NET CLR Memory(w3wp*)\

I've looked at the documentation here, and it seems like it claims to support wildcards, but not partial matches. I'm not sure what to make of that. Is there any way accomplish what I want? Hope I explained this well enough. Let me know if more details are needed.

Thanks!


Solution

  • I came up with a custom batch script that find the application pool ID, PID, and associates it with the IIS worker process in question. From there, I can manually FIND and REPLACE a generic placeholder in my perfmon configuration file to start collecting for the specific site(s). I can supply some details if there is interest.