df and du provides a total view of usage but the problem with these is that they are not broken down per user.

Is there a tool that does this? I found quot but that only works on ufs. Is there an equivalent for zfs or nfs?

To breakdown the usage, it is possible to write a script. Is that the only alternative?

The output from zfs userspace filesystem

$ zfs userspace filesystem
cannot access dataset filesystem: dataset does not exist

The output from zpool upgrade -v

$ zpool upgrade -v
This system is currently running ZFS pool version 32.

The following versions are supported:

---  --------------------------------------------------------
 1   Initial ZFS version
 2   Ditto blocks (replicated metadata)
 3   Hot spares and double parity RAID-Z
 4   zpool history
 5   Compression using the gzip algorithm
 6   bootfs pool property
 7   Separate intent log devices
 8   Delegated administration
 9   refquota and refreservation properties
 10  Cache devices
 11  Improved scrub performance
 12  Snapshot properties
 13  snapused property
 14  passthrough-x aclinherit
 15  user/group space accounting
 16  stmf property support
 17  Triple-parity RAID-Z
 18  Snapshot user holds
 19  Log device removal
 20  Compression using zle (zero-length encoding)
 21  Reserved
 22  Received properties
 23  Slim ZIL
 24  System attributes
 25  Improved scrub stats
 26  Improved snapshot deletion performance
 27  Improved snapshot creation performance
 28  Multiple vdev replacements
 29  RAID-Z/mirror hybrid allocator
 30  Reserved
 31  Improved 'zfs list' performance
 32  One MB blocksize

2 Answers 2


For zfs, per the zfs man page, use zfs userspace filesystem to get a listing for all users on a file system, and use zfs get [-r] userused@user filesystem to get space used by a particular user on a filesystem. Use the -r option to zfs get ... to get user usage on all descendents of the filesystem, too. Be aware that this will return not just descendent filesystems but descendent clones and snapshots, too.

As far as I know, NFS does not support such operations directly - that will have to be done via the native file system on the NFS server.

  • the zfs userspace command returns cannot access dataset ...: dataset does not exist
    – user55570
    Jun 19, 2015 at 20:54
  • What's the output from zfs get version? Jun 20, 2015 at 1:33
  • The result is zfs version 5
    – user55570
    Jun 20, 2015 at 4:18
  • Something isn't making sense then - the userspace and userused features should be available at version 4. What's the output from zpool upgrade -v? That should provide a list up to about version 35 depending on what you're running, with user/group space accounting appearing at version 15. Jun 20, 2015 at 10:57
  • Added the output of zpool upgrade -v to original post.
    – user55570
    Jun 20, 2015 at 11:28

To answer your specific question, "What are the BEST ways to monitor and report disk usage on Solaris", that would not actually be in the form of a specific set of commands or a shell script, but more like a third party agent that is installed on your system in order to keep tabs on the statistics.

Two products in particular that do this extremely well are NetIQ and Compuware's dynaTrace, both of which are excellent products for enterprise environments and provide extremely detailed reports. They also have great alerting features, APIs, and even integrate with multiple other products and support ticketing systems.

Additionally, these products are great for capacity planning and are able to nail down disk usage statistics to as granular a level as you could possibly want or need. They also both specifically support ZFS file systems on numerous versions of Solaris.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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