Managing System Information, Processes, and Performance in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Displaying Disk Space Statistics (df)

Use the df command to show the amount of free disk space on each mounted disk. The usable disk space that is reported by df reflects only 90 percent of full capacity because the reporting statistics allows for 10 percent above the total available space. This head room normally stays empty for better performance.

The percentage of disk space actually reported by the df command is used space divided by usable space.

If the file system exceeds 90 percent capacity, you could transfer files to a disk that is not as full by using the cp command. Alternately, you could transfer files to a tape by using the tar or cpio commands. Or, you could remove the files.

For a detailed description of this command, see the df (1M) man page.

Displaying Disk Space Information (df –k)

Use the df -k command to display disk space information in Kbytes.

$ df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t3d0s0     192807   40231  133296    24%    / 
Example 3-1  Displaying File System Information

The following example shows the output from the df -k command for a SPARC system.

$ df -k
Filesystem           1024-blocks        Used   Available Capacity  Mounted on
rpool/ROOT/solaris-161   191987712     6004395   140577816     5%    /
/devices                       0           0           0     0%    /devices
/dev                           0           0           0     0%    /dev
ctfs                           0           0           0     0%    /system/contract
proc                           0           0           0     0%    /proc
mnttab                         0           0           0     0%    /etc/mnttab
swap                     4184236         496     4183740     1%    /system/volatile
objfs                          0           0           0     0%    /system/object
sharefs                        0           0           0     0%    /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1   146582211     6004395   140577816     5%    /lib/libc.so.1
fd                             0           0           0     0%    /dev/fd
swap                     4183784          60     4183724     1%    /tmp
rpool/export           191987712          35   140577816     1%    /export
rpool/export/home      191987712          32   140577816     1%    /export/home
rpool/export/home/123   191987712    13108813   140577816     9%    /export/home/123
rpool/export/repo      191987712    11187204   140577816     8%    /export/repo
rpool/export/repo2010_11   191987712          31   140577816     1%    /export/repo2010_11
rpool                  191987712     5238974   140577816     4%    /rpool
/export/home/123      153686630    13108813   140577816     9%    /home/123

The output fields of the df -k command are as follows:

1024-blocks

Total size of usable space in the file system

Used

Amount of space used

Available

Amount of space available for use

Capacity

Amount of space used, as a percentage of the total capacity

Mounted on

Mount point

Example 3-2  Displaying File System Information by Using the df Command Without Any Options

When the df command is used without operands or options, it reports on all mounted file systems, as shown in the following example.

$ df
/                  (rpool/ROOT/solaris):100715496 blocks 100715496 files
/devices           (/devices          ):       0 blocks        0 files
/dev               (/dev              ):       0 blocks        0 files
/system/contract   (ctfs              ):       0 blocks 2147483601 files
/proc              (proc              ):       0 blocks    29946 files
/etc/mnttab        (mnttab            ):       0 blocks        0 files
/system/volatile   (swap              ):42257568 blocks  2276112 files
/system/object     (objfs             ):       0 blocks 2147483441 files
/etc/dfs/sharetab  (sharefs           ):       0 blocks 2147483646 files
/dev/fd            (fd                ):       0 blocks        0 files
/tmp               (swap              ):42257568 blocks  2276112 files
/export            (rpool/export      ):100715496 blocks 100715496 files
/export/home       (rpool/export/home ):100715496 blocks 100715496 files
/export/home/admin (rpool/export/home/admin):100715496 blocks 100715496 files
/rpool             (rpool             ):100715496 blocks 100715496 files
/export/repo2010_11(rpool/export/repo2010_11):281155639 blocks 281155639 files
/rpool             (rpool             ):281155639 blocks 281155639 files