This is a very useful tip if you use PerfMon logs to monitor your applications. In my case, I have a few tools that require the logs to be in binary format and I also like to analyze a few counters manually, opening the logs on Excel. Converting the logs, I can set up only one set of counters and then convert it later.
It is also useful if you can’t set up the counters and have to work with previously generated logs or logs provided by a third party.
Windows 2003 and XP provide a number of command-line tools to monitor performance. These are the logman utility (logman.exe), the relog utility (relog.exe), and the typeperf utility (typeperf.exe).
The relog.exe utility can create new performance logs from existing performance logs. You can use the Relog.exe tool to:
- Convert a log from one type to another, such as a Microsoft Windows NT 4.0 log to a Windows XP log, or a binary log file (.blg) to a comma-separated values (.csv) file.
- Resample a log file, and then create a new log file that is based on specified counters, a time period, or a sampling interval.
For example, to convert a binary PerfMon log to a CSV file, use the command:
relog logfile.blg -f csv -o logfile.csv
For details on how to use relog, in a Windows XP box, run “relog -?” or review http://support.microsoft.com/?kbid=303133