如何使用ADPLUS _ONLY_获取MiniDumpOnSecond

时间:2011-07-07 22:55:31

标签: iis dump minidump adplus

对于生产Win2003 Web服务器,我希望能够在w3wp.exe进程崩溃时始终记录minidump ...我已经阅读了ADPLUS的文档,并将xcopy部署到生产Web服务器,并从命令行启动了adplus.exe,如下所示:

adplus.exe -crash -MiniOnSecond -NoDumpOnFirst -pmn w3wp.exe -o C:\ Dumps

这会记录“MiniOnSecond”,但它也会首先记录完全转储 - 我不想要那些(它们是大文件,并且没有我需要的东西)。有没有人找到一种方法来获得“-NoDumpOnFirst”标志实际工作?另外,每次重启盒子时我都会喜欢这种行为 - 如何在不重新启动批处理文件的情况下完成这项工作?我已经阅读了有关Windows错误报告(WER)的内容,并且在Win2008R2服务器上实现此行为是微不足道的 - 如何在2003服务器上运行?

我已经阅读了ADPLUS和WER的文档 - 但我需要有关实际命令行和/或注册表设置的帮助才能在Win 2003 Server上捕获minidump。谢谢你的帮助!

1 个答案:

答案 0 :(得分:3)

我使用可以附加-c标志的配置文件...因为我最感兴趣的是在我的自定义COM组件中捕获错误,这些设置创建没有fulldump的minidump,并忽略CLR崩溃,并且不要在IISReset上完全转储。

要始终运行此操作,请创建计划任务。从管理员提示:

schtasks /create /tn "Crash Dump Monitor w3wp" /tr "\"C:\Program Files\Debugging Tools for Windows (x86)\adplus.exe\" -c \"C:\Program Files\Debugging Tools for Windows (x86)\adplus_w3wp.xml\"" /sc ONSTART

将此文件另存为 C:\ Program Files \ Windows调试工具(x86)\ adplus_w3wp.xml

<ADPlus Version="2">
<!-- 
PURPOSE:      Capture mini crash dumps in IIS 6.0. Do not capture full dumps
INSTRUCTIONS: Save this file in the same location as adplus.exe (usually C:\Program Files\Debugging Tools for Windows (x86))
COMMAND LINE: 
          "C:\Program Files\Debugging Tools for Windows (x86)\adplus.exe" -iis -c "C:\Program Files\Debugging Tools for Windows (x86)\adplus_w3wp.xml"
-->
  <Settings>
    <RunMode>Crash</RunMode>
    <OutputDir>C:\Dumps</OutputDir>
    <ProcessToMonitor>w3wp.exe</ProcessToMonitor>
  </Settings>
  <Exceptions>
    <All>
      <Actions1>VOID</Actions1>
      <Actions2>VOID</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </All>
    <Exception Code="av"><!-- Access Violoation -->
      <Actions1>Log;Time;Stack;MiniDump;EventLog</Actions1>
      <ReturnAction1>GN</ReturnAction1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="ch"><!-- InvalidHandle -->
      <Actions1>Log;Time;Stack;MiniDump;EventLog</Actions1>
      <ReturnAction1>GN</ReturnAction1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="ii"><!-- Illegal Instruction -->
      <Actions1>Log;Time;Stack;MiniDump;EventLog</Actions1>
      <ReturnAction1>GN</ReturnAction1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="dz"><!-- IntegerDivide -->
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="c000008e"><!-- FloatingDivide -->
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="iov"><!-- IntegerOverflow -->
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="lsq"><!-- InvalidLockSequence -->
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="sov"><!-- StackOverflow -->
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="aph"><!-- Application_hang -->
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="dm"><!-- Data_misaligned -->
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="gp"><!-- Guard_page_violation -->
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="ip"><!-- In_page_IO_error -->
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="isc"><!-- Invalid_system_call -->
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="sbo"><!-- StackOverflow -->
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>
    <Exception Code="epr"><!-- Process_Shut_Down -->
      <Actions1>Log;Time;</Actions1>
      <ReturnAction1>Q</ReturnAction1>
    </Exception>
    <!--
    <Exception Code="clr">
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>

    <Exception Code="*">
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>

    <Exception Code="clr">
      <Actions1>VOID</Actions1>
      <Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
      <ReturnAction1>GN</ReturnAction1>
      <ReturnAction2>GN</ReturnAction2>
    </Exception>-->

  </Exceptions>

</ADPlus>

有人可以改进吗?我错过了任何重要的崩溃异常吗?