Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

report file system usage and inode usage in one line similar to HP-UX "bdf -i"

support_billa
Valued Contributor

report file system usage and inode usage in one line similar to HP-UX "bdf -i"

Hello,

 

with following HP-UX command i can report file system usage and inode usage in one line:

 

 

bdf -i /tmp

Filesystem          kbytes    used   avail %used  iused  ifree %iuse Mounted on
/dev/vg00/lvol6    4194304 1927432 2251600   46%  12069  70811   15% /tm

 

i didn't find in Linux a similar command ? command "df" hasn't option like "bdf -i" , maybe i can use command "stat" but my test's doesn't show a similar report.

df -i /tmp
Filesystem             Inodes IUsed  IFree IUse% Mounted on
/dev/mapper/vg00-lvtmp 262144  1739 260405    1% /tmp

df  /tmp
Filesystem             1K-blocks   Used Available Use% Mounted on
/dev/mapper/vg00-lvtmp   4128448 772428   3146308  20% /tmp

 
the report should print in Linux the same informations like "bdf -i"

 

example:
Filesystem               1K-blocks  Used    Available Use%  Inodes  IUsed  IFree IUse% Mounted on
/dev/mapper/vg00-lvtmp   4128448    772428  3146308   20%   262144  1739 260405    1% /tmp

 

regards

1 REPLY
support_billa
Valued Contributor

Re: report file system usage and inode usage in one line similar to HP-UX "bdf -i"

hello,

 

i tested the useful tool : di

 

does anybody has experience with these tool ?

 

manpage : di manpage

 

when i use the example for HP-UX "bdf-i" : di -d k -f Sbuv2UFPM

i should get the same result , what i want ! but are these the right options ?

 

Examples
       Various df equivalent format strings for System V release 4 are:
          /usr/bin/df -v     di -P -f msbuf1
          /usr/bin/df -k     di -dk -f sbcvpm
          /usr/ucb/df         di -dk -f sbuv2m
       GNU df:
          df                         di -dk -f SbuvpM -w 10
          df -T                    di -dk -f STbuvpM -w 10
       AIX df:
          df                        di -d 512 -f Sbf1UPM -w 10
          df -I                    di -d 512 -f Sbuf1M
          df -I -M              di -d 512 -f SMbuf1 -w 10
       HP-UX bdf:
          bdf                    di -d k -f Sbuv2M
          bdf -i                 di -d k -f Sbuv2UFPM

       If you like your numbers to add up/calculate the percentage  correctly,
       try one of the following format strings:

          di -f SMbuf1T
          di -f SMbcvpT
          di -f SMBuv2T

 

regards