Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Basically, I want to track which processes are running and their cpu % throughout the day to pinpoint random freezing and slowness. I would like to go in to a text file and see a log of the previous days processes, or something to that effect.

share|improve this question

GUI: Process Monitor can do this.

  • Filter on profiling only and make sure it drops filtered events, as else your memory will fill.
  • Make sure you configure a backing file as else your memory will fill.
  • Try to decrease the profiling interval to spare memory too.
  • You will have to save this yourself.

CLI: XPerf from the Windows Performance Toolkit in the Windows SDK can do this too.

  • Must be started and stopped through the command line with a wide set of parameters available so you can log whatever you want, this enables you to automate it with a logon and logoff script so you can let it start when you log in and stop when you shut down.
  • Make sure you log the CPU activity only, or else your disk will fill.
  • Again, try to decrease the profiling interval if possible, or else your disk will fill.
  • With XPerfView you can open the trace and you will have a graph which you can analyze in detail.
  • This tool is not for the faint-hearted, be sure to search articles and to read documentation.

Starting, stopping (and thus save) and viewing will look like this:

XPerf -on PROFILE -SetProfInt 5000000
XPerf -d C:\Path\To\Save\The\Trace\To.etl
XPerf C:\Path\To\Save\The\Trace\To.etl 

The units of SetProfInt are 100 nanosecond time intervals, or a ten-thousandth of a millisecond. The standard will profile the CPU every millisecond and the above example will profile every 500 milliseconds.

You can read the built-in documentation by just typing xperf if you need help about anything really specific, if you want to get a quick view of what XPerf does you can check this video. You might want to skip the part where he is running his application and sending the trace over; the most important parts are those where he is in the console or the viewing application.

Although a bit unrelated, Process Lasso might help you around the slowness...

You can configure it to lower the priority of background processes so that your system stays responsive.

ProBalance Settings screenshot

share|improve this answer
"Make sure you configure a backing file as else your memory will fill." By default, Process Monitor will use the pagefile as a backing store. Unless you've disabled it, of course. – Hello71 Aug 10 '10 at 17:50
Yes, but the pagefile might not be sufficient to keep all the data in the long end if it has a constant size, the page tables might get too big if you have one with a dynamic size. – Tom Wijsman Aug 10 '10 at 18:51

It's also possible to log CPU usage using perfmon:;EN-US;248345

You will need to identify the processes ahead of time.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .