To add counters to a log
Using the Windows interface
Open Performance.
Double-click Performance Logs and Alerts, and then click Counter Logs.
In the details pane, double-click the log you want to modify.
On the General tab, click Add Counters. For each counter or group of counters that you want to add to the log, perform the following steps:
To log counters from the computer on which the Performance Logs and Alerts service will run, click Use local computer counters.
Or, to log counters from a specific computer regardless of where the service is run, click Select counters from computer and specify the Universal Naming Convention (UNC) name, such as \\MyLogServer, of the computer you want to monitor.
In Performance object, select an object to monitor.
In Select counters from list, click one or more counters to monitor.
To monitor all instances of the selected counters, click All Instances. (Binary logs can include instances that are not available at log startup, but which subsequently become available.)
Or, to monitor particular instances of the selected counters, click Select Instances From List, and then click an instance or instances to monitor.
Click Add.
Notes
To open Performance, click Start, click Control Panel, click Performance and Maintenance, click Administrative Tools, and then double-click Performance.
When creating a monitoring console for export, be sure to select Use local computer counters. Otherwise, counter logs will obtain data from the computer named in the text box regardless of where the console file is installed.
For a description of a counter, click the counter in Performance counters and then click Explain.
Some object types have several instances. For example, if a system has multiple processors, the Processor object type will have multiple instances. The PhysicalDisk object type has two instances if a system has two disks. Some object types, such as Memory and Server, have only a single instance. If an object type has multiple instances, you can add counters to track statistics for each instance, or, in many cases, for all instances at once. By default, counters are shown with both the instance name and an instance index. To turn off this feature, right-click the System Monitor graph, click Properties, and clear the Allow duplicate counter instances check box.
When you specify the name of a remote computer using Select counters from computer, only the name of the local computer and those computer names entered during the current Performance session are listed. Computer names entered in previous sessions will not be listed.
Using a command line
Open Command Prompt
Type:
logman update collection_name –c {path [path...]} | {–cf filename}
Value Description
update collection_name Updates the collection query named collection_name. For counter collections, modifications to the query will stop, and then restart the collections.
–c {path [path...]} |
–cf {filename} Specifies the performance counter path to log (path), or specifies the path name of the log file that lists these counters (–cf filename). To list multiple counter paths, separate the command line by a space, or use the -cf option to list counter paths in an input file, one per line. Use the format [\\computer]\object[instance]\counter] for each counter path where:
Computer is the optional computer name or the Internet protocol (IP) address of a remote computer. If a computer name is not supplied, the local computer will be used by default.
Object is the performance counter object (process or memory).
Instance (if any) is the performance object (process).
Counter is the performance counter for the object (processor time).
Note
An asterisk (*) can be used as a wild card when specifying the counter path. For example, to specify all instances of the % Processor Time, use:
"\Processor(*)\% Processor Time"
For example, to add all instances of the % Interrupt Time to the collection query named perf_log on computer \\COMP1, type:
logman update perf_log –c "\\COMP1\Processor(*)\% Interrupt Time"
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 /?
Related Topics