Sladescross's Blog

Blogging about Sharepoint related stuff

LogParser Useful Queries September 17, 2010

Filed under: Log Parser — sladescross @ 10:38 am

LogParser -i:tsv -o:tsv file:c:\logging\counts.txt

LogParser -i:tsv -o:tsv “SELECT * INTO C:\logging\troubleshoot.txt FROM C:\Logging\Logs\*.log WHERE message Like ‘%0×80131904%’”

LogParser -i:evt -o:tsv “SELECT Message, COUNT(*) AS TotalCount INTO C:\Logging\eventtroubleshooting.txt FROM Application GROUP BY Message HAVING TotalCount > 2″

LogParser -i:tsv -o:tsv “SELECT [Event Id] INTO C:\Logging\eventtroubleshooting.txt FROM ‘c:\Logging\Logs\Piccadilly\PiccadillyApplicationEventLog.txt’”

Logparser -i:csv “SELECT [(PDH-CSV 4.0) (GMT Standard Time)(0)],[\\WINSMOORIS\Office Server Search Gatherer\Threads In Plug-ins] FROM C:\perflogs\outputFile.csv TO C:\perflogs\LogParseroutputFile.csv” -iTsFormat:”mm/dd/yyyy hh:mm:ss.lll”

LogParser -i:EVT “SELECT COUNT(*) FROM Application WHERE SourceName = ‘DrWatson’ AND TimeWritten >= TO_LOCALTIME(SUB( SYSTEM_TIMESTAMP(), TIMESTAMP(’10′, ‘mm’) ) )”

LogParser -i:tsv -o:tsv “SELECT [\\PICCADILLY\Processor(_Total)\% Processor Time] INTO C:\Logging\cpumaxtroubleshooting.txt FROM ‘c:\Logging\Logs\Piccadilly\PiccadillyPerfMonFocused.csv’”

LogParser -i:csv -o:tsv -iTsFormat:”mm/dd/yyyy hh:mm:ss.lll” “SELECT [(PDH-CSV 4.0) (GMT Daylight Time)(-60)],[\\PICCADILLY\PhysicalDisk(0 C:)\Current Disk Queue Length],[\\PICCADILLY\PhysicalDisk(1 D:)\Current Disk Queue Length],[\\PICCADILLY\PhysicalDisk(2 E:)\Current Disk Queue Length],[\\PICCADILLY\Process(sqlservr)\% Processor Time],[\\PICCADILLY\Memory\Available MBytes],[\\PICCADILLY\Processor(_Total)\% Processor Time] INTO C:\Logging\cpumaxtroubleshooting.txt FROM ‘c:\Logging\Logs\Piccadilly\PiccadillyPerfMonFocused.csv’ WHERE TO_REAL([\\PICCADILLY\Processor(_Total)\% Processor Time])>90.00″

LogParser -i:csv -o:tsv -iTsFormat:”mm/dd/yyyy hh:mm:ss.lll” “SELECT QUANTIZE([(PDH-CSV 4.0) (GMT Daylight Time)(-60)], 900) As FifteenMinutes,Max([\\PICCADILLY\PhysicalDisk(0 C:)\Current Disk Queue Length]),Max([\\PICCADILLY\PhysicalDisk(1 D:)\Current Disk Queue Length]),Max([\\PICCADILLY\PhysicalDisk(2 E:)\Current Disk Queue Length]),Max([\\PICCADILLY\Process(sqlservr)\% Processor Time]),Max([\\PICCADILLY\Memory\Available MBytes]),Max([\\PICCADILLY\Processor(_Total)\% Processor Time]) INTO C:\Logging\cpumaxtroubleshootingsummarymaxes.txt FROM ‘c:\Logging\Logs\Piccadilly\PiccadillyPerfMonFocused.csv’ GROUP BY FifteenMinutes”

LogParser -i:csv -o:tsv -iTsFormat:”mm/dd/yyyy hh:mm:ss.lll” “SELECT QUANTIZE([(PDH-CSV 4.0) (GMT Daylight Time)(-60)], 900) As FifteenMinutes,Avg(TO_INT([\\PICCADILLY\PhysicalDisk(0 C:)\Current Disk Queue Length])),Avg(TO_INT([\\PICCADILLY\PhysicalDisk(1 D:)\Current Disk Queue Length])),Avg(TO_INT([\\PICCADILLY\PhysicalDisk(2 E:)\Current Disk Queue Length])),Avg(To_REAL([\\PICCADILLY\Process(sqlservr)\% Processor Time])),Avg(TO_INT([\\PICCADILLY\Memory\Available MBytes])),Avg(TO_REAL([\\PICCADILLY\Processor(_Total)\% Processor Time])) INTO C:\Logging\cpumaxtroubleshootingsummaryaverages.txt FROM ‘c:\Logging\Logs\Piccadilly\PiccadillyPerfMonFocused.csv’ GROUP BY FifteenMinutes”

LogParser -i:csv -o:tsv -iTsFormat:”mm/dd/yyyy hh:mm:ss.lll” “SELECT QUANTIZE([(PDH-CSV 4.0) (GMT Daylight Time)(-60)], 900) As FifteenMinutes,Avg(TO_INT([\\PICCADILLY\PhysicalDisk(0 C:)\Current Disk Queue Length])),Max([\\PICCADILLY\PhysicalDisk(0 C:)\Current Disk Queue Length]),Avg(TO_INT([\\PICCADILLY\PhysicalDisk(1 D:)\Current Disk Queue Length])),Max([\\PICCADILLY\PhysicalDisk(1 D:)\Current Disk Queue Length]),Avg(TO_INT([\\PICCADILLY\PhysicalDisk(2 E:)\Current Disk Queue Length])),Max([\\PICCADILLY\PhysicalDisk(2 E:)\Current Disk Queue Length]),Avg(To_REAL([\\PICCADILLY\Process(sqlservr)\% Processor Time])),Max([\\PICCADILLY\Process(sqlservr)\% Processor Time]),Avg(TO_INT([\\PICCADILLY\Memory\Available MBytes])),Max([\\PICCADILLY\Memory\Available MBytes]),Avg(TO_REAL([\\PICCADILLY\Processor(_Total)\% Processor Time])),Max([\\PICCADILLY\Processor(_Total)\% Processor Time]) INTO C:\Logging\cpumaxtroubleshootingsummary.txt FROM ‘c:\Logging\Logs\Piccadilly\PiccadillyPerfMonFocused.csv’ GROUP BY FifteenMinutes”

About these ads
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 63 other followers