Bug 10738 - report --stats output when termination signal arrives
report --stats output when termination signal arrives
Status: NEW
Product: rsync
Classification: Unclassified
Component: core
x64 Linux
: P5 enhancement
: ---
Assigned To: Wayne Davison
Rsync QA Contact
Depends on:
  Show dependency treegraph
Reported: 2014-07-24 01:56 UTC by Mark Smith
Modified: 2014-07-24 22:50 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Mark Smith 2014-07-24 01:56:29 UTC
i am using Ubuntu 12.04.4LTS.  The use case I have is to run an rsync during the hours of 1am to 7am.  I use the timeout(1) program for this purpose:

	timeout -s ALRM 6h rsync --stats -av /source /destination

With the above usage, rsync receives a SIGALRM signal after 6h of running.  when this happens, it just terminates with no further output.

I would find it useful to display the current --stats output when the signal arrives.  This signal may SIGINT, SIGTERM, or SIGALRM, but in my case, I would really like SIGALRM to be handled at the very least.  I can definitely see a user wanting to see stats even when they type ^C on the terminal though (SIGINT).
Comment 1 roland 2014-07-24 21:44:38 UTC
this sounds really useful !
Comment 2 Kevin Korb 2014-07-24 21:48:12 UTC
This sounds like a good idea to me.  It also sounds a lot like what dd does if you send it sigusr1.  Therefore I will suggest that if this is added to rsync we should also have the ability to get current --stats output with a sigusr1 without actually ending the rsync run.
Comment 3 Mark Smith 2014-07-24 22:50:06 UTC
markie likes the SIGUSR1 idea too and it has precedents with dd as well.