次の方法で共有


Logparser Scenario 9:Find out what is the peak time for your IIS Server

This blog entry is a continuation of the KB Article https://support.microsoft.com/?id=910447

Scenario 9:Find out what is the peak time for your IIS Server

How can you find out what is the peak time (peak hour) for your Website using Logparser?

Answer:

Logparser "SELECT quantize(time,60), count(*) as Frequency from ex080716.log GROUP BY quantize(time,60) order by quantize(time, 60)" -rtp:-1

Here is a brief snapshot of my LogFile...

image

And here is the output...

QUANTIZE(time, 60) Frequency
------------------ ---------
02:37:00           4
02:38:00           3
02:39:00           8
02:40:00           55
02:41:00           215
02:45:00           40
02:46:00           36

Statistics:
-----------
Elements processed: 361
Elements output:    7
Execution time:     0.00 seconds

You may also try...

Logparser "SELECT quantize(time,60), count(*) as Frequency INTO Image.GIF from ex.log GROUP BY quantize(time,60) order by quantize(time, 60)"

Here is the output...

image

This tells me that 2:41 GMT is the Peak Minute for my web-site. If you want to get the details per hour... change the query to...

Logparser "SELECT quantize(time,3600), count(*) as Frequency INTO Image.GIF from ex.log GROUP BY quantize(time,3600) order by quantize(time, 3600)"

As you can easily figure out, my site doesn't have too many hits after all Winking

Hope this helps... Wave
Rahul

Quote of the day:
People who have no weaknesses are terrible; there is no way of taking advantage of them. - Anatole France

Posted at > 10:07 AM IST

Comments