Seems the new Log Parser 2.2 will get info off web pages as well as off logs (or any text).
Let's try Log Parser 2.2 with Apache's ASP.NET info web page.
All the below demos are one long line or saved to a file and called like:
LogParser.exe -options file:name.whatever
or in a command line prompt type:
LogParser.exe "SELECT * FROM the.log" -options
C:\Documents and Settings\UserName>LogParser.exe "SELECT Text FROM http://httpd.apache.org/cli/ WHERE Text LIKE '%ASP.NET%' " -i:TEXTLINE
Returns
Text ------------------------------------------------------------------------------- <p>mod_aspdotnet is an ASP.NET host interface to Microsoft's ASP.NET engine. It is implemented with an Apache.Web.dll assembly that provides ASP.NET with <p><strong>Please</strong> use cli-users to discuss how to deploy your ASP.NET
Statistics: ----------- Elements processed: 211 Elements output: 3 Execution time: 0.55 seconds
C:\Documents and Settings\UserName>LogParser.exe "SELECT Text, COUNT(*) FROM http://httpd.apache.org/cli/ WHERE Text LIKE '%ASP.NET%' GROUP BY Text ORDER BY COUNT(*) DESC" -i:TEXTWORD
Returns
Text COUNT(ALL *) ------- ------------ ASP.NET 4
Statistics: ----------- Elements processed: 722 Elements output: 1 Execution time: 0.52 seconds
Log Parser 2.2 has improved NCSA actions, a new COM (add your own actions) interface, charting, and lots more.
An Apache NCSA example:
The below was saved to a file named GetAspx.sql
SELECT EXTRACT_PREFIX(Request, 0, ' ') AS Verb, EXTRACT_SUFFIX(Request, 0, ' ') AS HttpVersion, SUBSTR(Request , INDEX_OF(Request, '/'), SUB(STRLEN(Request), ADD( ADD(1,STRLEN(Verb)), ADD(1,STRLEN(HTTPVERSION)) ) ) ) as Url, TO_STRING(DateTime, 'MMM dd yyyy') as Date, TO_STRING(DateTime, 'hh:mm:ss') as Time, StatusCode INTO myList.txt FROM access.log WHERE Request LIKE '%aspx%'
Then in a command prompt window type:
C:\Documents and Settings\UserName\>LogParser.exe file:GetAspx.sql -i:NCSA -o:NAT -rtp:5
Returns:
Statistics: ----------- Elements processed: 1361 Elements output: 881 Execution time: 0.08 seconds
Then in a command prompt window type:
C:\Documents and Settings\Username>type myList.txt | more
Returns
Verb HttpVersion Url Date Time StatusCode ---- ----------- ------------------- ----------- -------- ---------- GET HTTP/1.1 /TestNet/Test1.aspx Nov 04 2004 17:07:30 200 GET HTTP/1.1 /TestNet/Test1.aspx Nov 04 2004 17:08:40 500 GET HTTP/1.1 /TestNet/Test1.aspx Nov 04 2004 17:09:59 500 GET HTTP/1.1 /TestNet/Test1.aspx Nov 04 2004 17:14:45 500 GET HTTP/1.1 /TestNet/Test1.aspx Nov 04 2004 17:14:59 200 Verb HttpVersion Url Date Time StatusCode ---- ----------- ------------------- ----------- -------- ---------- GET HTTP/1.1 /TestNet/Test1.aspx Nov 04 2004 17:15:03 200 GET HTTP/1.1 /TestNet/Test1.aspx Nov 04 2004 17:16:00 500 GET HTTP/1.1 /TestNet/Test1.aspx Nov 04 2004 17:20:13 500 GET HTTP/1.1 /TestNet/Test1.aspx Nov 04 2004 17:21:24 500 GET HTTP/1.1 /TestNet/Test1.aspx Nov 04 2004 17:21:57 500
And so on
To see Log Parser 2.2 chart examples:
<quote>
Create custom-formatted HTML reports: And produce a chart formatted as desired:
</quote>
ScriptCenter Tools: Log Parser 2.2 Examples http://www.microsoft.com/technet/scriptcenter/tools/logparser/lpexamples.mspx
<quote>
Log parser is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows operating system such as the Event Log, the Registry, the file system, and Active Directory.
Snip
Most software is designed to accomplish a limited numer of specific tasks. Log Parser is different... the number of ways it can be used is limited only by the needs and imagination of the user. The world is your database with Log Parser.
</quote>
Download details: Log Parser 2.2 http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&DisplayLang=en
Jeff