This is a VBScript that will display an hourly count of your hits. Save top as Hourly.vbs, Save the bottom file in the same directory as your output path as hour_3.xsl. This will open in Explorer when completed'
'===================================================================================
'************************** Set Input and Output formats ******************************
Set objLogParser = CreateObject("MSUtil.LogQuery")
Set objInputFormat = CreateObject("MSUtil.LogQuery.IISW3CInputFormat")
Set objOutputFormat = CreateObject("MSUtil.LogQuery.XMLOutputFormat")
'===================================================================================
'********************************* Set String inputs **********************************
strPath = inputbox ("Where do you want to store output?","Directory Location","c:\scripts\LogParser\")
strComputer = inputbox ("Which Server log to Review","Server Log","ServerName")
strSite = inputbox ("Which Site log to Review","Site Log","1")
strWhen = inputbox("Which Date to look at? YYMMDD format","Date Entry","081217")
objOutputFormat.xslLink = strPath & "Hour_3.xsl"
outputfile = strPath & strComputer & "_WebHitPerHour.xml"
'===================================================================================
'******************************** Insert Query here **********************************
strQuery = "SELECT TO_STRING(time, 'HH') AS HOUR, TO_STRING(TO_LOCALTIME(time), 'HH') AS LOCAL, COUNT(*) AS Hits INTO " & outputfile & " FROM \\" & strComputer & "\c$\Logfiles\W3SVC" & strSite & "\ex" & strWhen & ".log GROUP BY Hour, LOCAL ORDER BY Hour ASC"
'===================================================================================
'******************************** This calls the job **********************************
objLogParser.ExecuteBatch strQuery, objInputFormat, objOutputFormat
'===================================================================================
'Z1 ************************ Open file to read *****************************************
Set objShell = Wscript.CreateObject("Wscript.Shell")
objShell.Run outputfile
'********************************************************************************************
'Next file
'*****************************************************************************************
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<xsl:for-each select="ROOT">
<HTML>
<HEAD><TITLE><xsl:value-of select="@CREATED_BY"/> Generated Log</TITLE></HEAD>
<BODY>
<CENTER><H1><xsl:value-of select="@CREATED_BY"/> Generated Log</H1></CENTER>
<CENTER><H2>Generated on <xsl:value-of select="@DATE_CREATED"/></H2></CENTER>
<CENTER><H2><FONT color="Blue">Hourly Hits</FONT></H2></CENTER>
<CENTER>
<TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5">
<TR bgcolor="#9acd32">
<TH>GMT</TH>
<TH>Local</TH>
<TH>Count</TH>
</TR>
<xsl:apply-templates select="ROW"/>
</TABLE>
</CENTER>
</BODY>
</HTML>
</xsl:for-each>
</xsl:template>
<xsl:template match="ROW">
<TR BGCOLOR="#F0F0F0">
<xsl:for-each select="*">
<TD>
<xsl:value-of select="."/>
</TD>
</xsl:for-each>
</TR>
</xsl:template>
</xsl:stylesheet>
'*****************************************************************
Jerome