report file system usage and inode usage in one line similar to HP-UX "bdf -i" (156 Views)
Reply
Valued Contributor
support_billa
Posts: 192
Registered: ‎06-27-2011
Message 1 of 2 (156 Views)

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

Please use plain text.
Valued Contributor
support_billa
Posts: 192
Registered: ‎06-27-2011
Message 2 of 2 (129 Views)

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

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation