Friday, January 21, 2005


Log parser 2.2

Wow! Version 2.2 of Log Parser is just impressive.

Log parser gives you SQL like query access to a lot of data sources:

  • IIS in text, binary and DB formats.

  • Text and CSV files

  • XML

  • Windows Event Log and Event Log backup files (.evt files).

  • File system and directories

  • Windows Registry

  • Active Directory objects.

  • NetMon capture files

The supported output formats are just as impressive:

  • Text, CSV

  • XML

  • Web log

  • SQL

  • SysLog server

  • Data Grid

  • Chart

Some neat examples from the documentation:

Create a chart containing the top 20 URLs in the "" web site:

LogParser "SELECT TOP 20 Target, COUNT(*) AS Hits INTO MyChart.gif FROM <> GROUP BY Target ORDER BY Hits DESC" -chartType:Column3D -groupSize:1024x768

Create tab separated file with event messages from multiple machine:

LogParser "SELECT SourceName, Message INTO myFile_*.tsv FROM \\MYSERVER1\Application, \\MYSERVER2\Application"

The SQL syntax has more functions than Microsoft SQL Server so you can do loads of neat stuff like calculating MD5 hashes of files, convert hex to data, escape URLs, do aggregations etc. This example calculates the average time spent by each page type

FROM ex031118.log

The Unofficial Log Parser support site has more information and a dedicated forum.

Via [The Furrygoat Experience]

No comments:

Post a Comment