Geeks With Blogs
David Christiansen |

Here is a nifty little example of how to pipe console output to Microsoft LogParser, in this case the results of a ping against Google.

ping -n 15 | "%pathTologparser%\LogParser"
"SELECT TO_INT(REPLACE_STR(EXTRACT_VALUE (Text,'time',' '),'ms',''))
AS Response INTO Ping.gif FROM stdin WHERE Text LIKE '%%Reply%%'
GROUP BY Response" -i textline -legend off -chartTitle "Ping Times" -view

Note: I have inserted line breaks for readability, this should be written as one line.

Replace %pathTologparser% with the path to your local LogParser installation, typically c:\Program Files\Log Parser 2.2 or c:\Program Files (x86)\Log Parser 2.2 on x64 installations.

Posted on Tuesday, January 25, 2011 9:33 AM | Back to top

Copyright © David Christiansen | Powered by: | Join free