Logparser – look for certain IP’s between a timeframe

Here is  a quick example of pulling certain ip’s from the IIS Logs.   


‘Specific log file
logparser “select top 10 count(*),c-ip from d:wwwlogsw3svc2u_ex010228.log where to_time(time) between timestamp(’01/01 13:50:00′, ‘MM/dd hh:mm:ss’) and timestamp(’01/01 14:55:00′, ‘MM/dd hh:mm:ss’) group by c-ip order by count(*) DESC”


‘specific website, all open logs.
logparser “select top 10 count(*),c-ip from <example.com> where to_time(time) between timestamp(’01/01 13:50:00′, ‘MM/ ddhh:mm:ss’) and timestamp(’01/01 14:55:00′, ‘MM/dd hh:mm:ss’) group by c-ip order by count(*) DESC”

One thought on “Logparser – look for certain IP’s between a timeframe”

  1. i am not getting output sir,
    logparser “select top 10 count(*),c-ip into ‘c:temptest2.txt’ from ‘C:inetpublogsLogFilesW3SVC33096880u_ex120203.log’ where to_time(time) between timestamp(‘2012-02-03 09:37:09’, ‘yyyy-MM-dd hh:mm:ss’) and timestamp(‘2012-02-03 10:14:55’, ‘yyyy-MM-dd hh:mm:ss’) group by c-ip order by count(*) DESC”

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s