Best way to check disk space on multiple servers
#1
Guest
Posts: n/a
Best way to check disk space on multiple servers
If I have 100 servers I need to check free disk space on what is the quickest/easiest way?
Scripting (which i'm no good at) or is there software that will do it? Just thought of 'tree size' but can it take a list of names and add them and display the results?
Scripting (which i'm no good at) or is there software that will do it? Just thought of 'tree size' but can it take a list of names and add them and display the results?
#2
There's a PowerShell script here:
Check disk space with Powershell | youdidwhatwithtsql.com
Takes the servers from a TXT, outputs to screen and CSV
Check disk space with Powershell | youdidwhatwithtsql.com
Takes the servers from a TXT, outputs to screen and CSV
#3
If you ran something like this whilst logged on with an admin account which is the same across all servers it should do the trick
FREE Disks Monitoring Software :: monitor all disks in your Windows network, no trial period, no limits | Free software and tools for Windows 2003 XP 2000 NT
or this
http://4sysops.com/archives/netwrix-disk-space-monitor/
FREE Disks Monitoring Software :: monitor all disks in your Windows network, no trial period, no limits | Free software and tools for Windows 2003 XP 2000 NT
or this
http://4sysops.com/archives/netwrix-disk-space-monitor/
Last edited by LostUser; 25 August 2009 at 05:00 PM.
#5
Guest
Posts: n/a
Thanks for the replies. The script will be an issue as I can't go running a script I got off the net on the network or they will have my ***** on a plate and the scripter in the team is on 2 weeks leave or I could have got him to do a script or check that one.
HHxx yes but don't have access to it any more and probably all changed, was a script outputting to an excel sheet years ago. We are a projects team now, the BAU stuff got handed over to near shoring in NI 2 years ago and so we aren't in the loop with BAU stuff any more. We've got insight so will go and have a look at that but didn't think I could put a list into that and would still be a manual check of one server at a time?
HHxx yes but don't have access to it any more and probably all changed, was a script outputting to an excel sheet years ago. We are a projects team now, the BAU stuff got handed over to near shoring in NI 2 years ago and so we aren't in the loop with BAU stuff any more. We've got insight so will go and have a look at that but didn't think I could put a list into that and would still be a manual check of one server at a time?
#6
By Insight Manager I mean the centralised collector. Think it is called Systems Insight Manager now. It's where the traps are sent to from HP boxes, normally.
If you can't just run scripts nilly *****. How about using the examples on the msdn site for WMI using vbscripts? Feel safer using scripts from MS? (Maybe..)
Or if you know the public snmp string, interrogate the server's OID's?
Build a nice select statement to get the data form your monitoring server's db?
Sorry, I'm reeling off my thought process Hopefully something helps you find a solution
H
If you can't just run scripts nilly *****. How about using the examples on the msdn site for WMI using vbscripts? Feel safer using scripts from MS? (Maybe..)
Or if you know the public snmp string, interrogate the server's OID's?
Build a nice select statement to get the data form your monitoring server's db?
Sorry, I'm reeling off my thought process Hopefully something helps you find a solution
H
#7
I've only dabbled in PowerShell (for Exchange 2007 tasks), but it's not that hard to see what the script I linked too is doing...
Code:
# Issue warning if % free disk space is less $percentWarning = 15; # Get server list $servers = Get-Content "$Env:USERPROFILE\serverlist.txt"; $datetime = Get-Date -Format "yyyyMMddHHmmss"; # Add headers to log file Add-Content "$Env:USERPROFILE\server disks $datetime.txt" "server,deviceID,size,freespace,percentFree"; foreach($server in $servers) { # Get fixed drive info $disks = Get-WmiObject -ComputerName $server -Class Win32_LogicalDisk -Filter "DriveType = 3"; foreach($disk in $disks) { $deviceID = $disk.DeviceID; [float]$size = $disk.Size; [float]$freespace = $disk.FreeSpace; $percentFree = [Math]::Round(($freespace / $size) * 100, 2); $sizeGB = [Math]::Round($size / 1073741824, 2); $freeSpaceGB = [Math]::Round($freespace / 1073741824, 2); $colour = "Green"; if($percentFree -lt $percentWarning) { $colour = "Red"; } Write-Host -ForegroundColor $colour "$server $deviceID percentage free space = $percentFree"; Add-Content "$Env:USERPROFILE\server disks $datetime.txt" "$server,$deviceID,$sizeGB,$freeSpaceGB,$percentFree"; } }
Trending Topics
#8
Guest
Posts: n/a
Thanks for the help, I decided to use powershell and be done with and read up on it here as never used it before
Running Windows PowerShell Scripts
Worked a treat
Running Windows PowerShell Scripts
Worked a treat
Thread
Thread Starter
Forum
Replies
Last Post
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
28 December 2015 11:07 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
18 November 2015 07:03 AM