ProcDump v1.5 - command-line for monitoring
ProcDump is a command-line utility whose primary purpose is monitoring an application for CPU spikes and generating crash dumps during a spike that an administrator or developer can use to determine the cause of the spike. ProcDump also includes hung window monitoring (using the same definition of a window hang that Windows and Task Manager use) and unhandled exception monitoring. It also can serve as a general process dump utility that you can embed in other scripts.
procdump [-64] [-c CPU usage [-u] [-s seconds] [-n exceeds]] [-h] [-e] [-t] [-ma] [-r] [-o] [[< process name or PID > [dump file]] | [-x < image file > < dump file > [arguments]]
|-64||By default Procdump will capture a 32-bit dump of a 32-bit process when running on 64-bit Windows. This option overrides to create a 64-bit dump.|
|-c||CPU threshold at which to create a dump of the process.|
|-e||Write a dump when the process encounters an unhandled exception.|
|-h||Write dump if process has a hung window.|
|-ma||Write a dump file with all process memory. The defaultdump format includes thread and handle information.|
|-n||Number of dumps to write before exiting.|
|-o||Overwrite an existing dump file.|
|-r||Reflect (clone) the process for the dump to minimize the time the process is suspended (Windows 7 and higher only).|
|-s||Consecutive seconds CPU threshold must be hit before dump is written (default is 10).|
|-t||Write a dump when the process terminates.|
|-u||Treat CPU usage relative to a single core.|
|-x||Launch the specified image with optional arguments.|
See more information here.