Get all entries from all HTTPErr logs on
the computer.
Listing 21
Logparser -i:HTTPErr "Select * from C:\windows\system32\Logfiles\httperr\*.log"
-q:ON
Suppose you are investigating a connection
failure and you want to check if the connection was dropped from IIS or HTTP; you
also want to find out the date, time, the URL requested and the reason for the
failure. If this is the case, you can use the following
log parser query that will not only give you the log file where the entry is,
but also the data you need to further troubleshoot the problem.
Listing 22
LogParser -i:HTTPErr "Select logfilename, date, time, cs-uri, s-reason from
C:\windows\system32\Logfiles\httperr\*.log" -q:ON -o:datagrid
LogParser -i:HTTPErr "SELECT date, time, c-ip, cs-uri, sc-status, s-reason FROM
httperr1.log ORDER BY date,time" -o:DataGrid -q:ON
Listing 23: Sorting the output by
reason for failure
LogParser -i:HTTPErr "SELECT date, time, c-ip, cs-uri, sc-status, s-reason FROM
httperr1.log ORDER BY s-reason" -o:DataGrid -q:ON
Now suppose, you are investigating a
specific problem, such as "Service Unavailable," and you want to find out details like
the client IP, client port, and reason. You can filter this with the
sc-status code of 503.
Listing 24
Logparser -i:HTTPErr "Select logfilename, date, time, cs-uri, c-port, s-reason
from C:\windows\system32\Logfiles\httperr\*.log WHERE sc-status=503" -q:ON
-o:datagrid