Tuesday, September 1, 2009

LogParser Lizard on Windows Vista x64, 2003 x64, 2008 x64

The insanely useful "LogParser Lizard" from LizardLabs is something I use daily to parse logs across our server farms (i.e. did that email from someluser@somecompany.com actually leave one of the dozen front end mail servers?  Did we get any FTP error code 426's for the past week anywhere on the FTP server farm?).  It's a front-end to Microsoft's LogParser.exe so it reads pretty much any log format used on Windows, plus some niceties like AD querying, SQL DB querying, and making pretty charts out of the results.



The issue is the server I run it from is Windows 2003 32-bit.  When I tried to run it from our new management server, 2008 x64, or from any of the 64-bit 2003 servers, it would seem to start, then crash.  I'd see the following error in the event log:


Faulting application log parser lizard.exe, version 1.0.0.0, stamp 48565da6, faulting module kernel32.dll, version 5.2.3790.4062, stamp 462643a7, debug? 0, fault address 0x000000000000dd10.

I've seen this before, actually, on our own code.  Seems sometimes developers will write an app in a 32-bit environment but not explicitly set it to load 32-bit.  This is generally ok since most .NET apps will run fine in 32-bit or 64-bit, but it seems LogParser Lizard includes a lot of freeware .dll's that are 32-bit only.  As a result, even though the main .exe loads 64-bit, it tries to then load 32-bit only .dll's.

Fortunately this is easy to fix.  If you don't already have it installed, install the Microsoft .NET 2.0 SDK.  In it there's a tool called "corflags.exe" (no, there's no "e" in corflag).  This is used to modify the header of a binary to set it to be explicitly 32-bit.

To do this, run:

corflags.exe c:\full\path\to\logparserlizard.exe /32BIT+

To undo it, run the same with /32BIT-

Then it runs fine :-)

8 comments:

Ninja F said...

Excellent!! Thanks for posting this!

EricB said...

Thanks a ton for this! I've been trying to figure out why in the world this app doesn't work and your post was dead on! Just wish the author would fix it. :)

Dominic Watson said...

Thank you so much for sharing - worked a treat :)

Anonymous said...

This worked perfectly! thanks!

Sameer Dhoot said...

Thanks a ton!! It worked for me on Windows 7 x64 and Windows Server 2008 R2 x64.

Sameer Dhoot | http://intellects.in

Eric Riehl said...

Can't get the corflags.exe to work. Running as admin on the box (win2003 server 64 bit), and elevating priviledges when running the SDK cmd.

Help!

Aaron Dodd said...

Eric: Are you passing the full path to the exe you're trying to modify? Even if you're in the same folder as the exe, corflags needs the full path.

lizard labs said...

Log Parser Lizard 1.9 now works on x64 operation systems. Thank you for pointing this issue.