logparser SELECT子句:语法错误:未知字段' DateTime'

时间:2014-05-27 18:17:14

标签: sql logparser

我有问题。我创建了一个Log Parser SQL Query,它需要从没有Column Header的.LOG文件中检索Resultsets。我使用了ParseIT 3.0版。问题是我查询的源文件中的Token名为DateTime,但是当我尝试使用Logparser.exe从命令行调用查询时,出现以下错误:Error: SELECT clause: Syntax Error: unknown field 'DateTime'

以下是来自Source的记录示例。日志文件:

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:
 collapse;width:1220pt" width="1626">
    <colgroup>
        <col style="mso-width-source:userset;mso-width-alt:6107;width:125pt" width="167" />
        <col style="mso-width-source:userset;mso-width-alt:1097;width:23pt" width="30" />
        <col style="mso-width-source:userset;mso-width-alt:7094;width:146pt" width="194" />
        <col style="mso-width-source:userset;mso-width-alt:2816;width:58pt" width="77" />
        <col style="mso-width-source:userset;mso-width-alt:15762;width:323pt" width="431" />
        <col style="mso-width-source:userset;mso-width-alt:5814;width:119pt" width="159" />
    </colgroup>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt; width: 125pt" width="167">
        Thread-47</td>
        <td class="auto-style1" style="width: 23pt" width="30">(W)</td>
        <td class="auto-style1" style="width: 146pt" width="194">5/21/2014 
        02:47:43:000812 PM</td>
        <td align="right" class="auto-style1" style="width: 58pt" width="77">
        1.4007E+12</td>
        <td class="auto-style1" style="width: 323pt" width="431">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1" style="width: 119pt" width="159">
        midtierConnection()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000812 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">checkDDPRequest()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000812 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">checkDDPRequest()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000812 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">run()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000812 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">run()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000812 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection</td>
        <td class="auto-style1">doDDPSend()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000812 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection</td>
        <td class="auto-style1">doDDPSend()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000844 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection</td>
        <td class="auto-style1">doDDPSend()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000844 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection</td>
        <td class="auto-style1">doDDPSend()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000844 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">com.dstsystems.awd.hostmanager.ConnectionBase</td>
        <td class="auto-style1">setState()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(P)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000844 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection</td>
        <td class="auto-style1">send()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000844 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">run()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000844 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">writeDDPResponse()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000844 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">writeDDPResponse()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000844 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">writeDDPResponse()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000844 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">checkDDPRequest()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-38</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:43:000844 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">run()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Total 
        Memory: 16,318,464</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Free Memory:<span style="mso-spacerun:yes">&nbsp;
        </span>6,415,584</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-47</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:44:000953 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">midtierConnection()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:44:000953 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">checkDDPRequest()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:44:000953 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">checkDDPRequest()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:44:000953 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">run()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:44:000953 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">run()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:44:000953 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection</td>
        <td class="auto-style1">doDDPSend()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:44:000953 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection</td>
        <td class="auto-style1">doDDPSend()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:45:000015 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection</td>
        <td class="auto-style1">doDDPSend()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:45:000015 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection</td>
        <td class="auto-style1">doDDPSend()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:45:000015 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">com.dstsystems.awd.hostmanager.ConnectionBase</td>
        <td class="auto-style1">setState()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(P)</td>
        <td class="auto-style1">5/21/2014 02:47:45:000015 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection</td>
        <td class="auto-style1">send()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:45:000015 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">run()<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:45:000015 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">writeDDPResponse()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:45:000015 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">writeDDPResponse()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:45:000015 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">writeDDPResponse()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:45:000015 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">checkDDPRequest()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Thread-12</td>
        <td class="auto-style1">(W)</td>
        <td class="auto-style1">5/21/2014 02:47:45:000015 PM</td>
        <td align="right" class="auto-style1">1.4007E+12</td>
        <td class="auto-style1">
        com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection</td>
        <td class="auto-style1">run()</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Total 
        Memory: 16,318,464</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="auto-style1" height="20" style="height: 15.0pt;">Free Memory:<span style="mso-spacerun:yes">&nbsp;
        </span>7,101,416</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
        <td class="auto-style1">&nbsp;</td>
    </tr>
</table>

显示Tab-Separated-Value TSV或TEXTLINE Format的文本如下:

Thread-47   (W) 5/21/2014 02:47:43:000812 PM    1400698063812   com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection    midtierConnection() midtierConnection() Constructor
Thread-38   (W) 5/21/2014 02:47:43:000812 PM    1400698063812   com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection    checkDDPRequest()   New Incoming Request
Thread-38   (W) 5/21/2014 02:47:43:000812 PM    1400698063812   com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection    checkDDPRequest()   Incoming Request Length = 493
Thread-38   (W) 5/21/2014 02:47:43:000812 PM    1400698063812   com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection    run()               Host: Sys2_DatB_56639_DP367 Connection: Sys2_DatB_56639_DP3670083 API: ChangeBoxStatus Sending the request
Thread-38   (W) 5/21/2014 02:47:43:000812 PM    1400698063812   com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection    run()   Host: Sys2_DatB_56639_DP367 Connection: Sys2_DatB_56639_DP3670083 Incoming: *<transaction SSID="ESP-CPEINVENTORY"><apiname>ChangeBoxStatus</apiname><comcorp>4418</comcorp><opr>CG7</opr><bnumb>MA1410EJT253</bnumb><bxstatus>B</bxstatus><delboxpassword></delboxpassword><tech_number></tech_number><code_of_day>790</code_of_day><bypass_delete_scheme></bypass_delete_scheme><bypass_
Thread-38   (W) 5/21/2014 02:47:43:000812 PM    1400698063812   com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection    doDDPSend()         Host: Sys2_DatB_56639_DP367 Connection: Sys2_DatB_56639_DP3670083 API: ChangeBoxStatus Writing the request to socket
Thread-38   (W) 5/21/2014 02:47:43:000812 PM    1400698063812   com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection    doDDPSend()         Host: Sys2_DatB_56639_DP367 Connection: Sys2_DatB_56639_DP3670083 API: ChangeBoxStatus Waiting for the response
Thread-38   (W) 5/21/2014 02:47:43:000844 PM    1400698063844   com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection    doDDPSend()         Host: Sys2_DatB_56639_DP367 Connection: Sys2_DatB_56639_DP3670083 API: ChangeBoxStatus Data for response length = **0000193**
Thread-38   (W) 5/21/2014 02:47:43:000844 PM    1400698063844   com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection    doDDPSend()         Host: Sys2_DatB_56639_DP367 Connection: Sys2_DatB_56639_DP3670083 API: ChangeBoxStatus Response Data Fully Read
Thread-38   (W) 5/21/2014 02:47:43:000844 PM    1400698063844   com.dstsystems.awd.hostmanager.ConnectionBase   setState()  Setting connection state: 5
Thread-38   (P) 5/21/2014 02:47:43:000844 PM    1400698063844   com.dstsystems.awd.hostmanager.servers.ddp.ddpConnection    send()              Host: Sys2_DatB_56639_DP367 Connection: Sys2_DatB_56639_DP3670083 API: ChangeBoxStatus Origination: ContactConnection: 24.40.42.35 Time: 32 Total Time: 32
Thread-38   (W) 5/21/2014 02:47:43:000844 PM    1400698063844   com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection    run()               Host: Sys2_DatB_56639_DP367 Connection: Sys2_DatB_56639_DP3670083 API: ChangeBoxStatus Getting the response
Thread-38   (W) 5/21/2014 02:47:43:000844 PM    1400698063844   com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection    writeDDPResponse()  Host: Sys2_DatB_56639_DP367 Connection: Sys2_DatB_56639_DP3670083 API: ChangeBoxStatus Writing the response data
Thread-38   (W) 5/21/2014 02:47:43:000844 PM    1400698063844   com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection    writeDDPResponse()  Host: Sys2_DatB_56639_DP367 Connection: Sys2_DatB_56639_DP3670083 Outgoing : *<?xml version="1.0"?><transaction><apiname>ChangeBoxStatus</apiname><errorcode>0</errorcode><errordescription/><transaction_status>Task Complete</transaction_status></transaction>*
Thread-38   (W) 5/21/2014 02:47:43:000844 PM    1400698063844   com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection    writeDDPResponse()  Match!!! Host: Sys2_DatB_56639_DP367 Connection: Sys2_DatB_56639_DP3670083 req-resp API : ChangeBoxStatus==ChangeBoxStatus Corp : 04418==00000 House : 000000==000000
Thread-38   (W) 5/21/2014 02:47:43:000844 PM    1400698063844   com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection    checkDDPRequest()   Connection closed by remote host
Thread-38   (W) 5/21/2014 02:47:43:000844 PM    1400698063844   com.dstsystems.awd.hostmanager.servers.ddp.midtierConnection    run()   midtierConnection: New Request: Thread-38
Total Memory: 16,318,464
Free Memory:  6,415,584

我需要在两个单独的列中提取日期和时间。 First将被称为Date,另一个称为Time。我使用ParseIT和以下SQL查询

SELECT Date, QUANTIZE(Time,60) AS LogTime, APIName, Count(*) AS TotalHits, SUBSTR(Strings,ADD(INDEX_OF(Strings,'Host:'),5) ,22) AS BillingFrom, SUBSTR(Strings,ADD(INDEX_OF(Strings,'Connection:'),11) ,22) AS BILLINGTo, AVG(DIV(TO_REAL(TotalTime),1000)) AS AvgSec USING EXTRACT_TOKEN(FileName,2,'\\') AS Server, EXTRACT_TOKEN(DateTime, 0, ' ') AS TempDate, EXTRACT_TOKEN(DateTime, 1, ' ') AS TempTime, EXTRACT_TOKEN(DateTime, 2, ' ') AS Meridiem, EXTRACT_TOKEN(TempDate, 0, '/') AS TempMonth, EXTRACT_TOKEN(TempDate, 1, '/') AS TempDay, EXTRACT_TOKEN(TempDate, 2, '/') AS Year, CASE STRLEN(TempMonth) WHEN 1 THEN STRCAT('0', TempMonth) ELSE TempMonth END AS Month, CASE STRLEN(TempDay) WHEN 1 THEN STRCAT('0', TempDay) ELSE TempDay END AS Day, STRCAT(STRCAT(STRCAT(STRCAT(Year, '-'), Month), '-'), Day) AS Date, REPLACE_STR(TempTime, STRCAT(':', EXTRACT_SUFFIX (TempTime,0,':')), '') AS TimeNoMilliSec, EXTRACT_TOKEN(TimeNoMilliSec, 0, ':') AS Hour, STRCAT(Hour,Meridiem) AS HourMeridiem, CASE HourMeridiem WHEN '12AM' THEN REPLACE_STR(TimeNoMilliSec, Hour, '00') WHEN '01PM' THEN REPLACE_STR(TimeNoMilliSec, Hour, TO_STRING(ADD(TO_INT(Hour), 12))) WHEN '02PM' THEN REPLACE_STR(TimeNoMilliSec, Hour, TO_STRING(ADD(TO_INT(Hour), 12))) WHEN '03PM' THEN REPLACE_STR(TimeNoMilliSec, Hour, TO_STRING(ADD(TO_INT(Hour), 12))) WHEN '04PM' THEN REPLACE_STR(TimeNoMilliSec, Hour, TO_STRING(ADD(TO_INT(Hour), 12))) WHEN '05PM' THEN REPLACE_STR(TimeNoMilliSec, Hour, TO_STRING(ADD(TO_INT(Hour), 12))) WHEN '06PM' THEN REPLACE_STR(TimeNoMilliSec, Hour, TO_STRING(ADD(TO_INT(Hour), 12))) WHEN '07PM' THEN REPLACE_STR(TimeNoMilliSec, Hour, TO_STRING(ADD(TO_INT(Hour), 12))) WHEN '08PM' THEN REPLACE_STR(TimeNoMilliSec, Hour, TO_STRING(ADD(TO_INT(Hour), 12))) WHEN '09PM' THEN REPLACE_STR(TimeNoMilliSec, Hour, TO_STRING(ADD(TO_INT(Hour), 12))) WHEN '10PM' THEN REPLACE_STR(TimeNoMilliSec, Hour, TO_STRING(ADD(TO_INT(Hour), 12))) WHEN '11PM' THEN REPLACE_STR(TimeNoMilliSec, Hour, TO_STRING(ADD(TO_INT(Hour), 12))) ELSE TimeNoMillisec END AS MilitaryTime, TO_TIMESTAMP(MilitaryTime,'hh:mm:ss') AS Time, ADD(INDEX_OF(Strings, ' API:'), 6) AS API_StartValue, EXTRACT_TOKEN(SUBSTR(Strings, API_StartValue), 0, ' ' ) AS API_Value, ADD(INDEX_OF(Strings, ' API : '), 7) AS API_2_StartValue, EXTRACT_TOKEN(SUBSTR(Strings, API_2_StartValue), 0, '==' ) AS API_2_Value, COALESCE(API_Value, SUBSTR(Strings, ADD(INDEX_OF(Strings, '<apiname>'), 9), SUB(INDEX_OF(Strings, '</apiname>'), ADD(INDEX_OF (Strings, '<apiname>'), 9)) ), API_2_Value, EXTRACT_TOKEN(Command,0, '(' ) ) AS APIName, TO_INT(SUBSTR(Strings, ADD(INDEX_OF(Strings, 'Total Time: '), 12)) ) AS TotalTime, CASE QUANTIZE(TotalTime, 500) WHEN 0 THEN 1 ELSE 0 END AS _.5s, CASE QUANTIZE(TotalTime, 500) WHEN 500 THEN 1 ELSE 0 END AS _1s, CASE QUANTIZE(TotalTime, 500) WHEN 1000 THEN 1 ELSE 0 END AS _1.5s, CASE QUANTIZE(TotalTime, 500) WHEN 1500 THEN 1 ELSE 0 END AS _2s, CASE QUANTIZE(TotalTime, 500) WHEN 2000 THEN 1 ELSE 0 END AS _2.5s, CASE QUANTIZE(TotalTime, 500) WHEN 2500 THEN 1 ELSE 0 END AS _3s, CASE QUANTIZE(TotalTime, 1000) WHEN 3000 THEN 1 ELSE 0 END AS _4s, CASE QUANTIZE(TotalTime, 1000) WHEN 4000 THEN 1 ELSE 0 END AS _5s, CASE QUANTIZE(TotalTime, 1000) WHEN 5000 THEN 1 ELSE 0 END AS _6s, CASE QUANTIZE(TotalTime, 1000) WHEN 6000 THEN 1 ELSE 0 END AS _7s, CASE QUANTIZE(TotalTime, 1000) WHEN 7000 THEN 1 ELSE 0 END AS _8s, CASE QUANTIZE(TotalTime, 1000) WHEN 8000 THEN 1 ELSE 0 END AS _9s, CASE QUANTIZE(TotalTime, 1000) WHEN 9000 THEN 1 ELSE 0 END AS _10s, CASE QUANTIZE(TotalTime, 1000) WHEN 10000 THEN 1 ELSE 0 END AS _11s, CASE QUANTIZE(TotalTime, 1000) WHEN 11000 THEN 1 ELSE 0 END AS _12s, CASE QUANTIZE(TotalTime, 1000) WHEN 12000 THEN 1 ELSE 0 END AS _13s, CASE QUANTIZE(TotalTime, 1000) WHEN 13000 THEN 1 ELSE 0 END AS _14s, CASE QUANTIZE(TotalTime, 1000) WHEN 14000 THEN 1 ELSE 0 END AS _15s, CASE ADD(ADD(ADD(ADD(ADD(ADD(ADD(ADD(ADD(ADD(ADD(ADD(ADD(ADD(ADD(ADD(ADD(_.5s, _1s), _1.5s), _2s), _2.5s), _3s), _4s), _5s), _6s), _7s), _8s), _9s), _10s), _11s), _12s), _13s), _14s), _15s) WHEN 0 THEN 1 ELSE 0 END AS _15Gs FROM D:\Projects\IIS_Logs\Servers\AQuA_HM\PACDCAQuAHM02\*.log WHERE Type = '(P)' GROUP BY BillingFrom, BILLINGTo, Date, LogTime, APIName ORDER BY Date, LogTime, APIName

使用以下命令自动执行它:

logparser -e:10000 -iw:ON -i:TSV -stats:off file:PACDCAQuAHM02.sql -o:csv>>PACDCAQuAHM02.csv

但是我收到以下错误:

Error: SELECT clause: Syntax Error: unknown field 'DateTime'

那么,我该如何解决这个问题。

0 个答案:

没有答案