Checking Disk Space on Multiple Servers
#1
Scooby Regular
Thread Starter
I have to check the available disk space on all our NT Servers every Week, and i can't be bothered walking round 30 servers, checking the properties on each one, plus load of them don't have monitors attached [img]images/smilies/mad.gif[/img]
There must be a utility that can check the drives in each server and report the free disk space for each one, does anyone know of one?
Thanks
Andy
There must be a utility that can check the drives in each server and report the free disk space for each one, does anyone know of one?
Thanks
Andy
#3
Scooby Regular
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like
on
1 Post
Const HARD_DISK = 3
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colDisks = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk Where DriveType = " & HARD_DISK & "")
For Each objDisk in colDisks
Wscript.Echo "Computer Name: "& vbTab & vbTab & strComputer
Wscript.Echo "DeviceID: "& vbTab & vbTab & objDisk.DeviceID
Wscript.Echo "Free Disk Space: "& vbTab & objDisk.FreeSpace
Next
write a routine to read list of servers from a file and then run that for each server and output to excel or txt file
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colDisks = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk Where DriveType = " & HARD_DISK & "")
For Each objDisk in colDisks
Wscript.Echo "Computer Name: "& vbTab & vbTab & strComputer
Wscript.Echo "DeviceID: "& vbTab & vbTab & objDisk.DeviceID
Wscript.Echo "Free Disk Space: "& vbTab & objDisk.FreeSpace
Next
write a routine to read list of servers from a file and then run that for each server and output to excel or txt file
#4
Scooby Regular
Thread Starter
Lost me with the VB There david
Means nothing to me really
I've got a few disks in each server too ...
Is there an easy way to list all the servers on my domain rather than type them all out>?
[Edited by Avi - 6/26/2003 2:48:18 PM]
Means nothing to me really
I've got a few disks in each server too ...
Is there an easy way to list all the servers on my domain rather than type them all out>?
[Edited by Avi - 6/26/2003 2:48:18 PM]
#6
Scooby Regular
#7
Scooby Regular
Join Date: Sep 2002
Location: Essexville
Posts: 4,391
Likes: 0
Received 0 Likes
on
0 Posts
Trending Topics
#8
Scooby Regular
Thread Starter
I've got dameware NT utilities, but i would still have to go through each server wouldn't i. I'm very lazy
in an ideal world what i'm after is something that will report every week in a txt or excel file or something, with a list of servers and their drives, and how much disk space free they have.
This would produce my ideal workload of nothing .. am i asking for the moon on a stick ??
Andy
in an ideal world what i'm after is something that will report every week in a txt or excel file or something, with a list of servers and their drives, and how much disk space free they have.
This would produce my ideal workload of nothing .. am i asking for the moon on a stick ??
Andy
#12
Scooby Regular
iTrader: (5)
Join Date: Mar 2001
Location: Cheshire
Posts: 2,895
Likes: 0
Received 0 Likes
on
0 Posts
Srvinfo reskit tool????
Useful little tool that you can launch from a command prompt on your machine as it accepts unc paths!!!
Sample output for you from one of our servers here: (Lists things like free disk space as well.You could be clever and pipe it out to Excel etc)
Server Name: nemesis
Security: Users
NT Type: NT Advanced Server
Version: 4.0
Build: 1381, Service Pack 6a
Current Type: Multiprocessor Free
Registered Owner:
Registered Organization:
ProductID: *****************
Original Install Date: Wed Apr 01 23:18:43 1998
Domain: JUPITER
PDC: \\SATORI
IP Address: 150.***.***.***
CPU[0]: x86 Family 6 Model 3 Stepping 3: 299 MHz
CPU[1]: x86 Family 6 Model 3 Stepping 4: 299 MHz
Hotfixes:
[Q147222]:
Drive: [FileSys] [ Size ] [ Free ] [ Used ]
C$ NTFS 1028 257 771
D$ NTFS 22528 74 22454
E$ NTFS 4096 3256 840
F$ NTFS 500 475 25
G$ NTFS 7603 2123 5480
Services:
[Running] Autodesk License Manager
[Running] Alerter
[Running] ARCserve Discovery Service
[Running] pcANYWHERE Host Service
[Running] Computer Browser
[Running] Client Agent for ARCserve
[Stopped] ClipBook Server
[Stopped] DHCP Client
[Running] Diskeeper
[Running] DameWare Mini Remote Control
[Running] EventLog
[Running] Server
[Running] Workstation
[Running] Tivoli Endpoint
[Stopped] License Logging Service
[Running] TCP/IP NetBIOS Helper
[Running] Event Log Watch
[Running] TCP/IP Print Server
[Running] Messenger
[Stopped] Windows Installer
[Stopped] Network DDE
[Stopped] Network DDE DSDM
[Running] Net Logon
[Stopped] Network Monitor Agent
[Stopped] NT LM Security Support Provider
[Running] CA Backup Agent for Open Files Service
[Stopped] DOCS Open File Security
[Running] Plug and Play
[Running] Protected Storage
[Running] Remote Command Service
[Running] Directory Replicator
[Running] Remote Procedure Call (RPC) Locator
[Running] Remote Procedure Call (RPC) Service
[Stopped] Schedule
[Running] Simple TCP/IP Services
[Running] SNMP
[Stopped] SNMP Trap Service
[Running] Spooler
[Stopped] Telephony Service
[Stopped] UPS
[Running] Windows Management Instrumentation
[Stopped] Windows Internet Name Service
[Running] VNC Server
Network Card [0]: Netelligent 10/100 TX PCI UTP Bus 2
Protocol[0]: [NET0] WINS Client(TCP/IP) 4.0
Protocol[1]: [NET1] NetBEUI Protocol 4.0
System Up Time: 13 Days, 18 Hr, 31 Min, 45 Sec
Drop me an email if you want a copy? (Only 24kb)
Good luck
Nick
Useful little tool that you can launch from a command prompt on your machine as it accepts unc paths!!!
Sample output for you from one of our servers here: (Lists things like free disk space as well.You could be clever and pipe it out to Excel etc)
Server Name: nemesis
Security: Users
NT Type: NT Advanced Server
Version: 4.0
Build: 1381, Service Pack 6a
Current Type: Multiprocessor Free
Registered Owner:
Registered Organization:
ProductID: *****************
Original Install Date: Wed Apr 01 23:18:43 1998
Domain: JUPITER
PDC: \\SATORI
IP Address: 150.***.***.***
CPU[0]: x86 Family 6 Model 3 Stepping 3: 299 MHz
CPU[1]: x86 Family 6 Model 3 Stepping 4: 299 MHz
Hotfixes:
[Q147222]:
Drive: [FileSys] [ Size ] [ Free ] [ Used ]
C$ NTFS 1028 257 771
D$ NTFS 22528 74 22454
E$ NTFS 4096 3256 840
F$ NTFS 500 475 25
G$ NTFS 7603 2123 5480
Services:
[Running] Autodesk License Manager
[Running] Alerter
[Running] ARCserve Discovery Service
[Running] pcANYWHERE Host Service
[Running] Computer Browser
[Running] Client Agent for ARCserve
[Stopped] ClipBook Server
[Stopped] DHCP Client
[Running] Diskeeper
[Running] DameWare Mini Remote Control
[Running] EventLog
[Running] Server
[Running] Workstation
[Running] Tivoli Endpoint
[Stopped] License Logging Service
[Running] TCP/IP NetBIOS Helper
[Running] Event Log Watch
[Running] TCP/IP Print Server
[Running] Messenger
[Stopped] Windows Installer
[Stopped] Network DDE
[Stopped] Network DDE DSDM
[Running] Net Logon
[Stopped] Network Monitor Agent
[Stopped] NT LM Security Support Provider
[Running] CA Backup Agent for Open Files Service
[Stopped] DOCS Open File Security
[Running] Plug and Play
[Running] Protected Storage
[Running] Remote Command Service
[Running] Directory Replicator
[Running] Remote Procedure Call (RPC) Locator
[Running] Remote Procedure Call (RPC) Service
[Stopped] Schedule
[Running] Simple TCP/IP Services
[Running] SNMP
[Stopped] SNMP Trap Service
[Running] Spooler
[Stopped] Telephony Service
[Stopped] UPS
[Running] Windows Management Instrumentation
[Stopped] Windows Internet Name Service
[Running] VNC Server
Network Card [0]: Netelligent 10/100 TX PCI UTP Bus 2
Protocol[0]: [NET0] WINS Client(TCP/IP) 4.0
Protocol[1]: [NET1] NetBEUI Protocol 4.0
System Up Time: 13 Days, 18 Hr, 31 Min, 45 Sec
Drop me an email if you want a copy? (Only 24kb)
Good luck
Nick
#13
Scooby Regular
We have a script which emails you with a diskspace report as a scheduled task - dead handy for lazy people like me. Email me (on my work address miles.atkinson@bakerhughes.com) for a copy.
#15
An alternative route...
Get an Old PC.
Install Linux
Install Nagios
Write a very very small script to get the disk space via SNMP.
Configure "Warning" and "Critical" Thresholds.
It E-Mails you when the limits are breached.
Result : Even less work in the long run as you only need to read the mail if it says "Critical"
You could also monitor other useful stuff like CPU and Processes etc via SNMP and save yourself the bother of looking at those until you need to aswell
Deano
Get an Old PC.
Install Linux
Install Nagios
Write a very very small script to get the disk space via SNMP.
Configure "Warning" and "Critical" Thresholds.
It E-Mails you when the limits are breached.
Result : Even less work in the long run as you only need to read the mail if it says "Critical"
You could also monitor other useful stuff like CPU and Processes etc via SNMP and save yourself the bother of looking at those until you need to aswell
Deano
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