Operating System - HP-UX
1849521 Members
7058 Online
104044 Solutions
New Discussion

How bdf calculates used percentage?

 
SOLVED
Go to solution

How bdf calculates used percentage?

Hello,

Can anybody tell me how bdf command calculates percentage of used disk space?

thanx
4 REPLIES 4
Bill McNAMARA_1
Honored Contributor

Re: How bdf calculates used percentage?

I believe it's from the superblock that is loaded when file system is mounted.

Bill
It works for me (tm)
James R. Ferguson
Acclaimed Contributor

Re: How bdf calculates used percentage?

Hi:

From the man page for 'bdf':

/begin_quote/

The bdf command does not account for any disk space reserved for swap space, or used for the HFS boot block (8 KB, 1 per file system), HFS superblocks (8 KB each, 1 per disk cylinder), HFS cylinder group blocks (1 KB - 8 KB each, 1 per cylinder group), and inodes (currently 128 bytes reserved for each inode). Non-HFS file systems may have other items not accounted for by this command.

/end_quote/

...JRF...
federico_3
Honored Contributor
Solution

Re: How bdf calculates used percentage?


keep in mind that a part of total kbytes are used for the minfree area ( this area is reserved to mantain performance ) . To see what is the total allocated space use:
df -kt /FS
the difference between the kbites you see from bdf /FS and the total allocated Kb is the minfree.
To calculate the percentage do:
used allocated space / total allocated space * 100
Vincenzo Restuccia
Honored Contributor

Re: How bdf calculates used percentage?

You can use df (1M) or bdf (1M) to list all mounted file systems and the amount of free disk space on each.

When using df, the output shows the number of available file system inodes. Note that by dividing the number of 512-byte blocks shown from df by two, you can get the available space in kilobytes, as is reported by bdf.