Please explain how to read df -k


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory Please explain how to read df -k
# 1  
Old 06-09-2010
Please explain how to read df -k

What I'm trying to find out is how many gb do we actually have free, how do you calculate that with the following output from the df -k command.

Code:
Filesystem    1024-blocks      Free     %Used  Iused      %Iused    Mounted on
/dev/prod001     46137344      9200468   81%    26166     1%        /usr/prod001

# 2  
Old 06-09-2010
Why don't you use df -h instead?

Last edited by dr.house; 06-09-2010 at 11:56 AM.. Reason: Crap removed (to avoid confusion)
# 3  
Old 06-09-2010
Hi.

Looks like you 8.77 GB free (9200468 / 1024 / 1024) from 44 GB (46137344 KB)
# 4  
Old 06-09-2010
Like so?
Code:
df -k /dev/prod001 | awk 'NR>1 {print $2/1024/1024}'

# 5  
Old 06-09-2010
Quote:
Originally Posted by pseudocoder
Like so?
Code:
df -k /dev/prod001 | awk 'NR>1 {print $2/1024/1024}'

$3, but yes, like that Smilie
# 6  
Old 06-09-2010
Thanks alot, so can someone explain to me why a senior admin once told me that roughly adding 2 million units = 1 gb, and that is the number I should add to the units field to add space. Also how do I add more to the original number of 44gb or add space to the overall size? I guess what I'm asking is what is my limit, where do I see that?

Code:
         Change / Show Characteristics of a Journaled File System

Type or select values in entry fields.
Press Enter AFTER making all desired changes.
  
[TOP]                                                   [Entry Fields]        
  File system name                                    /usr/prod001            
  NEW mount point                                    [/usr/prod001]           
  SIZE of file system
          Unit Size                                   512bytes               +
          Number of units                            [92274688]               #
  Mount GROUP                                        []
  Mount AUTOMATICALLY at system restart?              yes                    +
  PERMISSIONS                                         read/write             +
  Mount OPTIONS                                      []                      +
  Start Disk Accounting?                              no                     +
  Fragment Size (bytes)                               4096                    
  Number of bytes per inode                           4096                    
  Compression algorithm                               no

# 7  
Old 06-15-2010
Hi.

Adding 2 million units would be approx. 1 GB because each unit it 512 bytes (0.5K).

Code:
> bc
scale=3
2000000*0.5               # 2 Million x 0.5 (i.e. divided by 2)
1000000.0                 # 1 Million KB
1000000 / 1024 ^ 2        #
.953                      # 0.953 GB

To add more space to the filesystem, first check if you have any free partitions in the VG and use chfs (and chlv if required) to grow the filesystem, otherwise a) shrink other filesystems in the VG to create free space; or extend the VG with another LUN.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

anyone can explain this?

why the case 2 will happen ? , ' should stop the history substitution ,shouldn't it? case 1 # echo "123"|sed '/123/!d' 123 case 2 # echo "123 > 456 > 1 > "|sed '/123/!d' -bash: !d': event not found case 3 # echo "123 > 456 > 12 > "|sed '/123/'\!d 123 # bash --version (1 Reply)
Discussion started by: justlooks
1 Replies

2. Homework & Coursework Questions

Could anyone help explain this?

1. The problem statement, all variables and given/known data: I have a retake assignment to complete for my computer networks and OS class. This isn't really my area, had I known last year I could have swapped it for a different module I would have done so. I'm determined to get through it... (6 Replies)
Discussion started by: Squall Moogle
6 Replies

3. Shell Programming and Scripting

can any one explain this example

hi all i have an example i want one help me to understand cause i tried to test it but almost fail and i don't know how can i solve this problem " the main idea to read from two files and replace something from one to another " but i don't understand why it fail all time $ cat main.txt... (4 Replies)
Discussion started by: maxim42
4 Replies

4. UNIX for Dummies Questions & Answers

Please explain this

if then echo "Syntax: $0 <sid> <COLD/HOT> <DEST>" exit fi if --------------what does this mean??? echo "Syntax: $0 <sid> <COLD/HOT> <DEST>"---pls explain this as well (2 Replies)
Discussion started by: appsdba.nitin
2 Replies

5. AIX

can anyone explain this?

this is the mksys b script.... can anyone explain .. what # and 1 in if condition this is the first line of the script... it is not from middle of the script.... if then echo "Not enough parameters, need a client name for mksysb" Usage="Usage: $0 <client name>" ... (2 Replies)
Discussion started by: honeym210
2 Replies

6. Shell Programming and Scripting

please explain the below

could u please convert the below statement to shell script ---------- logdir=/smp/dyn/logfiles/cpm/pgm/pgIm $logdir = $logdir ."/pgIm${toDate}*"; ---- could u please explain the below clearly grep -i adding $logdir | grep -iv equation | awk '{print \$NF}' | sort -u | sed -e... (1 Reply)
Discussion started by: mail2sant
1 Replies

7. Shell Programming and Scripting

Please can any one explain this ${0##/}

I did not understand what is ${0##/} PGM=${0##/} TMP=/tmp/${PGM}.$$ Please explain me. (2 Replies)
Discussion started by: gadege
2 Replies

8. Shell Programming and Scripting

please explain this

zsh 4.3.4% cat file ACFCFACCACARCSHFARCVJVASTVAJFTVAJVGHBAJ zsh 4.3.4% cat file1 A C F R zsh 4.3.4% <file1 while read;do printf "%s=%d\n" "$REPLY" "${#$(<file)//}";done A=9 C=7 F=4 R=2 That was the previous post. But , can anybody can explain me in detail about this line zsh... (2 Replies)
Discussion started by: dummy_needhelp
2 Replies

9. Shell Programming and Scripting

can anyone explain this?

:start /@~/{ h s/\(.*\)@~.*$/\1/ s/@~$// s/@~/\ /g p g s/.*@~\(.*\)/\1/ } //{ N s/\n/ / b start } (2 Replies)
Discussion started by: djkane
2 Replies

10. Shell Programming and Scripting

Please explain read in a while loop

I have a script which tries to read input from a user for every value read from a file. The input file is #> more testfile TEST1 | D200 | 12345601 | | ABC company | m TEST2 | D201 | 12345602 | | ABC company | m The script test.sh is as follows while read line do read test?"Enter a... (5 Replies)
Discussion started by: jerardfjay
5 Replies
Login or Register to Ask a Question