Xin Li
2013-11-20 02:26:52 UTC
Hi,
This is a proof-of-concept changeset that adds progress reporting via
process title. This is useful for third party observers (for
instance, Web based GUI) to find out what the 'zfs send' process is doing.
Note that this do not yet work for Illumos or Linux due to the lack of
setproctitle(), but it's pretty straightforward to port it to Linux if
the zfs(1) program is linked against libbsd or use compatibility shims
from OpenSSH.
When applied, on FreeBSD, it's now possible to determine the progress
using "top -a" or ps -aux without having a helper program to parse and
process output from "zfs send -v". The progress indicator would look
like this:
zfs: sending tank/home/***@trans01 (80%: 135388948744/168379989120)
Known caveats:
- the "-V" flag is arbitrarily picked, there may be a better form for
that.
- The estimated stream size is slightly smaller than the actual size.
This version capped the percentage value at 100%.
Cheers,
This is a proof-of-concept changeset that adds progress reporting via
process title. This is useful for third party observers (for
instance, Web based GUI) to find out what the 'zfs send' process is doing.
Note that this do not yet work for Illumos or Linux due to the lack of
setproctitle(), but it's pretty straightforward to port it to Linux if
the zfs(1) program is linked against libbsd or use compatibility shims
from OpenSSH.
When applied, on FreeBSD, it's now possible to determine the progress
using "top -a" or ps -aux without having a helper program to parse and
process output from "zfs send -v". The progress indicator would look
like this:
zfs: sending tank/home/***@trans01 (80%: 135388948744/168379989120)
Known caveats:
- the "-V" flag is arbitrarily picked, there may be a better form for
that.
- The estimated stream size is slightly smaller than the actual size.
This version capped the percentage value at 100%.
Cheers,