The Samba-Bugzilla – Bug 10738
report --stats output when termination signal arrives
Last modified: 2014-07-24 22:50:06 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).
this sounds really useful !
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.
markie likes the SIGUSR1 idea too and it has precedents with dd as well.