• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2252
  • Last Modified:

More Information needed from UNIX "df" command

Hello,

I am trying to generate the report for companies management which can show -
1.file system
2. total space allocated
3. total free space
4. % of free space
5. used space
6. % of used space

the df -k command gives me the information about points - 1,  2 (I assume this is the total space allocated), 3 and 6. To get the information about points 4 and 5 which flags should I use or is there any other command that I can use to get the above information? Also df -k gives me the information about Iused and %Iused. Can you please explain me what is this?

I am not really a UNIX person and I need  to generate this report for management meeting urgently. I will highly appreciate your help!
0
MPJD
Asked:
MPJD
1 Solution
 
omarfaridCommented:
Hi,

The Iused & %Iused are related to filesystem inodes. Inodes are information nodes which basically give information about files and directories created within the file system (each inode represents a file or a directory).

http://en.wikipedia.org/wiki/Inode
http://teaching.idallen.com/fasttrack/98/unix/inodes.htm
http://www.scit.wlv.ac.uk/~jphb/spos/notes/ufs.inode.html

The remaining can be calculated.

 
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi MPJD,

unix systems typicall separate files by ownership onto their own logical devices.  The root drive, for example often contains just enough files to boot unix, the kernel, and the system commands.  User files and installed products are stored in separate file systems.  So items 3, 4, 5, and 6 have marginal value, other than curiosity.  If the root drive is full, you're not adding another system file no matter how much room is left on other devices.  If the home directory is full, you aren't going to add another file to your home directory even if all of the other file systems have free space.

Since you're putting together management reports, use df -m.  That will display the space in megabytes.  df -k displays in kilobytes.  With today's large file systems that's a lot of digits to glance at.

iused and %iused refer to the inodes on the device. Inodes are typically reserved with a device is created or formatted.   In the simplest of terms, the inodes are the directory entries.  When you create a file, the information about that file is stored in an inode.  When you run out of inodes, the device is full.



Good Luck,
Kent
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now