Tactical Advice

Creating a Snapshot of a Computer's Configuration with Data Collector Sets in Vista

This story appears in the March 2007 issue of BizTech Magazine.

Troubleshooting problems often requires you to look at dozens of different settings, and that’s if you can even remember all of the important settings. In Windows Vista, you can use data collector sets to quickly capture a snapshot of a computer’s configuration, including the following:

  • System state
  • Registry values
  • Log files
  • Configuration files
  • Windows Management Instrumentation (WMI) management paths
  • Performance counter data
  • Event trace data

Windows Vista includes built-in data collector sets that you can use to capture information about a system’s status, or you can create your own data collector sets to capture custom settings and log files. These data collection sets can help you streamline the troubleshooting process in your organization, even if the problems relate to custom applications.

First, create the data collector set on your computer based on one of the existing templates, and add custom data collectors to gather any files or registry keys used by internal programs. Then, use the Logman tool to export the data collector set to a file. Distribute that file to the computers you manage, and run Logman again to import the file. Data collector sets never forget to check an important setting, so they can substantially increase thoroughness of troubleshooting while decreasing the time it takes to solve a problem.

Built-in Data Collector Sets

Windows Vista includes the following data collector sets:

Local Area Network Diagnostics: Use this data collector set for troubleshooting problems with wired network connections. It logs network configuration data, network performance counters, and performs network diagnostics tracing.

Wireless Diagnostics: Use this data collector set for troubleshooting problems with wireless network connections. It logs the same data as LAN Diagnostics, and adds wireless network information.

System Performance: Use this data collector set if your Windows Vista computer is having random slowdowns, unexplained paging, or short battery life. It logs processor, memory, disk, and network performance counters, and performs kernel tracing.

System Diagnostics: Use this data collector set for general hardware or software troubleshooting, including Stop errors (also known as blue screens), hardware problems, and driver failures. It logs the same data as System Performance, and adds detailed system configuration information.


Figure 1: Access data collector sets from the Computer Management console or from the Reliability And Performance console.

How to Use the Standard Data Collector Sets

To use the built-in data collector sets, follow these steps:

Click Start, right-click Computer, and then click Manage. Respond to the User Account Control prompt that appears.

In the Computer Management console, expand System Tools, Reliability And Performance, Data Collector Sets, and then System.

Right-click a data collector set and then click Start, as shown in figure 1. A green arrow appears over the data collector set’s icon, indicating that it is currently running. Eventually, the green arrow will change to an hourglass while the data is being processed.

After the data collector set has finished running (or after you right-click it and click Stop), right-click the data collector set again, and then click Latest Report.


Figure 2: Reports summarize the results found by the data collector set.

Windows Vista displays the report generated by the data collector set, as shown in figure 2.

How to Create Custom Data Collector Sets

The built-in data collector sets are perfect for troubleshooting general computer and networking problems. While they might log far more data than you really need, there is little chance that any settings or counters related to the core operating system are missing.

What the built-in data collector sets will not capture is information about your applications. Fortunately, you can create your own custom data collector set based on one of the built-in data collector sets, and extend it to capture registry settings, log files, and configuration files for the applications you troubleshoot most. To create a custom data collector set, follow these steps:

In the Computer Management console, expand System Tools, Reliability And Performance, and Data Collector Sets. Right-click User Defined, click New, and then click Data Collector Set. The Create New Data Collector Set wizard appears.

On the “How Would You Like To Create This New Data Collector Set?” page, type a name and click Next.


Figure 3: Most custom data collector sets should be based on one of the standard templates.

On the “Which Template Would You Like To Use?” page, click one of the templates. Click Finish, as shown in figure 3 (the remaining  wizard pages are not important).

By default, your custom data collector set will have all of the data collectors from the template.

Add your own ata collectors by following these steps:

In the Computer Management console, expand User Defined. Right-click your custom data collector set, click New, and then click Data Collector. The Create New Data Collector appears.

On the “What Type Of Data Collector Would You Like To Create?” page, type a name, click one of these options, and then click Next:

Performance counter data collector: Logs performance counters, such as processor or network utilization.

Event trace data collector: Stores event trace information from a Windows Vista event trace provider. Typically, you should add all event trace data collectors that might be related to a problem, because it is better to have too much information than not enough.

Configuration data collector: Stores registry keys, WMI management paths, or the system state.

Performance counter alert: Creates an alert if a performance counter reaches a threshold that you specify.

Follow the prompts that appear to create your data collector.

Configure your data collector set to automatically run at a scheduled time, to stop running after a number of minutes, or to launch a task after running by following these steps:

Right-click your custom data collector set, and then click Properties.

On the Properties dialog box, click the Schedule tab. Using this tab, you can configure your data collector set to automatically run on a scheduled basis. This is useful for proactively monitoring computers. For example, you could configure a data collector set to run daily. Then, if a user experienced a problem that started several days ago, you could look through the recorded reports to determine what may have changed.

Click the Stop Condition tab. Use this tab to configure how long the data collector set runs for.

Click the Task tab. Use this tab to configure a task to run after the data collector set. Use Task Scheduler to create a task that will run. For example, you might create a task that sends the report to you as an attachment to an e-mail message.

Click OK to close the Properties dialog box.

For example, to capture the Office 2007 configuration settings, select Configuration data collector in the Create New Data Collector wizard, and then specify the HKEY_CURRENT_USER\Software\Microsoft\Office registry key to capture all Office-related settings. Then, to capture Word’s Normal template, view the data collector’s properties, click the File Capture tab, and add the %appdata%\microsoft\templates\normal.dot path.

As with the built-in data collector sets, you can generate a report by right-clicking your custom data collector set, and then clicking Start.

Automating Data Collection Set Configuration and Capturing

Of course, you wouldn’t want to manually create a data collector set on every computer. Once you create a data collector set on one computer, use the Logman.exe command-line tool to export the data collector set to a file:

Logman export -n "Office 2007 Configuration" -xml "Office 2007 Configuration.xml"

Then, you can store the XML file on a central server and use a logon script to add the data collector set to computers with a command, such as the following:

Logman export -n "Office 2007 Configuration" -xml \\server\share\Office 2007 Configuration.xml

Lastly, you can use the “Logman update” command to replace an existing data collector set, or use “Logman start” and “Logman stop” to control data collection.

Tony Northrup is a developer, security consultant and author with more than 10 years of professional experience developing applications for Microsoft Windows.
Sign up for our e-newsletter

Security

Three Ways to Integrate Fire... |
Follow these tips to align the devices with log management and incident tracking systems.
Why Cloud Security Is More E... |
Cloud protection services enable companies to keep up with security threats while...
Securing the Internet of Thi... |
As excitement around the connected-device future grows, technology vendors seek ways to...

Storage

The New Backup Utility Proce... |
Just getting used to the Windows 8 workflow? Prepare for a change.
How to Perform Traditional W... |
With previous versions going unused, Microsoft radically reimagined the backup utility in...
5 Easy Ways to Build a Bette... |
While large enterprises have the resources of an entire IT department behind them, these...

Infrastructure Optimization

Why Cloud Security Is More E... |
Cloud protection services enable companies to keep up with security threats while...
Ensure Uptime Is in Your Dat... |
Power and cooling solutions support disaster recovery and create cost savings and...
The Value of Converged Infra... |
Improvements in security, management and efficiency are just a few of the benefits CI can...

Networking

Securing the Internet of Thi... |
As excitement around the connected-device future grows, technology vendors seek ways to...
How to Maximize WAN Bandwidt... |
Understand six common problems that plague wide area networks — and how to address them.
Linksys Makes a Comeback in... |
The networking vendor introduced several new Smart Switch products at Interop this week.

Mobile & Wireless

Now that Office for iPad Is... |
After waiting awhile for Microsoft’s productivity suite to arrive, professionals who use...
Visualization Can Help Busin... |
Companies need to put their data in formats that make it consumable anytime, anywhere.
Linksys Makes a Comeback in... |
The networking vendor introduced several new Smart Switch products at Interop this week.

Hardware & Software

New Challenges in Software M... |
IT trends such as cloud, virtualization and BYOD pose serious hurdles for software...
Visualization Can Help Busin... |
Companies need to put their data in formats that make it consumable anytime, anywhere.
The Tools That Power Busines... |
Ever-evolving analytic software can greatly improve financial institutions’ decision-...