EPiWiki.se  - EPiServer notes shared with others
 

StackDump

[Edit]
List the managed stack trace for running .NET processes

Download


StackDump has been an open source project and are now located at stackdump.codeplex.com

Stack dump analyze


Stack dump analyze A simple tool to analyze the stack dumps generated from the stackdump.exe tool.

How does is work.


The application goes in with a managed debugger (mdbg – linked in so nothing has to be installed). The debugger stops the application and generates a list of all CLR stacks running for the process. The application is started again. This operation is a quick operation and can be executed on a running production server with unchanged production code.

Usage:


Copy the file to a folder and open a command prompt ant execute the command

stackdump <process id>

Example



stackdump 6780

Tested on


.Net 2.0 - 4.0
Windows 7 (x64/x86), Windows 2008 (x64), Windows 2003(x86/x64)

Script to dump all stack each 10 second


Save it to a file (example stackdump10.cmd)
Execute it with the processid
Example:
StackDump10 1024
Remarks for version 0.1 of stackdump.exe:
This script will never terminate sense version 0.1 always returns 0 as exit code.

:noerror
ping -n 10 127.0.0.1 > NUL 2>&1
stackdump %1 > "StackDump_%DATE:/=%__@_%time:~0,2%%time:~3,2%%time:~6,2%%.txt"

if %ERRORLEVEL% EQU 0 goto :noerror


Version author:
Mattias Lövström

EPiServer version

All