Grammar to parse the Path# fields of the DataPath.exe SAN Administration tool - datapath.gm

Version 4
    Share:|

    From Sean Berry:

     

    Please find attached a datapath.gm, designed to parse the Path# fields of the DataPath.exe SAN Administration tool.

     

    Please note that per directions, this grammar reports all columns in the Path# entries (those beginning with whitespace, and having a number followed by another whitespace, etc.), but that there are working rules built to parse the SERIAL: and DEV# rows as well: you need only uncomment them in the 3rd section.

     

    Here's the sample text:

    
    Total Devices : 1
    
    DEV#:  0  DEVICE NAME: Disk1 Part0  TYPE: 2145      POLICY: OPTIMIZED
    SERIAL: 600507680193015BB00000000000001C ========================================================================
    ====
    Path#            Adapter/Hard Disk        State  Mode      Select
    Errors
        0    Scsi Port3 Bus0/Disk1 Part0    OPEN  NORMAL  29416134 0
        1    Scsi Port3 Bus0/Disk1 Part0    OPEN  NORMAL          0 0
        2    Scsi Port2 Bus0/Disk1 Part0    OPEN  NORMAL  29436149 0
        3    Scsi Port2 Bus0/Disk1 Part0    OPEN  NORMAL          0 0