Visit Our UNIX and Linux User Community


df question


 
Thread Tools Search this Thread
Operating Systems AIX df question
# 1  
Old 03-05-2012
df question

Hi,
Can anyone please explain a little about df command. I have following question:

Following example is showing % used as 4 where as total free blocks are 15.46 out of 16.00 MB blocks.
Code:
df -m /test
Filesystem MBblocks           Free         %Used         Iused           %Iused               Mounted on
/dev/lv11     16.00            15.46          4%             18                 1%                   /tmp/fger


Last edited by joeyg; 03-05-2012 at 05:48 PM.. Reason: Please wrap examples and scripts in CodeTags
# 2  
Old 03-05-2012
What's the question?
# 3  
Old 03-05-2012
Question

Are you questioning because you suspect it should only show 3%?

0.54 used of 16 total, equals 3.375%
This User Gave Thanks to joeyg For This Post:
# 4  
Old 03-05-2012
This is the first time I'm working on AIX.
Please explain the calculation of %used in this example out of tatal available blocks?
# 5  
Old 03-05-2012
'round up'
# 6  
Old 03-05-2012
Amazing that you have exactly the same figures as in the man df page.
Help - AIX 6.1 Information Center

I think we need to see figures from a live system for df -k (if the numbers don't overflow) and df -m and to know what the mount command was for this filesystem. Chances are that it will be correct and that the man df example is wrong.

Mathematically the percentage used should be:
Code:
(((Size - Used) x 100) / Size)

However I have seen differences like this caused by error accumulation in Real Arithmetic. i.e. The program was not written to use sufficient precision.


Not on AIX but I have seen a version of "df" which used 1000 as the divisor not 1024 which was scary.


Footnote: Usually this question is because the free space percentage figure is too low! Usually because the account issuing the "df" was not root. This is one of the very few times where I have seen the free space percentage too high.

Last edited by methyl; 03-05-2012 at 07:51 PM.. Reason: footnote

Previous Thread | Next Thread
Test Your Knowledge in Computers #836
Difficulty: Medium
SOAP is a data serialization specification.
True or False?

7 More Discussions You Might Find Interesting

1. Hardware

question

How to add 3 moniters to a pc set up? (2 Replies)
Discussion started by: clicstic
2 Replies

2. Shell Programming and Scripting

question about wc

Hey my friend was asking me if i knew a way to cout how many different words in a file. I told him no not off hand, but i was thinking about it, and i started to wonder also. I imagine this is probably pretty simple im just missing something, I keep confusing my self with how you would compair and... (16 Replies)
Discussion started by: yodadbl07
16 Replies

3. UNIX for Dummies Questions & Answers

Question

hallo, ik heb hier een vraagje. hoeveel gebruikers kunnen er op 1 unix systeem. hopelijk antwoorden golle nu want ik moet da vinde voor school en die leerkracht zaagt. :p groetjes eu wacht wa was mijne nick ah ja vraagje groetjes vraagje ik kan geen engels dus antwoord liever in het... (1 Reply)
Discussion started by: vraagje
1 Replies

4. UNIX for Dummies Questions & Answers

mv question

Hello if I like to move file from defined directories system to new directory that not contained any directories system structure . But I like to create the same file system structure as source directory for example : I have 2 directories: foo1 and foo2 foo1 have directories and foo2 have... (2 Replies)
Discussion started by: umen
2 Replies

5. Solaris

vi question

Im trying to edit a 113 meg file in VI and i get the error TMP FILE TOO LARGE. Does someone know how to get around this? Thanks! (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

6. Programming

Question?

what is WDFP and WE STATION? (1 Reply)
Discussion started by: billybayou
1 Replies

7. Programming

Yet Another Question

Now that I have getch() to work, I have yet another problem. BTW, thank you for answering these questions, I do ask a lot, only because I am eager to know, what is a board used for anyways :) Ok, he's the problem... #include iostream.h #include conio.h int main() { char movement; ... (2 Replies)
Discussion started by: mbolthouse
2 Replies

Featured Tech Videos