« Previous Next »

Thread: GZ Files?

Last post 06-05-2009 7:22 AM by joelangley. 6 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (7 items)

Sort Posts:

  • 06-03-2009, 10:49 AM

    • MatthewM
    • Not Ranked
    • Joined on 06-03-2009, 2:42 PM
    • Posts 2

    GZ Files?

    I've read through the documentation and I can't find any indication of what I need to enter to get LogParser 2.2 to decompress a file in .GZ format prior to parsing. Is this possible or do I need to extract the files manually and then parse them?

    The files themselves are in TEXTWORD format (.log) and when I run this command:

    LogParser "SELECT Text, COUNT(*) FROM \\Filelocation\Filename.log.gz GROUP BY Text ORDER BY COUNT(*) DESC" -i:TEXTWORD

    I get this in response:

    Text COUNT(ALL *)
    ---- ------------
    B    29
    C    26
    x    26
    ∩    24
    0    24
    →    24
    Æ    23
    O    23
    R    23
    ☺    23
    Press a key...
    Text COUNT(ALL *)
    ---- ------------
    }    22
    ]    21
    ┬    21
    ↔    21
    ╘    20
    ≈    20
    ▒    20
    "    20
    c    20
    º    20
    Press a key...

    which looks to me like it's extracting the compressed characters.

  • 06-03-2009, 1:08 PM In reply to

    • ksingla
    • Top 10 Contributor
    • Joined on 06-14-2006, 3:02 AM
    • Redmond, WA
    • Posts 845

    Re: GZ Files?

    Logparser doesn't handle compressed files. You need to extract the files using some tool before feeding to logparser.

    Thanks,
    Kanwal

    Follow me on twitter at http://twitter.com/kjsingla
  • 06-03-2009, 4:15 PM In reply to

    Re: GZ Files?

    gluegood posted something that decompressed files...but it had issues with .gz files (at least it did for me). I updated the code and got it to work, I'll post it on my blog tonight and will respond here when it's done.

    Check out my blog for other cool tips and tricks:

    http://joelangley.blogspot.com/
  • 06-03-2009, 10:47 PM In reply to

    Re: GZ Files?

    Blog post to solve this can be found here

    Thanks to Gluegood who shared the original code with everyone a few months ago...his blog can be found here

    Hope this helps you.

    Check out my blog for other cool tips and tricks:

    http://joelangley.blogspot.com/
  • 06-04-2009, 10:07 AM In reply to

    • MatthewM
    • Not Ranked
    • Joined on 06-03-2009, 2:42 PM
    • Posts 2

    Re: GZ Files?

    Thanks! I'll check out both sites.

  • 06-05-2009, 6:57 AM In reply to

    Re: GZ Files?

    Glad my code is helpful.  Thanks joelangley for adding to my code. 

    Yours definately looks more extensive in the archive file types it supports - which is great for the community - I'll create a link on my site.

    Gluegood

     

  • 06-05-2009, 7:22 AM In reply to

    Re: GZ Files?

    Thanks gluegood!

    Check out my blog for other cool tips and tricks:

    http://joelangley.blogspot.com/
Page 1 of 1 (7 items)