I have about 70 servers and I need to keep an eye on their disk space usage. I don't need the information to be real time. I was thinking of running a script daily or having a scheduled task run to collect the disk information and save it to a text file or something.
What would be the best way to do this? How?
Might look like overkill at first glance, but this kind of feature is typically implemented in network monitoring systems (like Nagios) where you could define state thresholds and e-mail notifications and a bunch of other parameters to monitor as well.
I am assuming from your tags that these are Windows 2003 servers? If your experience is entirely Windows based, configuring Nagios in Linux might be a jump (I don't know the other open source monitoring systems listed by Kamil so not sure what OS they run on).
FAN (Fully Automated Nagios) might be a good option. Install it on some old hardware directly from an ISO. Has a couple of built-in popular GUI add-ons like Centreon and configuration scripts to get you started, including ones for checking disk space.
I'd second TheLQ as well, with seventy servers you need a monitoring tool, otherwise apart from disk space, how do you keep track of patches, anti-virus updates, cpu load, memory consumption and general hardware failures? Nagios can tie in easily with email alerts and (especially if your systems are quite homogeneous) you can probably get yourself to a place where you are alerted about the more common server problems as soon as they occur or even before.
Have a look into WMI. You could write a script which uses WMI to monitor the disk space but there are also several programs which can do it.
Syneticon-dj is right. You should defenetly use monitoring system.
Here are some decent open source systems:
and some commercial ones:
If you're just after simple disk monitoring and you're an all windows house you might look into Spiceworks. Its free and pretty configurable. It'd be relatively easy to clear out any monitor settings except what you want.
If you are looking only for historical disk space tracking (rather than full monitoring), you can use freespace.exe from Pathsolutions: http://www.pathsolutions.com/support/tools.asp
Will output data in several different formats (eg CSV, TSV, MRTG):
I use this tool to keep long term (ie several years) stats on all of my servers.
You can use virtually any website monitoring service for that, e. g. the free plans from pingdom or alertfox. All you need is to have a asp.net or php page on your server:
http://blog.alertfox.com/2011/01/monitoring-disk-space-and-other-status.html