[CentOS] df to get total disk usage on all filesystems?

Thu Aug 14 17:09:23 UTC 2008
MHR <mhullrich at gmail.com>

On Thu, Aug 14, 2008 at 3:50 AM, Stephen Harris <lists at spuddy.org> wrote:
> On Thu, Aug 14, 2008 at 01:12:58AM -0700, MHR wrote:
>> On Wed, Aug 13, 2008 at 8:56 PM, Lunix1618 <lunix1618 at gmail.com> wrote:
>> > [root at centos-svr ~]# df -kPl
>> > Filesystem         1024-blocks      Used Available Capacity Mounted on
>> > /dev/mapper/VolGroup00-LogVol00 274405432  18584656 241656808       8% /
>> > /dev/sda2               101105     19096     76788      20% /boot
>> > tmpfs                  1682508         0   1682508       0% /dev/shm
>> >
>> > and with the command of Stephen :
>> > [root at centos-svr ~]# df -Pkl | awk '/^\/dev\// { avail += $3/1024 } END { printf("%d Mb used\n",avail)} '
>> > 18173 Mb used
>
>> Well, I get 18167, but that's not too far off.
>
> And, remember, that the output of "df" might have changed in between
> times you ran "df" and you ran the "awk" command; there's only 7Mbytes
> difference.  Did someone delete a 7Mbyte file?  Send email?  Finish a
> print job?  Or... could be plenty of reasons for the used amount to
> go down.
>

Clarification - I just took the numbers above and used a calculator -
my system would never produce numbers anything like that for any of my
machines....

mhr