5

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?

Jason Jones
  • 153
  • 1
  • 5

1 Answers1

2

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.

Chris
  • 955
  • 7
  • 17
  • 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? – Jason Jones 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: http://technet.microsoft.com/en-us/magazine/ee872428.aspx http://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. – Jason Jones Feb 01 '11 at 03:29