How to save Perfmon data using Windows 7 performance monitor
There is a great deal of performance data to sort through in Windows 7, but the performance monitor uses data collector sets to allow you to view and analyze collected data.
Solutions provider takeaway: The performance monitor in Windows 7 can help ease the process of monitoring Windows 7 performance data. Using data collector sets from Windows 7 Performance Monitor, you can now view data and configure how it is archived.
Working with the Performance Monitor
About the book
This chapter excerpt on Managing and Monitoring Windows 7 (download PDF) is taken from the book Using Microsoft Windows 7. The Windows 7 advice and troubleshooting tips in this book will help you navigate through the operating system with ease. Help your customers take advantage of Windows 7's features, tools and applications by reading through the online version of the book that includes video, screencast tutorials and podcasts.
For many years, the Performance Monitor tool stood alone. In Vista, it was combined with the Resource Monitor and the Reliability Monitor. It was also given a new structure for collecting data. The Performance Monitor can show you performance data in either real-time or from a log file. Data Collector Sets can be set to run immediately or on a schedule to collect and analyze specific aspects of your system.
Monitoring Tools, Performance Monitor (see Figure 11.6) displays a visual representation of your system so you can inspect a variety of components, beyond what the Resource Monitor shows you. Initially, you won't see more than the % Process Time. You can add more performance metrics (called counters) by hitting the + sign.
When you first see the number of possible counters and instances, the task of choosing which items to monitor can seem overwhelming. There are roughly 100 different Performance objects for any given system (you can monitor the local system or a remote one). Each of those objects contains counters. (There are way too many counters to know them all.) Once you have all your counters set up, you can make changes to the way they are displayed. For example, you can change the line colors for each counter to make it easier to determine which line you are watching. You can change the format of the display to a graph, a histogram, or a report (numeric display).
Data Collector Sets allow you to use System-defined sets (there is one for System Diagnostics and one for System Performance) or User-defined sets (which is empty to start with, you literally have to create your own). You can also look at Event Trace Sessions and Startup Event Trace Sessions.
The goal is to use Data Collector Sets to collect the data and then the Report sections to view the data collected. As shown in Figure 11.6, we ran a System Diagnostics report and then viewed the results in the Reports section.
Figure 11.6 Real-time Performance Monitor.
Configuring the Performance Monitor to Display Results As a Web Page
The following steps show you how to open the Windows 7 Performance Monitor and configure it to save performance results for viewing in a in a web browser.
- Click the Start orb.
- In the Search box, type perfmon.exe.
- Click Performance Monitor.
- If a UAC window opens, click Yes.
- In the left pane, click Performance Monitor.
- Right-click in the Performance Monitor display area and click Save Settings As.
- Choose where you want to save the file.
- Type a name for HTML file.
- Click OK.
- Navigate to the saved HTML file and open it. It will display captured performance information in your browser.
As an admin, you would find it both time-consuming and monotonous to have to physically be at every computer to run Windows 7 Performance Monitor. Fortunately, network administrators or those with administrator rights can now remotely gain access to this feature and connect.
Connecting to a Remote Computer with Performance Monitor
The following steps show you how to connect Performance Monitor to another computer on the network. To complete these steps, you will need a working network connection and a connection to another computer on the network.
- Click the Start orb.
- In the Search box, type perfmon.exe.
- Click Performance Monitor.
- If a UAC window opens, click Yes.
- In the left pane, click Performance Monitor.
- On the top menu, click Action and then choose Click Connect to Another Computer.
- If you know the name of the computer you want to monitor, type that name; if you don't know the name, click Browse to locate it.
- Click OK.
There are two requirements to viewing performance counters from a remote computer. First, the Performance Logs and Alerts firewall exception must be enabled on the remote computer. Second, users in the Performance Log Users group must also be listed inthe Event Log Readers group on the remote computer.
Creating Data Collector Sets from Performance Monitor
The following steps show you how to save perfmon data. You will have the opportunity to configure settings to complete this task.
- Click the Start orb.
- In the Search box, type perfmon.exe.
- Click Performance Monitor.
- If a UAC window opens, click Yes.
- In the left pane, click Performance Monitor.
- Click New and then click Data Collector Set. The New Data Collector Set Wizard opens.
- Type a Name for this data set.
- Click Next.
- Select a Root Directory for your saved data. Do not enter a back slash at the end of the directory name.
- Click Next to define a user for the Data Collector Set to run as, or click Finish to save the current settings and exit.
After you click Finish and return to the Windows Performance Monitor, there are a few things you can do with this saved perfmon data (as you will learn in the following section).
Editing the Properties of a Created Data Collector Set
The following steps build on the previous steps and show you how to modify the properties of a Data Collector Set.
- Click the Start orb.
- In the Search box, type perfmon.exe.
- Click Performance Monitor.
- If a UAC window opens, click Yes.
- In the left pane, click User Defined to expand it.
- Click User Defined.
- Right-click the data collection set for which you would like to modify the properties and choose Properties.
- After completing your modifications, click OK.
To start the Data Collector Set immediately, right-click it and choose Start.
After you have set up your data collectors, you can save the data in the form of logs that you can review later.
Not all log files are created equal. If you create a log file in Windows 7, it is not backward compatibility with earlier versions of Windows. However, log files created in earlier versions are viewable in Windows 7.
Setting Up a Log Schedule for a Data Collector Set
The following steps show you how to create a log schedule for a Data Collector set.
- Click the Start orb.
- In the Search box, type perfmon.exe.
- Click Performance Monitor.
- If a UAC window opens, click Yes.
- Click Data Collector Sets.
- Double-click User Defined.
- In the console pane, right-click the name of the Data Collector Set that you want to schedule and choose Properties.
- Click the Schedule tab and click Add.
- Using the drop-down arrows, configure the Beginning Date, Expiration Date, and the Start Time (under Launch).
- Click OK.
- Click the Stop Condition tab.
- Select the Overall Duration checkbox.
- Select the Stop When All Data Collectors Have Finished checkbox. (This permits the data collector to complete recording the most recent values before the Data Collector Set is stopped.)
- Click OK.
You can also configure how your data is archived. If you log reports on a daily basis, log files will generate automatically and start to consume disk space. You can define preset limits and actions to take with these files.
Configuring Data Collector Sets to Delete the Oldest Log File When Starting Data Collection
The following steps show you how to configure Data Collector Sets to delete the oldest log file when starting data collection.
- Click the Start orb.
- In the Search box, type perfmon.exe.
- Click Performance Monitor.
- If a UAC window opens, click Yes.
- Click Data Collector Sets.
- Double-click User Defined.
- In the console pane, right-click the name of the Data Collector Set that you want to schedule and choose Data Manager.
- Select the Maximum Folders checkbox.
- In the drop down below, choose 5.
- Change the Resource policy to Delete Oldest.
- Select the Apply Policy Before the Data Collector Set Starts checkbox.
- Click Apply.
- Click OK.
More on Windows 7 performance
Guide to Windows 7 performance monitoring tools and features
Tools to monitor performance in Windows 7
Improving application performance in Windows 7
In the previous example, with the Maximum Folders checkbox selected, previous data will be deleted when the limit is reached. And since the Apply Policy Before the Data Collector Set Starts checkbox was chosen as well, previous data will be deleted before the Data Collector Set creates its next log file.
It's a good idea to know your Resource policy (Delete Oldest or Delete Largest) before making other data choices on the Data Manager tab. Minimum Free Disk Space, Maximum Folders, and Maximum Root Path all revolve around your policy. Here are some other points to understand when working with these features:
- Minimum Free Disk: This is the disk space that needs to be available on the drive where you store the log data. When you choose this, previous data will be deleted when the limit is reached.
- Maximum Folders: This is the maximum total of subfolders that can be in the Data Collector Set data directory. Like the Minimum Free Disk Space option, previous data will be deleted when the limit is reached.
- Maximum Root Path Size: This represents the total size (including subfolders) of the data directory for the Data Collector Set. Be advised that choosing this option causes your Minimum free disk and Maximum Folders limits to be overridden and previous data will be deleted when the limit is reached.
Unless you have a trained eye or have spent some time reading reports, you might not understand the results of the data you have collected. To help with this, Windows 7 Performance Monitor provides assistance diagnosing your reports. These reports are easy to understand and contain a wealth of data that helps you pinpoint potential problems (see Figure 11.7).
Figure 11.7 Viewing a System Diagnostics report in Performance Monitor.
Enabling and Viewing a System Diagnostics Report on a Data Collection Log
The following steps show you how to enable and view a System Diagnostics report on a data collection log. The steps below show you exactly how this is accomplished.
- Click the Start orb.
- In the Search box, type perfmon.exe.
- Click Performance Monitor.
- If a UAC window opens, click Yes.
- Click Data Collector Sets.
- Double-click System.
- Right-click System Diagnostics and choose Start.
- The next time your data collection starts and finishes, a diagnostic report is available. View it by double-clicking Reports.
- In the left pane, double-click System.
- Click System Diagnostics.
- Reports will show up in the view pane. Identify the report you would like to view and double-click it. A System Diagnostic report opens.
- To view details on items, click the Down arrows to access the data collected and reported on.
One simple method to run the diagnostic test is to open a command prompt (elevated or non-elevated—if it is non-elevated, it will ask you for permission to proceed) and then type perfmon /report. If you wanted to run a different Data Collector Set, you could type perfmon /report "Name of Data Collector Set" to start it.
Managing and Monitoring Windows 7
Using the reliability and resource monitor in Windows 7
Using Windows 7 performance monitor to view data
Windows task manager: Viewing Windows 7 processes and applications
Using system properties to configure Windows 7 options
Printed with permission from Que Publishing. Copyright 2010. Using Microsoft Windows 7 by J. Peter Bruzzese. For more information about this title and other similar books, please visit http://www.quepublishing.com.
About the author
J. Peter Bruzzese is a network specialist with eight years of experience in the information technology sector. Bruzzese helped form Clip Training LLC, which offers a variety of mini clips on topics from Windows operating systems to server applications.