Professional SQL Server® 2005 Performance Tuning
by Steven Wort, Christian Bolton, Justin Langford, Michael Cape, Joshua J. Jin, Douglas Hinson, Haidong Ji, Paul A. Mestemaker, Arindam Sen
2.15. Built-in Log Management Tools
There are two tools of choice provided within Windows to assist with log automation, log handling, and interpreting log data. This section provides an overview and in some cases samples of these tools and utilities.
2.15.1. LogMan
You can use LogMan to schedule the start and stop of logging. This is a useful alternative to using the Windows AT scheduler or the Performance Monitor features to achieve similar results. The benefits of LogMan over configuring scheduling within individual Performance Monitor instances is that LogMan enables you to configure a data collection and to copy that collection to multiple computers from a single location. A data collection is essentially a System Monitor log definition.
Once you've defined a data collection, you're able to copy this to all target servers and then centrally control the start and stop of logging. The following command can be used to create a data collection that will run for two hours from 11 p.m. (23:00:00) and sample % Processor Time, Average Disk Queue Length, and Available Bytes every 30 seconds:
Logman create counter nightly_log -b 7/27/2007 23:00:00 -e 7/28/2008 01:00:00 -r -o "D:\logs\nightlylog" -c "\Processor(_Total)\% Processor Time" "Physical Disk\Average Disk Queue Length" "\Memory\Available bytes" -si 00:30
You may also use the following command to query a data collection or currently running log:
Logman query Logman query nightly_log
2.15.2. Relog
Provided with Windows, Relog ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access