Log Parser Plus example query

Requests in the last 15 minutes

Pull a listing of requests within the last 15 minutes.
Keywords:
  • iisw3c
Statement:
logparser -rtp:-1 -i:iisw3c "SELECT TO_LOCALTIME(TO_TIMESTAMP(date, time)) AS [LocalTime], * INTO RecentRequests.txt FROM ex1008*.log WHERE LocalTime > SUB(TO_LOCALTIME(SYSTEM_TIMESTAMP()), TIMESTAMP('0000-01-01 00:15', 'yyyy-MM-dd HH:mm'))"
Notes: Change the created timestamp above as needed for more or less information. If you're planning on parsing out this data, make sure you use TO_STRING() to format the local time, as it'll contain a space and cause issues with further queries.

View more examples

blog comments powered by Disqus