Windows: How can I see disk space used over time?

11

5

I'm looking for a way to capture and visualize used disk space over time. All I need is one number-- bytes used on disk. I store a lot of photos on my computer, so I need a way to estimate when I'll need more hard drive space. If there's a way to capture used disk space with hourly resolution that would be great, but even daily resolution is fine. I don't even need a visualization of the data; as long as the data is easily exportable to Excel, I can create my own graph and extrapolate.

I've seen many disk space visualization programs like WinDirStat and TreeSizeFree, but they don't have a way to automate capturing disk space usage over time.

Patrick

Posted 2014-05-05T03:00:09.780

Reputation: 351

I supposed you could set something using Performance Monitor which is built into Windows http://blogs.technet.com/b/askcore/archive/2012/03/16/windows-performance-monitor-disk-counters-explained.aspx

– Matthew Lock – 2014-05-05T03:16:05.230

Thanks @Matthew Lock. It looks like Performance Monitor only shows the last minute in the view. I need something that can track years. Do you know if there's a way to do that using Performance Monitor? – Patrick – 2014-05-05T04:24:25.383

You can change the sampling time here: http://i.imgur.com/ganlFBW.png I haven't actually tried years in practice, but it seems to work.

– Matthew Lock – 2014-05-05T05:54:07.300

Answers

11

You can see used disk space over time with Windows Performance Monitor (perfmon) to the MB with down to one second resolution. This tool comes built into the latest versions of Windows so you don't even need to download another program to see the data. It doesn't show any previous data so you'll only see disk space data from when you set it up. I only needed hourly data points but I tested with updates every one second and it worked fine.

Perfmon allows you to output how much free disk space you have as values to a file that are comma-separated (can be opened in Excel), tab-separated (what Excel usually uses), or binary. Using the binary output, you can visualize the data in the perfmon itself. Using one of the other output types allows you to make your own graphs of the data in Excel.

Here's a step-by-step guide on how to set this up:

  1. Open Windows Performance Monitor (Win-R -> type "perfmon.exe" -> Enter)
  2. In the left-most pane, double click Data Collector Sets. Right click User Defined -> New -> Data Collector Set.
  3. Enter a name for your set, something like "Disk Space Free". Click the radio button Create manually (Advanced), click Next.
  4. Check Performance counter, click Next
  5. Click Add...
  6. Scroll until you see LogicalDisk and click the down arrow next to it. Scroll down a little and click Free Megabytes (you can also select % Free Space if desired). Now in the box below titled Instance of selected object: click C: and then below that Add >>. That counter should now show up in the right pane titled Added counters. Click OK.
  7. Set the Sample Interval to however often you'd like to have the data collected. Like I mentioned, I wanted to see hourly data points. So, I put 1 in Sample Interval and changed Units to Hours. Click Next.
  8. Select the location you'd like your logs to be located in. Click Finish.
  9. Double click User Defined in the left panel and click the data collector set you just created (the example name was "Disk Space Free").
  10. The data collector set you just created should show up in the right panel. Right click it -> Properties.
  11. Under Log format you can select the type you prefer according the explanation in the paragraph above. Click OK.

If you selected binary, you can view the data by clicking Reports -> User Defined -> Disk Space Free in the left pane, then double clicking the item in the right pane.

If you chose comma-separated or tab-separated, you can view you data at the location you specified in step 8.

Patrick

Posted 2014-05-05T03:00:09.780

Reputation: 351

1This should be marked as the right answer – Wadih M. – 2019-03-31T03:03:53.347

1@WadihM. you're right. As per the StackExchange descriptions I should upvote Matthew's answer ("this answer is useful") and select mine as the correct answer. I've gone ahead and done so. – Patrick – 2019-04-08T22:26:42.173

1

Matthew Lock

Posted 2014-05-05T03:00:09.780

Reputation: 4 254

1

As a highly valued Super User, I encourage you to revisit this answer and add more detail. As you may know, hyperlinks alone point toward an answer without actually being one. Please [edit] your answer so that it includes the essential elements from the links.

– I say Reinstate Monica – 2018-06-12T16:21:44.747

@Patrick Please set your answer as the correct one – Wadih M. – 2019-04-07T03:37:31.177

2Thanks for these links. I was hoping there was a way to do it through a program. I ended up using your first suggestion. After diving into Window Performance Monitor a little more, I discovered how to set up a user-defined data collector set and see data through the report feature. I'm accepting your answer because you deserve the credit for pointing me to the right answer in your comment. But, I'm also going to add my own for anyone who wants to accomplish this without scripting. – Patrick – 2014-05-05T06:45:19.513