在 Windows Server 2003 中创建进程的内存转储?
从 Windows Vista 开始,我们有一个很好的选择,可以直接从任务管理器创建进程的内存转储。遗憾的是,Windows Server 2003 还没有这个选项:( 我找到了执行完整系统范围内存转储的方法,但这有点太多了。
有没有办法转储单个进程?因为这是一个生产服务器,我不想安装任何在后台运行的重量级工具或服务,理想情况下我只想转储进程,将转储复制到我自己的机器上并在那里调试它。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以将Windows 调试器(ntsd 或windbg)附加到进程,然后,当您想创建进程的转储时,可以使用 .dump 命令:
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:
是的,查找 userdump.exe。请参阅此知识库文章。
Yes, look for userdump.exe. See this KB article.
我认为这个“答案”应该是 jeffamaphone 的答案下的评论,但我没有足够的声誉来发表评论。
Windows Server 2003 附带了 ntsd,因此无需安装任何东西。获取进程的进程 ID 并将 ntsd 附加到该进程:
然后使用 ntsd 转储该进程:
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:
Then use ntsd to dump the process:
不要忘记来自 sysinternals.com 的 procdump(重定向到 MS,因为他们几年前购买了它们)。下载量非常小。
Don't forget about procdump from sysinternals.com (redirects to MS since they bought them a few years back). Very small download.