Предложение SELECT logparser: Синтаксическая ошибка: неизвестное поле 'DateTime'
У меня проблема. Я создал SQL Parser Log Query, который должен получить Resultsets из файла.LOG, который не имеет заголовка столбца. Я использовал ParseIT версии 3.0. Проблема в том, что токен находится внутри исходного файла, который я запрашиваю, называется DateTime, но когда я пытаюсь вызвать запрос из командной строки с помощью Logparser.exe, я получаю следующую ошибку: Error: SELECT clause: Syntax Error: unknown field 'DateTime'
,
Вот образец записей из источника. Журнальный файл:
<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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </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">
</span>6,415,584</td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </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">
</span>7,101,416</td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </td>
<td class="auto-style1"> </td>
</tr>
</table>
Это показывает текст в формате TSV с разделением табуляцией или в формате TEXTLINE, как показано ниже:
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
Все, что мне нужно, чтобы извлечь дату и время в двух отдельных столбцах. Первый будет называться Дата, а другой - Время. Я использовал 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'
Итак, как я могу решить эту проблему.