How to grab a Memory Dump of the W3WP.exe process

debuggingwindows-server-2008

I'm tracking the CPU usage of a recent build I did to our Windows 2008 SP2 server.
Here's the task manager screenie…

alt text

See how it spikes? I wish to find out what are causing em. Before I do anything, I'm guessing I'll need a Memory Dump. Currently the process is around the 450MB mark.

Anyone have any ideas how I can grab a memory dump when it spikes over .. say .. 50%. Spike -> snapshot. not multi-snap shots, just one. I know how to MANUALLY get a dump .. but that's too tough. I need a once of dump after a trigger, say .. cpu > 50%.

Then I have to figure out how to debug it.

Any suggestions?

Best Answer

Setup a Performance Alert and on the action page, have it run a program or batch script to generate the dump.

alt text

SysInternals VMMap has command line options for scripting, and may give you the information you need.

vmmap.exe -p w3wp.exe C:\memory.txt

The GUI is quite helpful too.

alt text