Output Perfmon's "Resource Monitor" Disk processes and details to a file -- Windows Server 2008

Posted on 2011-09-14
Last Modified: 2012-05-12
I am trying to output to a file the data underneath the "Disk" segment of the "Resource Overview"/"Resource Monitor" box in Performance and Reliability monitor(perfmon). To bring it up to see what I mean, simply type:
perfmon /res
or just "perfmon"
in CMD.

I've been told that the Data Collector Sets have the potential to do it, but I can't find further information on how it can do that and I can't find anything after hours of playing with it. Specifics appreciated.

Basically, I want to output to a file the list of files/processes under the "Disk" segment, along with the "File", the "Read" amount, and the "Write" amount.

Help regarding this greatly greatly appreciated.

Question by:weblocked
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
LVL 51

Expert Comment

by:Steve Bink
ID: 36545059
In Performance Monitor, navigate the Data Collector Sets tree to find the set you want to start.  Right-click and select "Properties".  The "Directory" tab is what you are looking for.

Author Comment

ID: 36545461
The "Resource Overview"/"Resource Monitor" box is not a set under the tree. The tree just has items like system performance, and system overview which is just getting general server info like disk queue. As mentioned, I want a list of files/processes and how much they are reading/writing written to a file and no existing set has this. I understand that creating a set can do this for me, but I can't identify the steps to make a set properly for this. I've only found ways to make sets to include numerical items like disk queue.

LVL 51

Expert Comment

by:Steve Bink
ID: 36546041
I'm not sure what issues you are encountering.  I create a new data collector set, add the counters, and let it run.  Once I stop it, I see the a new listing in Reports.  I view the report, and I see all the counters I selected.  The log file is saved (by default to %SYSTEMDRIVE%\Perflogs) for reference.  If you want process-specific information, look under the "Process" category when adding the counters.
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

LVL 51

Expert Comment

by:Steve Bink
ID: 36546179
OK...brief tutorial.

In Perfmon, right-click "Data Collector Sets -> User Defined" and select "New -> Data Collector Set":

 Start a new data collector
Give it a name, and select "Create manually":

 Give it a name, and use manual creation
You want to create a data log, capturing "Performance Counter" data:

 Capture Performance Counter Data
Hit "Next", and you will be asked what counters to include and the sample rate.  I set my sample rate to "1" in the example.  Click the "Add" button to add a counter:

 Click "Add" to add a counter
In the add counter dialog, select the "Process" category of counters.  Each counter type will display a list of processes under the instances box.  In the image below, I have redacted the names of my processes.  Alternatively, you can select _Total or All.  Highlight the specific process counter you want to include, select the process you want, and click the "Add" button.  The counter should appear in the big list box to the right.

 Adding a counter
At this point, you can finish configuring the new set.  After you are done adding counters, the next two screens ask where you want to save the file, and under what account the trace should run.  Once the set is saved, you will see the new set in your tree in the main perfmon window:

 The new data set, and its matching report
Highlight the new dataset in the menu tree, then click the "Start" button in the menu bar.  The trace should start collecting data.  Once you are done, hit the stop button.  There will be a delay (length depending on the amount of data) as the report is generated.  Once it is done, you can select the report from the tree and view the results.  Alternatively, you can transfer the file to another computer for analysis.

You can also schedule your data set to run at specific times, or under specific conditions, but that would be a lot more pictures.

Author Comment

ID: 36548176

I've done this. And, assuming I did it correctly, the result is a line graph of the counter. I want a list of processes like this:
Image -- File -- Read B/min -- Write B/min

In any sort of format, I don't care about the format. But it seems like these counters are giving me stats on the processes all together, instead of individual processes.

What I want is the data shown under "Disk" on the bottom right of this screenshot:

 resources -- disk
Except in a file.

LVL 51

Expert Comment

by:Steve Bink
ID: 36551296
The procedure I outlined above will give you the report, as drawn from the file.  Look in the directory you specified during the collector set creation to find the file.

Author Comment

ID: 36551548
Hello routinet,

I see what you mean. When I switch the output type to comma delimited, I can get a text file out of it.

However, the output does not output to me the file name they are reading/writing to when I choose the disk IO items under Process. That is the most important part to me, because, for example,  I have a few hundred processes called w3wp, if I don't know what they are writing/reading to/from then its useless for me.

I hope you see what I mean and have a solution.
LVL 51

Accepted Solution

Steve Bink earned 500 total points
ID: 36551739
All IIS worker processes are under w3wp, and you'll need to manually map them back to their PID per site.  In IIS6, there is a utility called iisapp.vbs that maps for you and prints to stdout.  I'm not sure if something like that exists in IIS7, or even if it would be necessary.  The information you want may be exposed in the metabase, or through the MMC.

If you want the filename each process is accessing, perfmon might not be what you need.  You might want to take a look at procmon instead.  

Author Closing Comment

ID: 36559059
Well, then I guess the answer is that its not possible directly via the perfmon events. I'll look into other options. Thanks so far.

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question