The "time-taken" field in IIS logs can be useful for figuring out whether your web site is performing as well as expected. Starting with IIS6, this value includes the time for the response to be fully received by the client, unlike in previous versions of IIS. Note that in IIS6 this field is not enabled by default in the IIS logs so it is worth enabling it. To do so, go to the "Web Site" tab of the properties dialogue for the site and next to the "Active Log File Format" combo box click the "Properties" button:




Then when the "logging properties" dialogue comes up, make sure the "time-taken" entry is checked:



A recently published article talks in more detail about what is included and when in the time-taken value:

Description of the time-taken field in IIS 6.0 and IIS 7.0 HTTP logging



Comments (3)

  1. jmguazzo says:


    Besides "analog" (www.analog.cx), do you know any good log analysis tool that generates charts and manages this "time-taken" value ?



  2. Hi JM

    I’d not come across Analog before. Looks interesting! I tend to use LogParser (available for download from the Microsoft download site). LogParser can also produce charts (although the following example does not cover that).

    For example, the following LogParser query will do a combined parse of all IIS log files (ex*.log) in the current directory quantize the time-taken field to the next nearest whole second and then group by status code, URI and second. The output also includes the number of hits in each grouped category both as a number and a percentage.

    lp "SELECT COUNT(*) As Hits,  MUL(PROPCOUNT(*),100)  AS Percent , sc-status As Status, TO_LOWERCASE(cs-uri-stem) As Uri , ADD(DIV(QUANTIZE(time-taken,1000),1000),1) AS Seconds,    AVG(time-taken) As Average-Time-Taken(ms), MAX(time-taken) As Maximum-Time-Taken(ms)  INTO output.csv FROM ex*.log   GROUP BY Status, TO_LOWERCASE(cs-uri-stem), Seconds ORDER BY Status, Uri, Seconds ASC" -i:IISW3C -o:CSV



Skip to main content