Hi, I am using below command. rsync --verbose --log-file-format='%i %f %l %o %b' --log-file='/tmp/myfile' src/ dest/ Though it is good that all the sync information contents will be redirected to /tmp/myfile, it would be useful if rsync could print at least below final statistics on stdout. 2009/05/05 00:17:45 [26050] Number of files: 18 2009/05/05 00:17:45 [26050] Number of files transferred: 0 2009/05/05 00:17:45 [26050] Total file size: 9593706 bytes 2009/05/05 00:17:45 [26050] Total transferred file size: 0 bytes 2009/05/05 00:17:45 [26050] Literal data: 0 bytes 2009/05/05 00:17:45 [26050] Matched data: 0 bytes 2009/05/05 00:17:45 [26050] File list size: 417 2009/05/05 00:17:45 [26050] File list generation time: 0.001 seconds 2009/05/05 00:17:45 [26050] File list transfer time: 0.000 seconds 2009/05/05 00:17:45 [26050] Total bytes sent: 130 2009/05/05 00:17:45 [26050] Total bytes received: 464 2009/05/05 00:17:45 [26050] sent 130 bytes received 464 bytes 108.00 bytes/sec 2009/05/05 00:17:45 [26050] total size is 9593706 speedup is 16151.02 Could any one please let me know if it is possible to display these statistics on standard output. It would be fine if it also redirected or not to log-file. Thanks, Jignesh -------------- next part -------------- HTML attachment scrubbed and removed
On Tue, 2009-05-05 at 00:26 +0530, Jignesh Shah wrote:> Hi, I am using below command. > > rsync --verbose --log-file-format='%i %f %l %o %b' > --log-file='/tmp/myfile' src/ dest/ > > Though it is good that all the sync information contents will be > redirected to /tmp/myfile, it would be useful if rsync could print at > least below final statistics on stdout. > > 2009/05/05 00:17:45 [26050] Number of files: 18 > [...] > 2009/05/05 00:17:45 [26050] Total bytes received: 464 > 2009/05/05 00:17:45 [26050] sent 130 bytes received 464 bytes 108.00 > bytes/sec > 2009/05/05 00:17:45 [26050] total size is 9593706 speedup is 16151.02 > > > Could any one please let me know if it is possible to display these > statistics on standard output. It would be fine if it also redirected > or not to log-file.Those lines are supposed to be controlled by the --stats option. When I ran your command (which does not have --stats), the stats didn't appear in my log file, so I'm not sure how they got into yours; you might check if you have two different rsyncs writing to the same log file. In any case, if you pass --stats, rsync should print the information to both stdout and the log file. -- Matt
Hey Matt, OK it is displaying the statistics with --states on stdout as well but I think format has been changed than rsync 2.6.7. Am I right? Thanks, Jignesh On Tue, May 5, 2009 at 12:59 AM, Jignesh Shah <jignesh.shah1980@gmail.com>wrote:> Thanks for reply but I have been passing --states option. I have given the > command for example. See below is my exact command. > > /usr/local/bin/rsync --verbose --bwlimit=6144 --relative --archive > --blocking-io --stats --partial --force --timeout=43200 --delete --compress > -ii --log-file-format='%i %f %l %o %b' --log-file='/tmp/myfile' > --omit-dir-times /src /dest > > Do you see anything wrong in this command. > > Thanks, > Jignesh > > > On Tue, May 5, 2009 at 12:54 AM, Matt McCutchen <matt@mattmccutchen.net>wrote: > >> On Tue, 2009-05-05 at 00:26 +0530, Jignesh Shah wrote: >> > Hi, I am using below command. >> > >> > rsync --verbose --log-file-format='%i %f %l %o %b' >> > --log-file='/tmp/myfile' src/ dest/ >> > >> > Though it is good that all the sync information contents will be >> > redirected to /tmp/myfile, it would be useful if rsync could print at >> > least below final statistics on stdout. >> > >> > 2009/05/05 00:17:45 [26050] Number of files: 18 >> > [...] >> > 2009/05/05 00:17:45 [26050] Total bytes received: 464 >> > 2009/05/05 00:17:45 [26050] sent 130 bytes received 464 bytes 108.00 >> > bytes/sec >> > 2009/05/05 00:17:45 [26050] total size is 9593706 speedup is 16151.02 >> > >> > >> > Could any one please let me know if it is possible to display these >> > statistics on standard output. It would be fine if it also redirected >> > or not to log-file. >> >> Those lines are supposed to be controlled by the --stats option. When I >> ran your command (which does not have --stats), the stats didn't appear >> in my log file, so I'm not sure how they got into yours; you might check >> if you have two different rsyncs writing to the same log file. In any >> case, if you pass --stats, rsync should print the information to both >> stdout and the log file. >> >> -- >> Matt >> >> >-------------- next part -------------- HTML attachment scrubbed and removed
Thanks Matt, that has solved my problem. Thanks, Jignesh On Tue, May 5, 2009 at 1:16 AM, Matt McCutchen <matt@mattmccutchen.net>wrote:> On Tue, 2009-05-05 at 01:08 +0530, Jignesh Shah wrote: > > I think I got it. The line in rsync 2.6.7 "wrote 130 bytes read 464 > > bytes 108.00 bytes/sec" is changed to "2009/05/05 00:17:45 [26050] > > sent 130 bytes received 464 bytes 108.00 bytes/sec" in rsync 3.0.5. > > > > Please let me know if I am correct. > > That particular change was made long before 2.6.7: > > > http://gitweb.samba.org/?p=rsync.git;a=commit;h=4de2a1740983244221d66b22b983c36a174e3100 > > $ git name-rev 4de2a1740983244221d66b22b983c36a174e3100 > 4de2a1740983244221d66b22b983c36a174e3100 tags/v2.6.3pre1~59 > > The only thing I see different between rsync 2.6.7 and 3.0.5 is that > 3.0.5 puts thousand separators in the numbers: > > sent 3,089 bytes received 285 bytes 6,748.00 bytes/sec > total size is 2,138 speedup is 0.63 > > You can disable that with --no-human-readable . > > -- > Matt > >-------------- next part -------------- HTML attachment scrubbed and removed