Gremlin
General Help Moderator
    
New Zealand
7528 Posts |
Posted - 14 December 2002 : 08:22:43
|
This is a really nifty little command line tool (and COM object) from Microsoft thats justrecently been updated to version 2.0.
With it you can query various type of log files (and a few other things also) using a structured SQL style query language.
For instance (copied straight from the manual)
The following example exports data from W3C Extended log files and writes it to a SQL table:
logparser "Select TO_TIMESTAMP(date, time) as Timestamp, cs-uri-stem as UriStem, cs-uri-query as UriQuery FROM ex000123.log TO TestTable" –i:W3C -o:SQL -server:GABRIEGISQL -driver:"SQL Server" -database:LogDB -username:user -password:xxx -createtable:ON
The following example retrieves a list of the largest files on the root of the drive D and prints the results to the screen:
logparser ”Select Name, Size FROM D:\*.* ORDER BY Size DESC” –i:FS –recurse:OFF
Results can be output to screen, files, databases etc etc, it's really pretty powerfull. |
Kiwihosting.Net - The Forum Hosting Specialists
|
|
Gremlin
General Help Moderator
    
New Zealand
7528 Posts |
Posted - 14 December 2002 : 08:47:36
|
MSWC.IISLog is handy too, I have a page i knocked up that basically allows me to query different fields. The bonus with the log parser is it works with many different file formats (including FileSystem, NT Event Logs etc) and the export abilities it provides. |
Kiwihosting.Net - The Forum Hosting Specialists
|
 |
|