[CentOS] df to get total disk usage on all filesystems?
Spiro Harvey, Knossos Networks Ltd
spiro at knossos.net.nz
Mon Aug 11 21:49:25 UTC 2008
Sean Carolan wrote:
> Is there a flag for the df command to get the total disk space used on
> all filesystems as one number? I have a server with a lot of mounted
> shares. I'm looking for a simple way to measure rate of data growth
> across all shares as one total value.
You've had a few replies as to the actual command(s) to use to achieve
this, but what about looking at it from a different perspective?
Is having one number useful for different data volumes? If one is a SQL
database that remains static, and another is a shared disk used by the
marketing department and its usage changes by gigs a week, then you're
not really able to judge when a particular disk is going to need more
capacity. One overall number has very limited use.
Of course maybe that really is what you're after, in which case all this
is redundant.. :)
But another way to measure usage would be to feed the data daily (or
weekly, or hourly, or whatever) into something like RRD Tool. Then it
will come up with some pretty graphs of usage per disk. Then you can
also calculate the total as well as another field, but I believe that
separate data volumes warrant measuring separately.
RRD Tool can be a bit complex to talk to directly, but if you use
something like Cacti (http://www.cacti.net/), then I think you will get
more value out of your data. I've never used Cacti myself, but it looks
like a very nice package. And it makes talking to RRD Tool much easier.
That and you can produce lots of pretty graphs for management that prove
you need upgrades and more imortantly, *where*. :)
--
Spiro Harvey Knossos Networks Ltd
021-295-1923 www.knossos.net.nz
More information about the CentOS
mailing list