Am 20.06.2013 10:20, schrieb Alex Yurchenko:
> On 2013-06-20 03:07, Graham Green wrote:
>> I have a question about monitoring progress of an SST.
>> We're using rsync as our SST method with synchronization occurring over a
>> WAN connection. We'd like to be able to get some visibility into where
>> the
>> process is at, whether that be a % of data transferred or the file
>> currently being synced etc.
>> Is there something built into galera that can give us that information?
>
> As you already indicated, you use rsync for SST. Last time I checked
> rsync does not provide any progress indication. So that's the answer to
> the first question.
>
AFAIK rsync does not know its progress itself, it checks if a file has
to be transferred not before it actually hits it when traversing trough
the directory tree.
I think you could patch the SST script and do one of these 2 things:
- run once with dry-run, collect the statistics (how many bytes/files
would have been transferred), run again without dry-run but with
--progress and calculate the progress with a simple sed/awk or perl
logic that you pipe STDOUT to.
- use "find" or something like that to find the number of files that
need to be copied before starting rsync and then simply run rsync -v,
pipe into perl (or something else), count the line numbers and output
something like "242/534 files transferred = 22%" to a log file.
any of these should be implemented within less than an hour. let me know
if you need further input of any kind.
I didn't look deeper into it as I use the xtrabackup SST.
Jan