Using Performance Monitor to Record Counters

If you don’t have a centralized monitoring tool, you can log Performance Monitor counters to a file or to a SQL Server database. I recommend using a comma delimited file so that you can open it in your favorite program at a later date or even import it into a SQL Server database.

  1. Start Performance Monitor.
  2. Expand the Performance Logs and Alerts option, right-click Counter Logs, and select New Log Settings.
  3. In the New Log Settings dialog box that opens, enter a name for the group of settings and click OK.
  4. When the dialog box opens with the name you entered in step 3, select the General tab, click Add Counters, and add all the counters you want to capture.
  5. Set the interval to a reasonable amount of time. The default is to sample the data every 15 seconds, which might be too often. Every 30 seconds to a minute should be fine—much more often than that might give you an inaccurate picture of your server.
  6. Click the Log Files tab, and select a log file type of Text File (either comma delimited or tab delineated—just make a note of which one you select). If you’re logging a lot of counters to a database, some events might be missed. To change the location and base name for the incremented file, click Configure.
  7. Select the Schedule tab. To start logging immediately (or at a specified time), select At in the Start log section and enter the time to start. In the Stop log section, you can opt to stop the logging manually (meaning the file will grow indefinitely), after a certain period of time (measured in seconds, minutes, hours, or days), or at a certain time. Keep in mind that if you’re logging to a file, you want to keep the file sizes manageable. I suggest setting the logging to stop after a certain period of time. Select After in the Stop log section, then select the Start a new log file checkbox, as Figure 1 in the main article shows.
  8. Click Apply, then click OK.

Discuss this Article 1

AK_Craig
on May 15, 2007
This is a bit too basic to be of much use to anyone but the most inexperienced.

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottOur Experts will show you:
• Common SQL Server
Problems
• Best Practices for T-SQL
• SQL Server Integration
Services
• Database Development

Come See Michael Otey & Tim Ford in Person!

Early Registration Now Open

From the Blogs
May 21, 2013
blog

A Common Misconception about MAXDOP

Out of the box, SQL Server is (and has been) able to take advantage of multiple processors/cores without any effort on behalf of administrators....More
May 9, 2013
blog

My ISO 8601-Compliant Signature 2

My family recently just "officially" announced that we're in the process of adopting a child from South Africa. We're quite excited, of course, but there's a ton of paperwork to do—along with the need for gobs of signatures....More
May 8, 2013
blog

Use SSIS for ETL from Hadoop

In this blog post, Mark Kromer walks you through using SSIS as a way to use ETL techniques using Microsoft's Hadoop on Windows (HDInsight) as a source using Hive connectors...More
SQL Server Pro Forums

Get answers to questions, share tips, and engage with the SQL Server community in our Forums.