Bug 222785 - [zfs] show progress of running zfs operations, zpool monitor
Summary: [zfs] show progress of running zfs operations, zpool monitor
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-04 20:38 UTC by Tim Foster
Modified: 2017-10-09 21:10 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Foster 2017-10-04 20:38:39 UTC
Solaris 11.3 introduced a new zpool subcommand, 'monitor' allowing the user
to monitor the ongoing progress of long-running zfs operations, for example, scrubs, send/recv and resilver.

More detail on what the Solaris implementation looks like is at:

https://docs.oracle.com/cd/E53394_01/html/E54801/gnheq.html

and here is one example documented in that man page:

# zpool monitor -t resilver 5 4
pool       provider  pctdone  total  speed  timeleft   other
poolA      resilver   10.7    12.0G  37.7M  4m50s      (2/2)
poolB      resilver    7.1    10.0G  31.5M  5m02s      (2/2)
poolC      resilver    1.8    10.0G  42.9M  3m54s      (2/2)
poolA      resilver   13.9    12.0G  38.0M  4m38s      (2/2)
poolB      resilver    9.0    10.0G  30.4M  5m07s      (2/2)
poolC      resilver    5.3    10.0G  41.7M  3m52s      (2/2)
poolA      resilver   14.7    12.0G  36.1M  4m50s      (2/2)
poolB      resilver   10.8    10.0G  29.2M  5m12s      (2/2)
poolC      resilver    7.2    10.0G  41.0M  3m51s      (2/2)
poolA      resilver   14.7    12.0G  32.8M  5m19s      (2/2)
poolB      resilver   10.8    10.0G  29.6M  5m08s      (2/2)
poolC      resilver    7.2    10.0G  40.7M  3m53s      (2/2)


While it's possible to script some of this today on FreeBSD using 
'zpool status -v' output, grepping for the activity that the pool is
performing, it's a little clunky.

It would be pretty useful if OpenZFS had similar functionality.