This new command-line utility is aimed at capturing process dumps of otherwise difficult to isolate and reproduce CPU spikes. It also serves as a general process dump creation utility and can also monitor and generate process dumps when a process has a hung window or unhandled exception.
ProcDump also includes hung window monitoring (using the same definition of a window hang that Windows and Task Manager use) and unhandled exception monitoring.
Prerequisites
Client: Windows XP or higher
Server: Windows Server 2003 or higher
Using Procdump
usage: procdump [-c CPU usage [-u] [-s seconds] [-n exceeds]] [-h] [-e] [-ma] [-r] [-o] [[
What kind of information will the usage of such a parameter give you?
Let’s go a little deeper into those parameters…
-c Specify what the CPU threshold is for ProcDump to start a dump of the
process. This option can be very usefull when an application, for example,
has a memory leak which causes a very high CPU load.
-e This parameter will trigger ProcDump to write a dump of the process
encounters an unhandled exception.
-h Write dump if process has a hung window.
-ma This parameter writes a dump file with all process memory. The default dump
format includes only the thread and handle information, when this options
gives you all output from the process information which is stored in the
memory at the time of the creation of the dump file.
-n With this parameter you can specify the number of dumps to be created before
exiting the application.
-o This option overwrites an existing dump file.
-r This parameter clones the process for the dump to minimize the time the
process is suspended.
Note that this only works on a Windows 7 operating system or higher.
-s The CPU threshold must be hit for several seconds continuously before the
dump is written (default value is 10, so 10 seconds).
-u If you have a quad core server, and so have 4 cores, the maximal CPU time
you can have is potentially 25% of the global CPU time.
This parameter will treat CPU usage as a single core, and so tell you when a
single core is swamped. This can be very useful if you have redirected an
application to use a specified core.
-x Launch the specified image with optional arguments.
This tool can be very usefull when you have an issue occurring on several of your servers or workstations, but at random so you’re having trouble to pin-point the cause. Making a memory dump of an application can sometimes be a challenge because the issues are occurring when a user within your company is using his or her environment.
Examples
Write up to 3 dumps of a process named 'consume' when it exceeds 20% CPU usage for three seconds to the directory c:\dump\consume with the name consume.dmp:
C:\>procdump -c 20 -n 3 -o consume c:\dump\consume
Write a dump for a process named 'hang.exe' when one of it's windows is unresponsive for more than 5 seconds:
C:\>procdump -h hang.exe hungwindow.dmp
Launch a process and then monitor it for excessive CPU usage:
C:\>procdump -c 30 -s 10 -x consume.exe consume.dmp
Write a dump of a process named 'iexplore' to a dump file that has the default name iexplore.dmp:
C:\>procdump iexplore
** Source: command-line “procdump /?” **