« Previous Next »

Thread: almost got it, but need some help please.

Last post 04-13-2009 4:23 PM by ksingla. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 04-07-2009, 10:00 AM

    • ybgfhsd
    • Not Ranked
    • Joined on 04-07-2009, 1:47 PM
    • Posts 1

    almost got it, but need some help please.

    Trying to parse a text file and want to capture only the "objectname", "operationalstate" and "operationalstatedetail" fields. So far i've gotten the syntax as logparser "select text from 'testfile.txt' where text like '%objectname%'" but i'm unable to get the remaining 2 fields and i need them in respective order of their "objectname" as there are multiple instances of those fields in the 1 text file. Any help would be appreciated.

    Excerpt from text file:

      objectid .............................: 00000000000000000000000000    objectname ...........................: Array name
      objecttype ...........................: storagecell
      objectwwn ............................: 0000-0000-0000-0000
      objecthexuid .........................: 0000-0000-0000-0000-0000-0000-0000-0000
      storagesystemcontrollermemory ........: 512
      storagesystemcontrollercachememory ...: 2048
      uid ..................................: 8.7.0000.0000.0000.0000.0000
      operationalstate .....................: good
      operationalstatedetail ...............: initialized_ok
      comments .............................:
      hexuid ...............................: 0000-0000-0000-0000-0000-0000-0000-0000

      objectparentuid ......................: 0.0.0.0.0.0.0
      objectparenthexuid ...................: 0000-0000-0000-0000-0000-0000-0000-0000
      objectparentid .......................: 0000000000000000000000000000000000000000
      controllertime
        day ................................: 06
        month ..............................: 04
        year ...............................: 2009
        hour ...............................: 16
        minute .............................: 19
        second .............................: 43
      systemtype ...........................: XXXXXXXXX

     

  • 04-13-2009, 4:23 PM In reply to

    • ksingla
    • Top 10 Contributor
    • Joined on 06-13-2006, 11:02 PM
    • Redmond, WA
    • Posts 845

    Re: almost got it, but need some help please.

    Using or should give you what you need. Something like

    logparser.exe "select text from test.txt where t
    ext like '%objectname%' or text like '%operationalstate%'"

    Thanks.
    Kanwal

    Follow me on twitter at http://twitter.com/kjsingla
Page 1 of 1 (2 items)