共用方式為


Define trace log buffers

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

To define trace log buffers

  • Using the Windows interface

  • Using a command line

Using the Windows interface

  1. Open Performance.

  2. Double-click Performance Logs and Alerts, and click Trace Logs.

  3. In the details pane, double-click the log, and click the Advanced tab on the dialog box that appears.

  4. In Buffer size, specify the size of the buffer you want to use in kilobytes for trace data collection.

  5. In Minimum, specify the smallest number of buffers you want to use for trace data.

  6. In Maximum, specify the largest number of buffers you want to use for trace data.

  7. To have the trace provider periodically flush the buffers, select the Transfer data from buffers to log file at least every check box and specify the transfer interval in seconds.

Note

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

Using a command line

  1. Open Command Prompt.

  2. Type:

    logmanupdatecollection_name-bs {value} -nb {minmax} -ft*[[hh:]mm:]ss*

Value Description

updatecollection_name

Updates the collection query named collection_name.

-bs {value}

Specifies the buffer size in n kilobytes for the trace log.

-nb {minmax}

Specifies the minimum and maximum number of buffers for the trace log.

-ft[[hh:]mm:]ss

Specifies whether the buffer will be flushed and the interval at which the buffer will be flushed.

For example, to specify a buffer size of 128 kilobytes, a minimum of 10 buffers, and a maximum of 25 buffers for a trace log named perf_log, type:

logman update perf_log -bs 128 -nb 10 25

Notes

  • To open a 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 /?

Information about functional differences

  • Your server might function differently based on the version and edition of the operating system that is installed, your account permissions, and your menu settings. For more information, see Viewing Help on the Web.

See Also

Concepts

Create a trace log
Select trace log providers and events
Set parameters for a log
Logman