Michael Stalnaker
2008-Sep-16 01:09 UTC
[zfs-discuss] I/O statistics on a per-filesystem basis?
Does anyone have a suggestion for a good way to monitor a ZFS pool on a per-filesystem basis? The scenario is that we have a large zpool where many developers get filesystems, and we want to be able to track which of those filesystems are getting the heaviest usage. --Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20080915/fbe8ebb7/attachment.html>
Marion Hakanson
2008-Sep-16 01:20 UTC
[zfs-discuss] I/O statistics on a per-filesystem basis?
Michael.Stalnaker at exponential.com said:> Does anyone have a suggestion for a good way to monitor a ZFS pool on a > per-filesystem basis? The scenario is that we have a large zpool where many > developers get filesystems, and we want to be able to track which of those > filesystems are getting the heaviest usage.The "fsstat" tool is useful for this, though not ZFS-specific. Here''s a one-liner you could put in crontab every 5 minutes or so, collecting the output in a file somewhere (sh/ksh/bash syntax): fsstat $(zfs list -H -o mountpoint -t filesystem | egrep ''^/'') 2 20 Regards, Marion
"C. Bergström"
2008-Sep-16 08:05 UTC
[zfs-discuss] I/O statistics on a per-filesystem basis?
Marion Hakanson wrote:> Michael.Stalnaker at exponential.com said: > >> Does anyone have a suggestion for a good way to monitor a ZFS pool on a >> per-filesystem basis? The scenario is that we have a large zpool where many >> developers get filesystems, and we want to be able to track which of those >> filesystems are getting the heaviest usage. >> > > The "fsstat" tool is useful for this, though not ZFS-specific. Here''s > a one-liner you could put in crontab every 5 minutes or so, collecting > the output in a file somewhere (sh/ksh/bash syntax): > > fsstat $(zfs list -H -o mountpoint -t filesystem | egrep ''^/'') 2 20 >Sorry can''t help but add this for completeness tcsh syntax.. (should also work for bash?) Nice one liner. thanks. fsstat `zfs list -H -o mountpoint -t filesystem | egrep ''^/''` 2 20 ./C
Michael Stalnaker
2008-Sep-16 08:08 UTC
[zfs-discuss] I/O statistics on a per-filesystem basis?
Thanks, Marion. That''s exactly what I needed. On 9/15/08 6:20 PM, "Marion Hakanson" <hakansom at ohsu.edu> wrote:> Michael.Stalnaker at exponential.com said: >> Does anyone have a suggestion for a good way to monitor a ZFS pool on a >> per-filesystem basis? The scenario is that we have a large zpool where many >> developers get filesystems, and we want to be able to track which of those >> filesystems are getting the heaviest usage. > > The "fsstat" tool is useful for this, though not ZFS-specific. Here''s > a one-liner you could put in crontab every 5 minutes or so, collecting > the output in a file somewhere (sh/ksh/bash syntax): > > fsstat $(zfs list -H -o mountpoint -t filesystem | egrep ''^/'') 2 20 > > Regards, > > Marion > >
Carson Gaspar
2008-Sep-16 09:29 UTC
[zfs-discuss] I/O statistics on a per-filesystem basis?
Marion Hakanson wrote:> Michael.Stalnaker at exponential.com said: >> Does anyone have a suggestion for a good way to monitor a ZFS pool on a >> per-filesystem basis? The scenario is that we have a large zpool where many >> developers get filesystems, and we want to be able to track which of those >> filesystems are getting the heaviest usage. > > The "fsstat" tool is useful for this, though not ZFS-specific. Here''s > a one-liner you could put in crontab every 5 minutes or so, collecting > the output in a file somewhere (sh/ksh/bash syntax): > > fsstat $(zfs list -H -o mountpoint -t filesystem | egrep ''^/'') 2 20Note that this appears to _not_ capture mmap''d I/O (or there''s some other bug...). My extremely busy RRD stat collector shows zero writes in fsstat. "zpool iostat" shows reality... but only at the pool level. -- Carson