CSV disk utilization in perfmon
-
Monday, August 15, 2011 5:14 AM
I need to monitor the disk space utilization in the CSV volume that is shared between two Hyper V clusters. Which counter in perfmon will give me the % disk space used.
Ron
Ron
All Replies
-
Monday, August 15, 2011 8:50 AMModeratorYou may develop a script base on the SCOM management pack or use powershell comandlet - read this blog.
-
Monday, August 15, 2011 3:37 PM
Thanks for the blog. Was wondering if there is any other method to find that information especially thru perfmon, since we need to integrate it with our Server monitoring suite, which can easily pick up the info from perfmon.
Ron
Ron -
Friday, August 19, 2011 7:50 AMModerator
Hi,
Please check the following blog.
Monitoring CSV Free Disk Space with PRTG
http://www.yusufozturk.info/virtual-machine-manager/monitoring-csv-free-disk-space-with-prtg.html
Important Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
Vincent Hu
-
Thursday, August 25, 2011 6:30 PM
Hi,
This blog gives you a PowerShell script to monitor CSV disk space: http://blogs.msdn.com/b/clustering/archive/2010/06/19/10027366.aspx
This blog gives an overview of the CSV Perfmon counters, which are much more granular: http://blogs.msdn.com/b/clustering/archive/2009/10/02/9902218.aspx
Thanks!
Symon Perriman
Technical Evangelist
Microsoft- Proposed As Answer by Symon Perriman MSFT Thursday, August 25, 2011 6:31 PM
-
Wednesday, February 27, 2013 10:25 PM
param ( [string]$ClusterName = $(Throw "Cluster name required"), [int]$SpaceThreshold = $(Throw "Freespace alert percentage required") ) Import-Module FailoverClusters $objs = @() $alert = 0 $csvs = Get-ClusterSharedVolume -Cluster $ClusterName foreach ( $csv in $csvs ) { $csvinfos = $csv | select -Property Name -ExpandProperty SharedVolumeInfo foreach ( $csvinfo in $csvinfos ) { $obj = New-Object PSObject -Property @{ Name = $csv.Name Path = $csvinfo.FriendlyVolumeName Size = $csvinfo.Partition.Size FreeSpace = $csvinfo.Partition.FreeSpace UsedSpace = $csvinfo.Partition.UsedSpace PercentFree = $csvinfo.Partition.PercentFree } if ($obj.PercentFree -le $SpaceThreshold) {$alert++} $objs += $obj } } Write-Host "Cluster: " $ClusterName $objs | ft -auto Name,Path,@{ Label = "Size(GB)" ; Expression = { "{0:N2}" -f ($_.Size/1024/1024/1024) } },@{ Label = "FreeSpace(GB)" ; Expression = { "{0:N2}" -f ($_.FreeSpace/1024/1024/1024) } },@{ Label = "UsedSpace(GB)" ; Expression = { "{0:N2}" -f ($_.UsedSpace/1024/1024/1024) } },@{ Label = "PercentFree" ; Expression = { "{0:N2}" -f ($_.PercentFree) } } If ($alert -gt 0){Write-Host "WARNING: One or more drives have exceeded the threshold value of" $SpaceThreshold "% remaining!"} return $alertSymon - I found the script you posted on the blog to be very useful. Thank you to you and/or whoever wrote it.
I have modified the script from your blog post so it can be run from a machine that isn't the Hyper-V host, and to compare the percent free column to a parameter specified by the user. It also returns a value indicating the number of drives exceeding the specified threshold, which might be useful to integrate into some kind of scheduled process.
Hopefully this is useful for someone.
TJ

