Previous | Next |
Windows Script Runtime must be installed on your computer to run the Log Analysis Script or any other script written in VBScript. To download the runtime program, see the VBScript download page at the Microsoft Web site.
The Log Analysis Script (Logs.vbs) is installed on your computer with the Windows Media Technologies SDK installation. The default installation path is C:\Program Files\Windows Media Components\SDK\Samples\LogScripts.
Entering the command line
To run the script, at the command prompt, type Logs.vbs, followed by any number of switches and parameters, for example:
logs.vbs -o c:\logs\reportforyesterday$Y.txt -f 1 -s c:\winnt\system32\logfiles -h –8 –b 2/3/99 –e 4/29/99
Most switches affect what is included in the report by filtering and sorting information gathered from the client statistics logs. Other switches set input and output file names and paths, and affect how the script runs. The following table describes the switches.
Switch | Description | Example |
-a | Specifies the name of a unicast publishing point. Only client connections that are made to this publishing point are included in the report. | MyPubPoint |
-b | Specifies a beginning date. Only client events that occur after this date are included in the report. | 1/1/98 |
-d | Sets the script to run in Quiet mode, and does not display a message when the script run is finished. In quiet mode, you can perform other tasks while the script runs in the background. | |
-e | Specifies an end date. Only client events that occur prior to this date are included in the report. | 5/7/99 |
-f | Specifies the format of the report. Enter 1 to create a report that is formatted as a text document. Enter 2 to create a report formatted in HTML. | 1 |
-h | Specifies the time difference between Greenwich mean time and local time. For example, Pacific time is 8 hours earlier than Greenwich mean time (-8). Use this switch to offset times in the client statistics logs, which are given in Greenwich mean time. | -8 |
-l | Specifies a minimum time in seconds that a client streamed content successfully. Client stream times that are less than this are not included in the report. With this switch, you can exclude clients from a report if they were not connected for any meaningful period of time. | 30 |
-o | Specifies the path and file name of the report file that is created by the script. If $Y is included in the file name, it is replaced by the previous day’s date. | C:\DailyReports\Rept$Y.txt |
-s | Specifies the path to the log files. More than one path can be included. The script analyzes all the Windows Media Services log files in the designated directories. | C:\Winnt\System32\Logfiles |
-? | Opens the Help screen. |
The following command-line example creates a text report using log files that are dated between 1/1/99 and 1/7/99, and includes only connections made to the MyAlias unicast publishing point:
logs.vbs -o c:\logs\report.txt -f 1 -b 1/1/99 -e 1/7/99 -s c:\winnt\system32\logfiles -a MyAlias -h –8
Note For the script to work properly, the output file, log files directory, and beginning and ending dates must be included in the command. If neither date is given, a report is created for the current date only.
See Also
About the Log Analysis Script Sample, PERL ParseLog Script Sample, Windows Media Technologies Solutions Samples
Previous | Next |