Creating a Memory Dump of a Process in Windows Server 2003?
Asked Answered
M

4

8

Since windows Vista, we have the nice option to create a memory dump of a process directly from Task Manager. Sadly, Windows Server 2003 does not have this option yet :( I found ways to do a complete system-wide memory dump, but that's a bit too much.

Is there a way to dump a single process? As this is a production Server, I do not want to install any heavy-weight tools or and service that runs in the background, ideally I'd just like to dump the process, copy the dump to my own machine and debug it there.

Magocsi answered 22/1, 2010 at 19:43 Comment(0)
C
5

Yes, look for userdump.exe. See this KB article.

Chiao answered 22/1, 2010 at 19:46 Comment(0)
P
7

You can attach the Windows debugger (ntsd or windbg) to the proccess, then when you want to create a dump of the process you can use the .dump command:

0:000> .dump /ma myprocess-crash.dmp
Creating myprocess-crash.dmp - mini user dump
Dump successfully written
0:000>
Perhaps answered 22/1, 2010 at 19:46 Comment(1)
Thanks. I choose the other option to avoid having to install windbgMagocsi
C
5

Yes, look for userdump.exe. See this KB article.

Chiao answered 22/1, 2010 at 19:46 Comment(0)
S
3

I think this 'answer' should be a comment under jeffamaphone's answer but I do not have enough reputation to comment.

Windows Server 2003 ships with ntsd so there is no need to install anything. Get the Process ID of the process and attach ntsd to the process:

C:> ntsd -p 4356

Then use ntsd to dump the process:

.dump /f c:\MyDumpFiles\foo.dmp
Semiporcelain answered 6/11, 2012 at 17:18 Comment(0)
S
1

Don't forget about procdump from sysinternals.com (redirects to MS since they bought them a few years back). Very small download.

Strand answered 7/11, 2012 at 14:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.