[Bug 10738] New: report --stats output when termination signal arrives

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 10738] New: report --stats output when termination signal arrives

samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=10738

           Summary: report --stats output when termination signal arrives
           Product: rsync
           Version: 3.0.9
          Platform: x64
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: core
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]
         QAContact: [hidden email]


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).

--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|

[Bug 10738] report --stats output when termination signal arrives

samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=10738

--- Comment #1 from roland <[hidden email]> 2014-07-24 21:44:38 UTC ---
this sounds really useful !

--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|

[Bug 10738] report --stats output when termination signal arrives

samba-bugs
In reply to this post by samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=10738

--- Comment #2 from Kevin Korb <[hidden email]> 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.

--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|

[Bug 10738] report --stats output when termination signal arrives

samba-bugs
In reply to this post by samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=10738

--- Comment #3 from Mark Smith <[hidden email]> 2014-07-24 22:50:06 UTC ---
markie likes the SIGUSR1 idea too and it has precedents with dd as well.

--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|

[Bug 10738] report --stats output when termination signal arrives

Samba - rsync mailing list
In reply to this post by samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=10738

Ben RUBSON <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #4 from Ben RUBSON <[hidden email]> ---
Hello,

I'm facing this "issue" too, I really would like to have stats displayed when
rsync receives a termination signal.
Sometimes rsync runs all night long and is killed in the morning to save
bandwidth, would then really be interesting to have stats to help with
reporting.

Any progress in this then ?

Many thx !

Ben

--
You are receiving this mail because:
You are the QA Contact for the bug.

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|

[Bug 10738] report --stats output when termination signal arrives

Samba - rsync mailing list
In reply to this post by samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=10738

--- Comment #5 from Ben RUBSON <[hidden email]> ---
So I just went through the code and found that this feature request is already
implemented.
We just have to use SIGUSR2 and rsync will stop, displaying stats.
kill -USR2 <rsync_pid>
Perfect !

--
You are receiving this mail because:
You are the QA Contact for the bug.

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|

[Bug 10738] report --stats output when termination signal arrives

Samba - rsync mailing list
In reply to this post by samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=10738

--- Comment #6 from Ben RUBSON <[hidden email]> ---
Mmmh however some of the statistics seem to be wrongly calculated.

### Example with tsync 3.1.2 :

Number of files: 8,732 (reg: 7,568, dir: 1,163, link: 1)
Number of created files: 1,232 (reg: 1,187, dir: 45)
Number of deleted files: 0
Number of regular files transferred: 1,187
Total file size: 17.92G bytes
Total transferred file size: 1.48G bytes
Literal data: 914.70M bytes
Matched data: 0 bytes
File list size: 27.07K
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 0
Total bytes received: 0

sent 0 bytes  received 0 bytes  -0.00 bytes/sec
total size is 17.92G  speedup is -9,223,372,036,854,775,808nf

### Example with an old rsync 2.6.9 :

Number of files: 24626
Number of files transferred: 827
Total file size: 69­.44G bytes
Total transferred file size: 1­.20G bytes
Literal data: 633­.50M bytes
Matched data: 441­.70K bytes
File list size: 526135
File list generation time: 0­.588 seconds
File list transfer time: 0­.000 seconds
Total bytes sent: 0
Total bytes received: 0

sent 0 bytes  received 0 bytes  -0­.0 bytes/sec
total size is 69­.44G  speedup is inf

--
You are receiving this mail because:
You are the QA Contact for the bug.

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html