bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: issue: fileutils (df)


From: Bob Proulx
Subject: Re: issue: fileutils (df)
Date: Thu, 29 Nov 2001 21:51:30 -0700

> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/hda1              2355984    773656   1462648 35% /
> /dev/hda3               409636    238128    171508 59% /root
> /dev/hda2              3373540   2415692    957848 72% /usr
> 
> , but then if you enter 'df -m' you get the following
> output:
> 
> Filesystem           1M-blocks      Used Available Use% Mounted on
> /dev/hda1                 2301       756      1428 35% /
> /dev/hda3                  400       233       167 59% /root
> /dev/hda2                 3294      2360       935 72% /usr
> 
> , which is clearly not equivalent to the previous one
> even when assuming rounding numbers.

I don't see the problem you are trying to point out.  Things look fine
to me.

  echo 2355984/1024 | bc -l
  2300.76562500000000000000

And so on.

> Also, looking, for example, at the first output (data)
> line of the former output:
> 
> /dev/hda1              2355984    773656   1462648 35% /
> 
> , we get the result of 35% usage for that partition. 
> But if we divide, the total number of blocks used by
> the total number of blocks available we end up with:
> 
> 773656/2355984 = 32.83% ~ 33%
> 
> If instead we use the latter output, we end up with:
> 
> 756000/2301000 = 32.86% ~ 33%
> 
> Clearly neither one of them gives the 35% utilization
> as shown in the output.

df reports the space used and available.  But those two will not
normally add up to the number-of-blocks because the filesystem minfree
value will take some of the available space.  It appears that you have
a 2% minfree value specified when you created your filesystem.

A previous answer to this question is available here:

  http://mail.gnu.org/pipermail/bug-fileutils/2000-September/000030.html

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]