« Previous Next »

Thread: Starter to Logphaser

Last post 04-05-2007 10:40 AM by LogParser User : parsernovice. 0 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (1 items)

Sort Posts:

  • 04-05-2007, 10:40 AM

    Starter to Logphaser

    logparser -q -statsFF "SELECT distinct c-ip, cs-username FROM ex*.log WHERE c-ip NOT LIKE '%%168.114.191%%'"  -rtp:-1


    running the above gives me the output below

    90.9.253.132    -       
    90.9.253.132    test1
    214.230.225.208 -       
    214.230.225.208 test2 
    76.132.136.195  -       
    76.132.136.195  test3
    212.139.115.4   -       
    81.240.77.124   -       
    81.240.77.124   test4

    I want to remove the extra logs where the IP is recurring with the [-] as the cs-username. So at the end i want the following made up output

       
    90.9.253.132    test1
    214.230.225.208 test2   
    76.132.136.195  test3
    212.139.115.4   -       << this is distinct and didnt have a duplicate so i want it to be kept.      
    81.240.77.124   test4

    also, i require the last logged TIME entry of the field c-ip or cs-username. included in the above SQL statement, any help?

     

    Thanks

Page 1 of 1 (1 items)
Microsoft Communities