How do I create a memory dump of my computer freeze or crash?

20,531

Solution 1

Your question is slightly unclear -- do you want to make it generate the dump when it crashes, or do you want to generate a dump when it isn't crashing and try to diagnose it from that? If the latter, that's probably not a particularly good way of going about it.

Enabling crash dumps

You can enable crash dumps by going to

My Computer > Properties > Startup and Recovery > Settings

and then select either a minidump or a kernel memory dump under Write debugging information. This should write a minidump when a crash is caught.

Initiating a manual crash

Required set-up

If you're asking how to crash manually and get a minidump written, you can do the following:

  1. Open regedit.

  2. Locate the following key if you have a USB keyboard:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\kbdhid\Parameters

    Or the following key if you have a PS/2 keyboard:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters

    In the Edit menu, click Add Value and add the following registry entry:

    • Name: CrashOnCtrlScroll
    • Data Type: REG_DWORD
    • Value: 1
       
  3. Exit the registry editor, then reboot.

Crashing the (hung) system

After the reboot, you can trigger a crash by pressing the SCROLL keyboard key twice while you hold the right CTRL key, as long as you have Windows set to write a dump when doing this, it will write it to %SYSTEMROOT%\Minidump.

The hotkey in short form is CTRL+SCR LK+SCR LK.

Solution 2

Dumping a a process when it hangs or crashes

I would use ProcDump to create a dump of the proccess that is crashed:

ProcDump is a command-line utility whose primary purpose is monitoring an application for CPU spikes and generating crash dumps during a spike that an administrator or developer can use to determine the cause of the spike. ProcDump also includes hung window monitoring (using the same definition of a window hang that Windows and Task Manager use), unhandled exception monitoring and can generate dumps based on the values of system performance counters. It also can serve as a general process dump utility that you can embed in other scripts.

Solution 3

You need to tell the computer to make a crash dump when it blue screens in

My Computer -> Properties -> Advanced -> Start and Recovery.

Analyzing the dump

I use these procedures to analyze the dump.

Share:
20,531

Related videos on Youtube

Prerak Diwan
Author by

Prerak Diwan

I am an author for the Real Python website and Software Assurance Engineer at NASA's Jet Propulsion Lab. You can follow me on twitter: @mertz_james Or check out my blog: Mertz Musings There are no winners or losers in the race of life, only finishers and quitters. #SOreadytohelp on the following topics: Python DOORS DXL

Updated on September 17, 2022

Comments

  • Prerak Diwan
    Prerak Diwan over 1 year

    As a lot of us encounter freezes or crashes, I am wondering how do I manually initiate a computer to freeze in order to create a memory dump to view and diagnose any issues that may be involved with the crash?

    I am looking on how to force the computer to crash instead of waiting for the computer to do it itself.

    • Ken White
      Ken White over 13 years
      Forcing it to crash won't help diagnose the problem, since in order to do so you'd have to already know what was making it crash in the first place, and you could just fix it instead.
    • Tamara Wijsman
      Tamara Wijsman about 13 years
      @KenWhite: This is not true. Can you tell me what application, driver or device hangs my computer if I'm looking at the desktop? No! You will need a dump which you can analyze to do so...
  • AminM
    AminM over 8 years
    what about Laptop ??
  • Jamie Hanrahan
    Jamie Hanrahan over 8 years
    It works on a laptop.
  • Le Droid
    Le Droid almost 3 years
    Dead link 404 not found