News: It’s the time to change my “about” page, I am a Support Escalation Engineer now

Hello Friends,

Today, let me try to give you a few tips about my favourite part of job, dump analysis. All of us know that a problem is the mother of all inventions (or reinventions). So, what’s the problem with me? My problem is, I am lazy, very very lazy, not in everything, but in anything redundant which makes me try to automate anything and everything possible, here are a few attempts.

Problem: Lot of dumps to analyze for the exact same problem, (say, 10 -12) and I’ve got to open all of them, find out if the dump is worth examining or not, very painstaking and believe me, the pain is directly proportional to the number of dumps.  

Solution: Write a nifty piece of code, that does the work for you ..


REM: "This batch file (*.bat) is intended to do an auto analysis of multiple dumps. REM: It will just do enough analysis to get you started. "
REM: "The problem I am trying to solve here is, how to find a needle from a haystack."
REM: "This is just a first pass of the haystack :)"
REM: "This batch file needs two parameters."
REM: "First parameter: The directory, in which either you have the dumps, or you have subdirectories with the dumps."
REM: "Second parameter: A log file name, in which you want to dump the analysis"
FOR /R %1 %%x IN (*.dmp) DO C:\debuggers\cdb.exe -c ".echo -------------------------------------------------------------;.echo --------------------| Start Analysis   |--------------------;.echo --------------------| Start kvnL |--------------------;kvnL;.echo --------------------| End kvnL |--------------------;.echo --------------------| Start .ecxr |--------------------;.ecxr;.echo --------------------| End .ecxr |--------------------;.echo --------------------| Start !locks |--------------------;!locks;.echo --------------------| End !locks |--------------------;.echo --------------------| Start !cs -l |--------------------;!cs -l;.echo --------------------| End !cs -l |--------------------;.echo --------------------| Start !analyze -v |--------------------;!analyze -v;.echo --------------------| End !analyze -v   |--------------------;.echo --------------------| End Analysis      |--------------------;.echo -------------------------------------------------------------;qd" -loga %2 -y "srv*C:\pubsym*" -z %%x


Isn’t it a good one, it uses just the common commands, !analyze, .ecxr, !locks, !cs –l and the output file tells you which dump(s) to analyze.

Next Script, in my next post …

Comments (0)