希望有人能想到这一点。
我需要搜索一行中包含的特定单词的日志文件(总共500 000行)。日志文件如下所示:
08/06/15 13:50:11 (WARN) [thread-132] \\172.22.17.126\\root\cimv2?SCAGNT\admin; class=Win32_PerfRawData_W3SVC_WebService; property=TotalGetRequests; Name="_Total"; queryId=929775; Timeout in queue after 34 sec
08/06/15 13:50:11 (WARN) [thread-136] \\\\172.22.17.14\LogicalDisk(HarddiskVolume1)\% Disk Read Time\?SCAGNT\admin; class=; property=; ; queryId=929779; Timeout in queue after 34 sec
08/06/15 13:50:11 (WARN) [thread-142] \\172.22.5.42\\root\cimv2?scagnt\administrator; class=Win32_PerfRawData_MSSQLSERVER_SQLServerDatabases; property=ActiveTransactions; Name="RTP2016"; queryId=929785; Timeout in queue after 34 sec
08/06/15 13:50:11 (WARN) [thread-146] \\172.22.17.129\\root\cimv2?SCAGNT\admin; class=Win32_PerfRawData_MSSQLSERVER_SQLServerLocks; property=LockRequestsPersec; Name="Extent"; queryId=929789; Timeout in queue after 34 sec
08/06/15 13:50:11 (WARN) [thread-152] \\172.22.17.126\\root\cimv2?SCAGNT\admin; class=Win32_PerfRawData_W3SVC_WebService; property=CurrentAnonymousUsers; Name="_Total"; queryId=929796; Timeout in queue after 34 sec
08/06/15 13:50:11 (WARN) [thread-158] \\\\172.22.17.14\LogicalDisk(C:)\% Disk Read Time\?SCAGNT\admin; class=; property=; ; queryId=929802; Timeout in queue after 34 sec
08/06/15 13:50:11 (WARN) [thread-166] \\\\64.79.135.145\LogicalDisk(HarddiskVolume1)\Split IO/Sec\?SCAGNT\admin; class=; property=; ; queryId=929810; Timeout in queue after 34 sec
我需要查找包含例如的所有行。 " 172.22.17.126" AND"队列超时" - 只需要查看172.22.17.126设备发生超时的次数
我试图使用Notepad ++的正则表达式,但是如果查询看起来那样就无法弄清楚。
任何?