Monitoring disk space on mount points

Soldato
Joined
25 Nov 2004
Posts
3,792
Hi all

Anyone have any recommendations for monitoring disk space when those disks are mounted as folders? We use Site24x7 primarily and have tried various other tools but none handle mount points very well or at all!

They are all Windows server.

Thanks!
 
Soldato
Joined
14 Apr 2014
Posts
2,585
Location
East Sussex
Can you use WMI to check them? Assuming you would need to look at the Win32_Voume objects rather than Win32_LogicalDisk (which I guess your current tool is doing).

So in Powershell you could run something like:

Code:
Get-WmiObject Win32_Volume | Format-Table Name, Label, FreeSpace, Capacity
 
Soldato
OP
Joined
25 Nov 2004
Posts
3,792
Can you use WMI to check them? Assuming you would need to look at the Win32_Voume objects rather than Win32_LogicalDisk (which I guess your current tool is doing).

So in Powershell you could run something like:

Code:
Get-WmiObject Win32_Volume | Format-Table Name, Label, FreeSpace, Capacity
Great, thanks for that! So I have this:


Get-WmiObject Win32_Volume | Format-Table Name, Label, @{Name="Capacity";Expression={$_.capacity/1GB}}, @{Name="FreeSpace";Expression={$_.freespace/1GB}} -autosize

Do you know if I could get the FreeSpace showing as a %? I have the data... I assume it must be possible.
 
Soldato
Joined
14 Apr 2014
Posts
2,585
Location
East Sussex
Great, thanks for that! So I have this:


Get-WmiObject Win32_Volume | Format-Table Name, Label, @{Name="Capacity";Expression={$_.capacity/1GB}}, @{Name="FreeSpace";Expression={$_.freespace/1GB}} -autosize

Do you know if I could get the FreeSpace showing as a %? I have the data... I assume it must be possible.
I think you'd need to script that as I dont think your going to get it from a single command, this would be a good example to start from for doing that: https://ss64.com/ps/syntax-diskspace.html
 
Associate
Joined
24 May 2011
Posts
208
I have written many vbscripts for this task monitoring disk space, DFS replica status, disk quota status etc

WMI is brilliant to gather the details and do what ever you want

I write it all to a back end database with a simple web page to display these results and script also alerts the Operations team if threshold is reached for disk space or disk quota.
 
Back
Top Bottom