Windows Memory Dump

Situation

In rare cases it can be useful to know the internal software state of an IPC systems before a failure. To this end Windows can write an image of the RAM at the time of the restart to the hard disk. This is referred to as a memory dump.

Solution

The correct writing of the memory dump must be set before the restart commences.

Windows Memory Dump 1:

Windows operating system

Memory dumps are only available under Windows NT/XP/XPe/Vista/7/WES, not under WEC/CE.

Windows Memory Dump 2:

Swap file

Successful writing of a dump may require activation of the Windows swap file (see below). The operating system sees the swap file on the hard disk as additional RAM and uses it regularly. This results in increased hard disk access activity. If a CompactFlash (CF) is used as the operating system disk it may reduce its service life. It is generally advisable to monitor CF cards using suitable MDP diagnostic functions from the application (e.g. FB_SiliconDrive_Read). The swap file then only has to be activated temporarily for diagnostic purposes.

Windows Memory Dump 3:

Write protection

Active write protection of the hard disk may need to be removed for successful writing.
Examples of write protect filters include:

    • EWF (Enhanced Write Filter)
    • FBWF (File Based Write Filter)

    There are different types of memory dump, depending on the range and size of the monitored memory area. The corresponding settings are implemented in the Windows system administration.

    Beckhoff may analyze the core image available as a file on the hard disk after a system restart, if the restart was caused by TwinCAT, for example.

    A “complete dump” offers the most comprehensive analysis option, although the size may be several MB. In the settings please ensure that:

    The following settings apply for a minimum dump:

    1. first activate the swap file.
      Windows System Properties --> Advanced --> Performance Settings
    2. Windows Memory Dump 4:
      System Properties
    3. Performance Options --> Virtual Memory --> Change
    4. Windows Memory Dump 5:
      virtual memory settings
    5. Swap file specification
    Windows Memory Dump 6:
    swap file settings

    “Initial Size” and “Maximum Size” should be at least 50 MB. Confirm with SET. Clicking OK is not sufficient!
    Confirm with OK.

    1. In the second step writing of the dump is activated in the Windows system settings (Fig. System Properties).
      --> Startup and Recovery
      --> Select “Small memory dump” under “Write debugging information”
    2. Windows Memory Dump 7:
      dump settings
    3. You then need to restart the IPC.

    After the restart a dump file with current time stamp can be found at the location specified above, if writing of the dump was successful.
    Depending on the path settings, complete dumps are saved as “Memory.dmp” under C:\Windows\, small dumps as “Mini.dmp” in subfolder C:Windows\Minidump\, for example.