df -k command shows duplicate information in solaris machine, How to get the exact

0

I am using df -k command to get the total size of the disk space for solaris machine.

But, i am getting duplicate info like listing disk space for every user under the same partion.

Filesystem           1024-blocks        Used   Available Capacity  Mounted on
rpool/ROOT/solaris     573898752     2319948   554417618     1%    /
/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                    13017420        1208    13016212     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
                       556737566     2319948   554417618     1%    /lib/libc.so.1
fd                             0           0           0     0%    /dev/fd
rpool/ROOT/solaris/var
                       573898752     1803580   554417618     1%    /var
swap                    13016220           8    13016212     1%    /tmp
rpool/export           573898752          32   554417618     1%    /export
rpool/export/home      573898752          40   554417618     1%    /export/home
rpool/export/home/mqm
                       573898752          35   554417618     1%    /export/home/mqm
**rpool/export/home/soluser1
                       573898752          35   554417618     1%    /export/home/soluser1
rpool/export/home/soluser2
                       573898752          35   554417618     1%    /export/home/soluser2
rpool/export/home/soluser3
                       573898752          35   554417618     1%    /export/home/soluser3
rpool/export/home/soluser4
                       573898752          35   554417618     1%    /export/home/soluser4
rpool/export/home/soluser5
                       573898752          35   554417618     1%    /export/home/soluser5
rpool/export/home/test
                       573898752     4370328   554417618     1%    /export/home/test**
rpool/export/home/test1
                       573898752          73   554417618     1%    /export/home/test1
rpool                  573898752          39   554417618     1%    /rpool
/export/home/test      558787946     4370328   554417618     1%    /home/test

Here user spaces of soluser1,2,3,5 were located under /export. It will give wrong result if i sum up all those values available under Available field.

Whereas in linux, i can get the correct space using the same command. How to get the correct disk space in solaris, please advice.

prasanna

Posted 2013-08-19T10:24:28.757

Reputation: 121

Answers

0

You are getting the correct results from df -k. You only get the wrong results if you sum them -- so don't sum them. That doesn't make sense anyway. It makes no sense to sum things that partially or fully overlap.

David Schwartz

Posted 2013-08-19T10:24:28.757

Reputation: 58 310

Then how to get the total diskspace size of a solaris machine without summing up. Please advice. – prasanna – 2013-08-19T13:25:46.520

@prasanna If you want the total diskspace size, sum up, but as I said, that will give you a meaningless number. It doesn't make any sense to ask for the "total" of things that partially or fully overlap. If I can spend $10,000 on a car or $10,000 on a boat, what sense does it make to sum those numbers? – David Schwartz – 2013-08-19T20:08:32.437

@david_schwartz Thanks for the info, i need to get the physical disk space of a solaris machine. How to get this in a command or sequence of commands. – prasanna – 2013-08-23T09:52:05.670

0

Solaris is using the ZFS filesystem which allows filesystems to share free space. Use the 'zfs list' command or the "zpool info" command to show more information about ZFS filesystems and pools.

Chris Quenelle

Posted 2013-08-19T10:24:28.757

Reputation: 330