This project is read-only.

DFS staging size & Shadow copy size

Topics: User Forum
Jun 16, 2008 at 4:05 PM

I have been asked to monitor these two things, preferable with Polymon that we are already running. I have a look through, it be missing it all together, but does anyone know how to monitor these two things using Polymon. Any help here would be greatly appreciated.

Jun 27, 2008 at 3:04 PM
I'm not sure how you would monitor the shadow copy size without writing a plugin (or possibly PowerShell script) that hooks into the shadow copy API.  Shadow copy cache is not exposed in the file system.

As for monitoring DFS staging size, that's easier.  First you need to know where the staging folder is located.  Let's assume it's in a folder called C:\Frs-Staging.  Here's how you get the amount of data in that folder from powershell:

(Get-ChildItem 'C:\Frs-Staging' -recurse | Measure-Object -property length -sum).sum

".sum" represents the total bytes used by all files and folders in that folder (recursively).

From there you assign .sum to your PowerShell counter.  Something like the below...

$Counters.Add("FRS Staging Size", (Get-ChildItem 'C:\Frs-Staging' -recurse | Measure-Object -property length -sum).sum)

or if you want MB instead of bytes....

$Counters.Add("FRS Staging Size MB", (Get-ChildItem 'C:\Frs-Staging' -recurse | Measure-Object -property length -sum).sum / 1024)

And, of course, you add in your own detection logic for the $status variable.