I would like to perform an ad hoc capture of data using perfmon.exe for a process that runs during the night.

I know the name of the executable--lets call it Foo.exe.

If the process were currently running, I would go to the Add Counters dialog in perfmon, switch to the Process object, and select the Foo instance from the list. However, it's not currently running.

Is it possible to set up perfmon so that it will capture process data for this process when it starts, and if so, how would I configure it to do so?


One of the advantages of using the binary logging file format is that it will capture data for processes which start after the log file has started (this is not the case for CSV.)

Of course, you'll get a lot of extra data about all the processes you don't care about - you could mitigate this by scheduling a perfmon task that runs only around the time that Foo.exe runs. You could also use a script to filter out the data just for the one process using logparser.

  • So the approach would be to add the Process object, with all counters, and start the log with a binary format. Then, any process that starts during this period will be logged (including Foo.exe). Once the logging is finished, the data can simply be post-processed to filter it to only the records for Foo.exe. Is that right? Jan 27 '11 at 22:50
  • @jason - That is correct FYI - A more efficient method may be to use a powershell script to get the data just for the foo process. Here are some useful links: technet.microsoft.com/en-us/magazine/ee872428.aspx technet.microsoft.com/en-us/library/dd367892.aspx
    – Chris
    Jan 28 '11 at 13:59
  • Yep, that's what I had ended up doing after I couldn't figure out how to make perfmon do what I needed, but for the sake of curiosity, I had to ask here in case I was missing something. Feb 1 '11 at 3:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.