Previous | Next |
The client statistics log file for the current version of Windows Media Services can provide very detailed information about the usage of your server. But this detail often makes the information difficult to use. In many cases, all you need is an overview. The Log Analysis Script combines, filters, and arranges the information, then creates a report that is much easier to read, and is tailored to your needs.
You can specify the information that is to be included in a Log Analysis Script report by using switches in the command line. For example, the switch –s sets an input directory path; you can specify one or more directories that contain log files to be analyzed. By using the –b and –e switches, you can specify the log files that are to be analyzed according to beginning and ending dates.
The Log Analysis Script (Logs.vbs) is written in Microsoft® Visual Basic® Scripting Edition (VBScript). To run the script, the Windows Script Runtime must be installed on your computer. When you enter the command line with the appropriate switches, the script executes using the runtime program. The resulting reports are available as simple text or HTML files. The Log Analysis Script file can be opened in any text editor, and modified to create custom reports.
Reading the report
A report displays information grouped into sections. The following table describes the sections.
Section name | Description |
Tracking Info | Displays the names of the log files that were included and information about the analysis. |
Summary Info | Summarizes the report by displaying totals. |
Stream Length | Stream length is the amount of time a client successfully streamed content. This section displays the number of clients that were connected at various stream lengths. |
Client Versions | Displays the different versions of Windows Media Player that were used to stream content, and how many clients were connected using each version. |
Client Language | Displays the different language versions of Windows Media Player that were used to stream content, and how many clients were connected using each language. |
Client OS Summary | Displays the different operating systems that were used to stream content, and how many clients were connected using each. |
Client OS Version Details | Displays details of the different operating system versions that were used to stream content, and how many clients were connected using each version. |
Client CPU | Displays the different client CPUs that were used to stream content, and how many clients were connected using each type. |
Client Protocol | Displays how many clients streamed content using each of the protocols: UDP, TCP, and HTTP. |
Successful Streams Count | Displays the total number of successful streams. |
Stream Error Count | Displays the different errors that clients received, which content was associated with the errors, and the number of clients receiving each error. |
Logfile Summary | Displays information about the log files after analysis. |
Max Concurrent Connections | Displays the 10 time periods with the highest number of concurrent streams. |
The following example report was generated by using this script:
Analyzing all log files that start on 1/24/99 and end on 1/24/99
*****************************************************
Tracking Info
*****************************************************
Started running Program at - 2/25/99 10:22:36 AM
Reading File - c:\logs\Netshow.990124000.log
Done Process Log files at - 2/25/99 10:22:44 AM
Number of Files Processed - 1
Time to Complete - 0 minutes and 8 seconds
*****************************************************
Summary Info
*****************************************************
Total Sucessful Streams - 1,284
Maximum Concurrent Connections - 39
Total Bytes Transferred - 167,274,507
Total Number of Unique Players ID's - 272
*****************************************************
Stream Length
*****************************************************
Maximum Length of a Stream - 27 minutes and 1 seconds
Total Length of all Streams - 14 hours and 45 minutes and 40 seconds
Average Length of Streams - 41 seconds
Streams 0-14 seconds - 860
Streams 15-29 seconds - 168
Streams 30-44 seconds - 32
Streams 45-59 seconds - 25
Streams 1-2 minutes - 50
Streams 2-3 minutes - 14
Streams 3-4 minutes - 11
Streams 4-5 minutes - 6
Streams 5-6 minutes - 6
Streams 6-7 minutes - 9
Streams 7-8 minutes - 8
Streams 8-9 minutes - 6
Streams 9-10 minutes - 4
Streams 10 minutes and up - 19
*****************************************************
Client Versions
*****************************************************
83.46% 227 Win 32, Version 6.0 RTM
8.82% 24 Win 32, Version 5.0 RTM
6.62% 18 6.0.3.918
0.74% 2 Win 32, Version 5.0 Beta 1.1
0.37% 1 6.1.5.108
------------------------------
100.00% 272 Total
*****************************************************
Client Language
*****************************************************
87.87% 239 English - US
5.15% 14 English - Canada
2.94% 8 English - Australia
1.10% 3 French - Canada
0.74% 2 English - Great Britain
0.74% 2 English
0.37% 1 Spanish - Ecuador
0.37% 1 Dutch - Netherlands
0.37% 1 Arabic - Saudi Arabia
0.37% 1 English - New Zealand
------------------------------
100.00% 272 Total
*****************************************************
Client OS Summary
*****************************************************
61.40% 167 Windows_98
37.87% 103 Windows_95
0.74% 2 Windows_NT
------------------------------
100.00% 272 Total
*****************************************************
Client OS Version Details
*****************************************************
Windows_NT
0.74% 2 4.0.0.1381
------------------------------
0.74% 2 Total
Windows_98
0.37% 1 4.10.0.2126
61.03% 166 4.10.0.1998
------------------------------
61.40% 167 Total
Windows_95
12.87% 35 4.0.0.1212
8.09% 22 4.0.0.950
16.91% 46 4.0.0.1111
------------------------------
37.87% 103 Total
------------------------------
------------------------------
100.00% 272 Total
*****************************************************
Client CPU
*****************************************************
95.22% 259 Pentium
4.78% 13 486
------------------------------
100.00% 272 Total
*****************************************************
Client Protocol
*****************************************************
95.59% 260 UDP
3.31% 9 TCP
1.10% 3 HTTP
------------------------------
100.00% 272 Total
*****************************************************
Successful Streams Count
*****************************************************
100.00% 1218 mms://172.113.165.21/ppv
------------------------------
100.00% 1218 Total
*****************************************************
Stream Error Count
*****************************************************
482 - StreamEnd
0.13% 1 http://172.249.115.46/ppv
------------------------------
0.13% 1 Total
400 - BadRequest
1.74% 13 Unknown
0.40% 3 http://192.249.115.46/ppv
------------------------------
2.14% 16 Total
401 - Unauthorized
0.27% 2 Unknown
4.96% 37 http://172.249.115.46/ppv
19.17% 143 mms://172.249.115.46/ppv
------------------------------
24.40% 182 Total
500 - InternalServerError
26.01% 194 http://192.249.115.46/ppv
39.01% 291 mms://192.249.115.46/ppv
------------------------------
65.01% 485 Total
408 - RequestTimeOut
0.54% 4 http://172.249.115.46/ppv
0.94% 7 Unknown
6.84% 51 mms://172.249.115.46/ppv
------------------------------
8.31% 62 Total
------------------------------
------------------------------
100.00% 746 Total
*****************************************************
Logfile Summary
*****************************************************
2,034 - Total Number of Log Lines
- ---------------------------------------------------
4 - Number of lines with Comments
- Number of lines not in alias
- Number of lines with invalid column counts
746 - Number of lines with an error code
- ---------------------------------------------------
1,284 - Total number of good lines
- Number of lines with times out of bounds
- Number of lines with an invalid duration
66 - Number of lines with duration of zero
- ---------------------------------------------------
1,218 - Total number of successful good streams
*****************************************************
Max Concurrent Connections
*****************************************************
1/24/99 6:27:50 PM - 1/24/99 6:27:54 PM - 39
1/24/99 6:26:35 PM - 1/24/99 6:26:35 PM - 38
1/24/99 6:26:33 PM - 1/24/99 6:26:34 PM - 37
1/24/99 6:26:32 PM - 1/24/99 6:26:32 PM - 36
1/24/99 6:26:27 PM - 1/24/99 6:26:31 PM - 35
1/24/99 6:26:25 PM - 1/24/99 6:26:26 PM - 34
1/24/99 6:25:59 PM - 1/24/99 6:26:10 PM - 33
1/24/99 6:25:39 PM - 1/24/99 6:25:40 PM - 32
1/24/99 6:24:56 PM - 1/24/99 6:24:57 PM - 31
1/24/99 6:24:55 PM - 1/24/99 6:24:55 PM - 30
See Also
Using the Log Analysis Script Sample, PERL ParseLog Script Sample, Windows Media Technologies Solutions Samples
Previous | Next |