I am trying to setup Perfmon/Logman to collect some performance counters to monitor my IIS6 installation.
There are multiple w3wp instances on this host, and I can successfully collect data for the specific instance I want by passing (w3wp_1234) to the counter (where 1234 is the PID of that particular sites worker process:
Process(w3wp_1234)\Private Bytes
Problem arises when I want to collect a performance counter like Thread:Context Switches/sec, that shows the Thread # as part of the instance:
Thread(w3wp_1234/1)\Context Switches/sec
Thread(w3wp_1234/2)\Context Switches/sec
Thread(w3wp_1234/3)\Context Switches/sec
Thread(w3wp_1234/43)\Context Switches/sec
I assumed I could collect all thread instances of that process by using a wildcard:
Thread(w3wp_1234*)\Context Switches/sec
However, this did not work! Using the GLOBAL wildcard (Thread(*)\Context Switches/sec) gives me all threads for ALL processes, which is TOO MUCH information!!
What is the best way to collect the performance counters only for the particular site I'm interested in? Thanks!
That's a pretty specific requirement and assumes you know in advance the W3WP instance and PID you're interested in, before you start logging?
How about: log everything, then use RELOG to strip out just the counters that you're interested in?
Relog's included with Windows Vista and later, from memory, but might've been a resource kit tool before that.