Home > How to use the IIS Diagnostics Toolkit's Log Parser 2.2. utility
Resource Guide:
EMAIL THIS

How to use the IIS Diagnostics Toolkit's Log Parser 2.2. utility

15 Oct 2007 | By Tim Fenner, Contributor
SearchWinComputing.com

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   

Need a way of parsing through data, such as Internet Information Services (IIS) log files, the Windows registry, and Active Directory? The Log Parser 2.2 utility lets you query and sift through thousands of files and data sources.

Per Microsoft: "Log parser is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows operating system such as the Event Log, the Registry, the file system, and Active Directory. You tell Log Parser what information you need and how you want it processed. The results of your query can be custom-formatted in text based output, or they can be persisted to more specialty targets like SQL, SYSLOG, or a chart."

The Log Parser tool is available as a command-line executable (LogParser.exe) and as a set of scriptable COM objects (LogParser.dll). The two binaries are independent from each other; if you want to use only one, you do not need to install the other file on your computer.

Key features:

  • Log Parser's built-in Input Formats can retrieve data from the following sources:
    • IIS log files (W3C, IIS, NCSA, Centralized Binary Logs, HTTP Error logs, URLScan logs, ODBC logs)
    • Windows Event Log
    • Generic XML, CSV, TSV and W3C - formatted text files (e.g. Exchange Tracking log files, Personal Firewall log files, Windows Media® Services log files, FTP log files, SMTP log files, etc.)
    • Windows registry
    • Active Directory Objects
    • File and Directory information
    • NetMon .cap capture files
    • Extended/Combined NCSA log files
    • ETW traces
    • Custom plug-ins (through a public COM interface)

  • A SQL-like engine core processes the records generated by an Input Format, using a dialect of the SQL language that includes common SQL clauses (SELECT, WHERE, GROUP BY, HAVING, ORDER BY), aggregate functions (SUM, COUNT, AVG, MAX, MIN), and a rich set of functions (e.g. SUBSTR, CASE, COALESCE, REVERSEDNS, etc.); the resulting records are then sent to an Output Format.
  • Output Formats are generic consumers of records; they can be thought of as SQL tables that receive the results of the data processing. Log Parser's built-in Output Formats can:
    • Write data to text files in different formats (CSV, TSV, XML, W3C, user-defined, etc.)
    • Send data to a SQL database
    • Send data to a SYSLOG server
    • Create charts and save them in either GIF or JPG image files
    • Display data to the console or to the screen

    Unfortunately, LogParser is so powerful and flexible that I cannot easily show you how to use it. When using the command-line executable, Log Parser works on commands supplied by the user. Each command has five components:

    1. The Input Format to use
    2. Optional parameters for the Input Format
    3. The Output Format to use
    4. Optional parameters for the Output Format
    5. The SQL query that processes the records generated by the Input Format and produces records for the Output Format

    Microsoft provides the following Windows Event Log example in its documentation, but there are MANY potential uses for this tool:

    C:\>LogParser "SELECT TimeGenerated, SourceName, EventCategoryName, Message INTO report.txt FROM Security WHERE EventID = 528 AND SID LIKE '%TESTUSER%'" -resolveSIDs:ON

    For more information on using the Log Parser utility, check out the following resources:

  • Log Parser examples
  • How Log Parser works
  • Unofficial Log Parser support site

  • Inside the IIS Diagnostics Toolkit

     Introduction
     How to install the Microsoft IIS Diagnostics Toolkit
     How to use SSL Diagnostics 1.0
     How to use Authentication and Access Control Diagnostics (AuthDiag) 1.0
     How to use Exchange Server SMTP Diagnostics 1.0
     How to use Log Parser 2.2
     How to use WFetch 1.4
     How to use Trace Diagnostics
     How to use Debug Diagnostics 1.0

    About the author: Tim Fenner (MCSE, MCSA: Messaging, Network+ and A+) is a senior systems administrator who oversees a Microsoft Windows, Exchange and Office environment. He is also an independent consultant who specializes in the design, implementation and management of Windows networks.

    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



    RELATED CONTENT
    Microsoft Windows Server 2003 Administration
    How to install Windows Server 2003 patches when offline
    Validating Windows server clusters with ClusPrep
    Exploring the Windows Server 2003 Resource Kit: Clusfileport.dll
    Exploring the Windows Server 2003 Resource Kit: Cmdhere.inf and CMGetCer.inf
    Windows server security management: Security expert roundup
    Windows server management with Remote Desktop
    Avoid DC restoration problems with authoritative restore
    Exploring the Windows Server 2003 Resource Kit: Confdisk.exe
    Exploring the Windows Server 2003 Resource Kit: Compress.exe and Expand.exe
    Exploring the Windows Server 2003 Resource Kit: Clusterrecovery.exe
    Microsoft Windows Server 2003 Administration Research

    Windows Server Monitoring and Administration
    Mark Minasi, Microsoft MinWin and you
    Perfmon made easy with PAL utility
    DirectAccess means 'always on' in Windows Server 2008 R2
    Top five Server Core management tips for Windows 2008
    Top free tools for Windows server administration
    Windows Server 2008 Learning Guide
    A quick guide to Server Manager for Windows Server 2008
    Moving dynamic disks to a new Windows server
    A first look at Storage Explorer for Windows Server 2008
    Tips for Windows domain controller optimization

    Microsoft Internet Information Services (IIS)
    Small changes go a long way with IIS 7.5
    IIS gets patched, SQL Server not so much
    Internet Information Services (IIS) sees big changes in Windows Server 2008
    How to keep IIS logs from filling up your server hard drives
    A first look at Internet Information Services 7.0
    Free security tools that can improve IIS security
    New IIS 7 security adds value to Windows Server 2008
    How can I prevent Internet access with Windows SBS?
    When and how to use worker process recycling with IIS
    Windows Process Activation Service in IIS 7.0

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    IIS  (SearchWindowsServer.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary




    Hyper-V - Windows Server Virtualization Solutions
    HomeTopicsBlogsITKnowledge ExchangeTipsNewsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts