Compartilhar via


Add objects to a log

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

To add objects to a log

  • Using the Windows interface

  • Using a command line

Using the Windows interface

  1. Open Performance.

  2. Double-click Performance Logs and Alerts, and then double-click Counter Logs or Alerts.

  3. In the details pane, double-click the log or alert you want to modify.

  4. On the General tab, click Add Objects. For each object that you want to add to the log, perform the following steps:

    • To log objects from the computer on which the Performance Logs and Alerts service will run, click Use local computer counter objects.

      Or, to log objects from a specific computer regardless of where the service is run, click Select counter objects from computer: and specify the Universal Naming Convention (UNC) name, such as \\MyLogServer, of the computer you want to monitor.

    • In Performance object, click an object to monitor, and then click Add. Objects are added to the Counters list on the General tab.

    • When you are finished adding objects to monitor, click Close.

Notes

  • To perform this procedure, you must be a member of the Administrators group, or the Performance Log Users group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using run as to perform this procedure. For more information, see Default local groups, Default groups, and Using Run as.

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

  • When creating counter log settings for export, make sure to select Use local computer counter objects. Otherwise, counter logs will obtain data from the computer named in the text box.

  • For a description of an object, click the object in Performance counters and then click Explain.

  • When you specify the name of a remote computer using Select counter objects 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.

  • The Run as feature enables you to run log collections under different accounts. For example, if you need to log data from a remote computer that requires administrative credentials, you can use the feature to specify an account with the necessary permissions.

Using a command line

  1. Open Command Prompt

  2. Type:

    logman update collection_name -c {path [path...]} | {-cffilename}

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 object path to log (path), or specifies the path name of the log file that lists these objects (-cffilename). To list multiple object paths, separate the command line by a space, or use the -cf option to list object paths in an input file, one per line. Use this format [\\computer\object] for each object path where: Computer is the optional computer name or the 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).

For example, to add the PhysicalDisk object to the collection query named perf_log on computer \\COMP1, type:

logman update perf_log -c "\\COMP1\PhysicalDisk(*)\*"

Notes

  • To perform this procedure, you must be a member of the Administrators group, or the Performance Log Users group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using run as to perform this procedure. For more information, see Default local groups, Default groups, and Using Run as.

  • 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

Define start or stop parameters for a log or alert
Set parameters for a log
Logman