To set file parameters for a log

Using the Windows interface 

1.

Open Performance

2.

Double-click Performance Logs and Alerts.

3.

To set file properties for a counter log, double-click Counter Logs.

Or, to set file properties for a trace log, double-click Trace Logs.

4.

In the details pane, double-click the log.

5.

On the Log Files tab, complete the following options:

Log file type. In the list, select the format you want for this log file, complete the options, and then click the Configure button.

Log file formatDescriptionApplies to

Text File (Comma delimited)

This option defines a comma-delimited log file (with a .csv extension). Use this format, for example, to export the log data into a spreadsheet program.

Counter logs

Text File (Tab delimited)

This option defines a tab-delimited log file (with a .tsv extension). Use this format, for example, to export the log data into a spreadsheet program.

Counter logs

Binary File

This option defines a sequential, binary-format log file (with a .blg extension). Use this file format if you want to be able to record data instances that are intermittent--that is, stopping and resuming after the log has begun running. Nonbinary file formats cannot accommodate instances that are not persistent throughout the duration of the log.

Counter logs

Binary Circular File

This option defines a circular, binary-format log file (with a .blg extension). Use this file format to record data continuously to the same log file, overwriting previous records with new data when the file reaches its maximum size.

Counter logs

Circular Trace File

This option defines a circular trace log file (with an .etl extension). Use this file format to record data continuously to the same log file, overwriting previous records with new data when the file reaches its maximum size.

Trace logs

Sequential Trace File

This option defines a sequential trace log file (with an .etl extension) that collects data until it reaches a user-defined limit and then closes and starts a new file.

Trace logs

SQL Database

This option defines the name of an exisitng SQL database and log set within the database where the performance data will be read or written. Use this file format to collect performance data at an enterprise level rather than a per server basis.

Counter logs

End file names with. Select this and choose the suffix style you want from the list. Use End file names with to distinguish between individual log files with the same log file name that are in a group of logs that have been automatically generated.

Start numbering at. Set this to the start number for automatic file numbering, when you select nnnnnn as the End file names with.

Comment. If appropriate, type a comment or description for the log file.

Configure. Select the configuration parameters using the following options for either Configure Log Files or Configure SQL Logs, based on the log file type selected from the drop-down menu. 

OptionDescriptionApplies to

Location

Type the name of the folder where you want the log file created, or click Browse to search for the folder.

Configure Log Files

File name

Type a partial or base name for the log file. You can use File name in conjunction with End file names with if appropriate.

Configure Log Files

Repository name

Select the System DSN (Data Source Name) from the drop-down list, and then type the Log set name. The Log set name will be stored in the database within the System DSN.

Configure SQL Logs

6.

Log file size. Decide, using the following options, whether or not you want to limit the size of the log file.

7.

Or, under Log set size. Decide, using the following options, whether or not you want to limit the size of the log set.

Maximum limit. When you select this option, data is continuously collected in a log file until it reaches limits set by disk quotas or the operating system. (For SQL logs data is collected in a database until it reaches its limits set by the number of records written.)

Limit of. To define a size limit for the log file, specify the size. For counter and trace logs, specify the maximum size in megabytes. For SQL logs, specify the maximum size in records.

Note

To open Performance, click Start, click Control Panel, click Performance and Maintenance, click Administrative Tools, and then double-click Performance

Windows generates an error message if available disk space falls below a specified minimum. If you choose to allow the file to grow to its maximum size, consider the available space on your disk and any quotas that may be in effect. An error might occur if you run out of disk space due to logging. The Log file size option works in conjunction with the When the log file is full option on the Schedule tab.

When you select a log file-size limit or log set, the stop option When the log file is full reflects the size limit typed here.

The File name can identify a group of log files with similar parameters.

The End file names with suffix can be a numeric sequence or a character string indicating the date and time the log was started. For example, you might define the File name "DailyLog" and the Performance Logs and Alerts service would append the date as a suffix for each file so that you might have a series of files named as follows: DailyLog_19990715, DailyLog_19990716, for each day the log is run.

The comment text and the file name appear in the details pane in the Performance Logs and Alerts console window.

Sequential counter or trace log files can grow to a size larger than the maximum file size specified by the user. This can occur for different reasons, depending on what type of log is configured. For counter logs, the log service postpones checking the log's file size until after it has collected the last data sample, at which point the file size may already have exceeded the defined limit. For trace logs, the log service writes additional buffers to the log when the log service stops, which may cause the final log file size to be slightly larger than the defined limit.

Using a command line 

1.

Open Command Prompt

2.

Type the appropriate command below:

ActionCommand

Defines the log file format.

logman update collection_name -f {bin | bincirc | csv | tsv | SQL}

Specify the file suffix.

logman update collection_name -v {nnnnn | mmddhhmm}

Set the automatic file numbering start number.

logman update collection_name -v nnnnn

Specify the location of the log file.

logman update collection_name -o path

Specify the location of the SQL database and log set where output data will be written.

logman update collection_name -o DSN!counter_log

ValueDescription

update collection_name

Updates the collection query named collection_name. For counter collections, modifications to the query will stop, and then restart the collections.

-f bin | bincirc | csv | tsv | SQL

Specifies the file format used for collecting performance counter and trace data. You can use binary (bin), circular binary (circbin), comma (csv) and tab (tsv) separated, or SQL database (SQL) formats when collecting performance counters.

 Note

For SQL database formats, you must use the -o option in the command line with the DNS!counter_log option, the System Database System Name (System DSN) must be predefined, and you must have write privileges to the database. The log set counter_log is created in the database, and is specified by the DSN.

If a file format is not specified, it defaults to binary.

-v nnnnn | mmddhhmm

Attaches the version control information to the end of the output file and path name. Use numeric nnnnn format, or date format mmddhhmm (month, day, 24-hour, minute) for version control.

-o path

Specifies the pathname of the output file that collects performance counter or trace data. By default, the collection log file name is the collection query name suffixed by either .blg for performance counters, or .etl for trace data.

-o DSN!counter_log

Specifies the location of the SQL database and log set.

For example, to specify that the output for counter collection perf_log be written to a SQL log set named daily_log in the perfdb database, type:

Logman update perf_log -f sql -o perfdb!daily_log

Note

To open command prompt, click Start, point to All Programs, point to Accessories, and then click Command Prompt

To view the complete syntax for this command, at a command prompt, type:

logman /?

Related Topics

Logman

Define trace log buffers

Define start or stop parameters for a log or alert

Select trace log providers and events

Add counters to a log



© 2014 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies