Time-Taken & W3C Logs: Turn it on...

Posted: Aug 22, 2006  4 comments  

Average Rating

Tags

The most valuable friend to an IT Professional or Developer who uses IIS is a little-bitty check-mark field that is not enabled by default.  This field is the red-headed stepchild of logging but one that plays so many friendly tunes for you to determine what requests are taking a long time.  The relative thing is “long time” in most environments as one’s long time might be 2 seconds while another’s is 10.

In either event, don’t lose site of how to do yourself right when the time comes to do some log “mining.”  Enable the time-taken field for W3C logging (if you are using this type).

User Interface:

  1).  Open IIS Manager (Start – Run – Inetmgr)

  2).  Right-click on the Web Sites tab (IIS 6 only — IIS 5 customers right-click on Server)

  3).  Choose Properties

  4).  On the General tab, select the Properties for Logging

  5).  On the advanced tab, scroll down and check “Time-Taken”

  6).  Click Ok, Ok

  7).  For the application pool where the code is being executed, right-click and select iisapp.vbs (SP 1 customers can use iisapp.vbs and view the application pools.  Then, use iisapp /p 1234 (for PID) /r (for recycle)

Command-Line:

adsutil.vbs set w3svc/LogExtFileTimeTaken 1

NOTE:  This sets it globally.  It will be inherited down where appropriate to each site.  If you prefer to enable only on one site, then use this syntax:

adsutil.vbs set w3svc/{site#}/root/LogExtFileTimeTaken 1

For a simple Log Parser query to find the top URI’s in time-taken (i.e. slow) then use this:

Logparser “select * from <filename> where time-taken > 10000 OrderBy cs-uri-stem”

Happy troubleshooting,

~Chris

Comments

  1. Livin life... : Time-Taken & W3C Logs: Turn it on...
    August 22, 2006
    PingBack from http://blogs.iis.net/chrisad/archive/2006/08/22/1377993.aspx
  2. Bernard
    August 22, 2006
    Question: does the log time start from time request come in to request being processed by IIS or request being sent via network to client?
  3. alik levin's
    November 2, 2007

    Simple examination of IIS logs can reveal potential performance issues related to ASP.NET web applications,

  4. Noticias externas
    November 2, 2007

    Simple examination of IIS logs can reveal potential performance issues related to ASP.NET web applications

Submit a Comment