text
stringlengths
0
4.23k
<query [query [...]]>
<path [path [...]]>
Remarks
Examples
To create a configuration data collector called cfg_log, using the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Currentverion\, type:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Currentverion\
logman create cfg cfg_log -reg HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Currentverion\\
To create a configuration data collector called cfg_log, which records all WMI objects from root\wmi in the database column MSNdis_Vendordriverversion, type:
root\wmi
MSNdis_Vendordriverversion
logman create cfg cfg_log -mgt root\wmi:select * FROM MSNdis_Vendordriverversion
logman create counter
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012
Creates a counter data collector.
Syntax
logman create counter <[-n] <name>> [options]
Parameters
Parameter
Description
-s <computer name>
Perform the command on the specified remote computer.
-config <value>
Specifies the settings file containing command options.
[-n] <name>
Name of the target object.
-f <bin|bincirc|csv|tsv|sql>
Specifies the log format for the data collector. The maximum log file size will be limited to 2 GB if csv is specified
-[-]u <user [password]>
Specifies the user to Run As. Entering an * for the password produces a prompt for the password. The password is not displayed when you type it at the password prompt.
-m <[start] [stop] [[start] [stop] [...]]>
Changes to manual start or stop instead of a scheduled begin or end time.
-rf <[[hh:]mm:]ss>
Runs the data collector for the specified period of time.
-b <M/d/yyyy h:mm:ss[AM|PM]>
Begins collecting data at the specified time.
-e <M/d/yyyy h:mm:ss[AM|PM]>
Ends data collection at the specified time.
-si <[[hh:]mm:]ss>
Specifies the sample interval for performance counter data collectors.
-o <path|dsn!log>
Specifies the output log file or the DSN and log set name in a SQL database.
-[-]r
Repeats the data collector daily at the specified begin and end times.
-[-]a
Appends an existing log file.
-[-]ow
Overwrites an existing log file.
-[-]v <nnnnnn|mmddhhmm>
Attaches file versioning information to the end of the log file name.
-[-]rc <task>
Runs the command specified each time the log is closed.
-[-]max <value>
Maximum log file size in MB or maximum number of records for SQL logs.
-[-]cnf <[[hh:]mm:]ss>