Relog command in Windows
(Applies to Windows Server (Semi-Annual Channel), Windows Server 2016 , Windows Server 2012 R2, Windows Server 2012 )
The relog command helps extract performance counters fromperformancecounter logs to other formats, such as text-TSV (for tab-delimited text), text -CSV (for comma-separated text), binary-BIN or SQL.
Syntax of relog command
relog [[.]] [/ a] [/ c [.]] [/ cf] [/ f {bin | csv | tsv | SQL}] [/ t] [/ o {OutputFile | DSN! CounterLog}] [/ b [[:]:]] [/ e [[:]:]] [/ config {| i}] [/ q]
The relog command parameter
Parameters
Describe
FileName [ FileName .]
Specify the path name of anexistingperformancecounter logfile.You can specify multiple files as input values.
-a
Specifiesappending data to the output file instead of overwriting.This option does not apply to SQL format.
-cpath [ path .]
Specify the path to access the performance counter file.To specify multiple counter paths, separate them with spaces and place access paths in quotation marks (for example, "Counterpath1 Counterpath2").
-cfFileName
Specify the path of the text file that lists the performance counters included in the relog file.You use this option to list the counter paths in the input file, each path is a line.The default setting is that all counter in the original log file are relog.
csv | tsv | SQL}
Specify the path name of the output file format.The default format is bin.For an SQL database, the output file will specify the DSN!CounterLog.You can specify the database location by using the ODBC manager to configure the DSN (Database System Name).
-tValue
Specify sample segment divisions in "N" records, including all nth data points in the relog file.
-o {OutputFile | "SQL: DSN! Counter_Log} where DSN is an ODMC DSN defined on the system.
Specify the path name of the output file or SQL database where the counter will be recorded.
Note: For 64-bit and 32-bit versions of Relog.exe, you will need to specify the DSN in ODBCData Source(64-bit and 32-bit respectively).
-b <M / D / YYYY > [[ HH :] MM :] SS
Specify the start time to copy the first record from the input file.The date and time must be in the correct format: month / day / year, hour: minute: seconds.
-e <M / D / YYYY > [[ HH :] MM :] SS
Specifies the end time to copy the last record from the input file.The date and time must also be in the correct format: month / day / year, hour: minute: seconds.
-config {FileName | i}
Specify the path name of the installation file containing the command line parameter.Use the -i parameter in the configuration file asa placeholderfor the list of input files that can be placed on the command line.
-q
However, on each command line, you do not need to use i.You can also use wildcards like * .blg to specify multiple input file names.
-y
Assign to ignore the notifications, by answering "yes" to all questions while the command is executed.
/?
Show help at thecommand prompt.
An explanation of the relog command
For counter path format:
- The general format for the counter path will be as follows: []
Copy counters:
- When executed, the relog command will copy the specified counters from all records in the input file, and convert the format if needed.The allowed wildcard paths appear in the counter file.
Save the subset of input results:
- Use the / t parameter to specify that the input files will be inserted into the output files in each record.By default, data will be relogged from each record.
Use parameter / b and / e with log files:
- You can specify that your output records will attach records from before start time (ie / b) to provide data for counters that require calculated values of values. is formatted.The output file will have the last record from the input files with the timestamp smaller than the / e parameter (ie end).
Use the / config option:
- The contents of the installation file used with the / config option must have the following format:, Insideis a command line option andis the parameter that determines its value.
For more information about integrating relogs into your Windows Management Instrumentation (WMI) scripts, refer to the "Scripting WMI" section on the Microsoft Windows Resource Kits website .
Example of relog command
To reset the currentlog logtemplate (existing trace log)at a fixed time interval of 30, list access paths, files and output formats, enter:
relog c: perflogsdaily_trace_log.blg / cf counter_file.txt /oc:perflogsreduced_log.csv / t 30 / f csv
To reset theexisting trace logtemplate toa fixed time of 30, list the access paths and output files, enter:
relog c: perflogsdaily_trace_log.blg / cf counter_file.txt /oc:perflogsreduced_log.blg / t 30
To return anexisting trace logto a database, type:
relog "c: perflogsdaily_trace_log.blg" -f sql -o "SQL: sql2016x64odbc! counter_log"
See more:
- The qprocess command in Windows
- Qappsrv (query termserver) command in Windows
- The quser (query user) command in Windows
- The pubprn command and the pushprinterconnections command in Windows
You should read it
- Del command in Windows
- Set command in Windows
- Cmd command in Windows
- Command at in Windows
- Fc command in Windows
- The echo command in Windows
- Bitsadmin getdisplayname and bitsadmin geterror command in Windows
- The command reg add in Windows
- Rem command in Windows
- Reg command copy in Windows
- Doskey command in Windows
- Exit command in Windows
Maybe you are interested
9 ways to fix the error of not being able to save files as JPEG or PNG in Photoshop
Download standard and beautiful Word file experience initiative cover template
How to use the file search command on Windows, find saved files
How to split sheet into multiple separate Excel files
How to merge PDF files, merge and join multiple PDF files into a single file
How to clean up iPhone junk, delete junk files to free up iPhone storage