Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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.

share|improve this answer
    
Then how to get the total diskspace size of a solaris machine without summing up. Please advice. –  prasanna Aug 19 '13 at 13:25
    
@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 Aug 19 '13 at 20:08
    
@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 Aug 23 '13 at 9:52

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.