Server Auto-Dump on Crash with Silent Crash

Post Reply
nasomi
Posts: 141
Joined: Wed Feb 13, 2013 8:51 am

Server Auto-Dump on Crash with Silent Crash

Post by nasomi » Thu Dec 11, 2014 9:42 pm

This here is the holy grail for me. I have been trying to figure out auto-dumps for the longest time. Paired with silent crash, I can also auto-restart. With this, minimal down time without sacrificing the information necessary to figure out what happened.

And it's stupidly simple.

Put this stuff in a file and call it reg.reg, or something.reg.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting]
"DontShowUI"=dword:0000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\DSGame-server.exe]
"DumpFolder"=hex(2):63,00,3a,00,5c,00,64,00,75,00,6d,00,70,00,00,00
"DumpCount"=dword:00000010
"DumpType"=dword:00000002

Save the file, right click, add to registry.

That's it for auto-dumps. The default directory I set is c:\dump, you can change it if you'd like using regedit.

Paired with KNAS restarter, it's the ideal solution for constant uptime.

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Server Auto-Dump on Crash with Silent Crash

Post by TeoTwawki » Fri Dec 12, 2014 5:31 am

This is awesome. I paired it with cmd scripts on my win7 box. Just have to remember to copy the matching exe and pdb to go along with the dmp files.

Code: Select all

@echo off
:onCrash
echo [%date% %time%] Restarting Game/Map Server...
DSGame-server.exe
echo Server was stopped or crashed!
echo %date% %time%> .\log\Last_Map_Stop.log
echo ...
GOTO onCrash
That's the script I've been using since aprox last September. I have that creating an extra log of when my last stop was, so if I'm away for awhile I can see if my uptime has suffered. As an added bonus I can right click the console window and copy, rather than having to scroll down the log or extra clicks to copy file for that error I just saw.
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

Post Reply