Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to rollup statistics on site usage, but all I have is WSS 3.0. This will be a one-time task, so I don't want over-think it too much. I am currently collecting usage data. Is that information available to powershell or is there a published schema where I can retrieve it? If I can get it out, I can use any reporting tool.

share|improve this question

1 Answer 1

I was able to get usage data from the WSS 3.0 Usage Event Logs aggregated from thousands of site collections using Microsoft’s Log Parser 2.2 tool. Because the WSS 3.0 Usage Event Log file format is not an out of the box supported input format for Log Parser 2.2, I had to code a custom input format plug-in.

Below are some useful resources I used in my journey to analyzing usage data.

Log Parser 2.2

Custom Input Format Plugin

  • I wrote the plug-in in C#. The sample code provided with the Log Parser 2.2 installation was helpful, located at Log Parser 2.2\Samples\COM\BooksXML
  • This stackoverflow post was helpful, in particular the answer provided by @Nico.
  • The key for me was in reading the a record using the ReadRecord() method. I wrote my own ReadRecord() method using the steps below:

    1. Read each field in the record’s header entry (Examining the Usage Log File Format was very helpful)
    2. Using the values (which indicate the length in bytes for a given field) from the header entry, I read the respective number of characters for that field.

Finally, I was able to run LogParser 2.2 using the custom input format plug-in and output the results to a SQL Server database table.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.