source:
npl/fileserver/rsync/progress-hack.patch
@
67ac101
Last change on this file since 67ac101 was c5c522c, checked in by , 8 years ago | |
---|---|
|
|
File size: 3.0 KB |
-
options.c
Only in rsync-3.0.9: config.h.in Only in rsync-3.0.9: configure.sh Only in rsyncp/: debian diff -u -r rsync-3.0.9/options.c rsyncp/options.c
old new 1543 1543 log_before_transfer = !am_server; 1544 1544 } 1545 1545 1546 if (do_progress && !verbose && !log_before_transfer && !am_server) 1547 verbose = 1; 1546 /* if (do_progress && !verbose && !log_before_transfer && !am_server) 1547 verbose = 1; */ 1548 1548 1549 1549 1550 if (dry_run) 1550 1551 do_xfers = 0; -
progress.c
diff -u -r rsync-3.0.9/progress.c rsyncp/progress.c
old new 61 61 * printed for this file, so we should output a newline. (Not 62 62 * necessarily the same as all bytes being received.) 63 63 **/ 64 int64 progressed_bytes=0; 65 int64 last_mb=0; 64 66 static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now, 65 67 int is_last) 66 68 { … … 70 72 unsigned long diff; 71 73 double rate, remain; 72 74 75 76 int64 this_mb=0; 77 73 78 if (is_last) { 74 79 /* Compute stats based on the starting info. */ 75 80 if (!ph_start.time.tv_sec … … 78 83 rate = (double) (ofs - ph_start.ofs) * 1000.0 / diff / 1024.0; 79 84 /* Switch to total time taken for our last update. */ 80 85 remain = (double) diff / 1000.0; 86 progressed_bytes+=size; 87 this_mb=progressed_bytes/1000000; 81 88 } else { 82 89 /* Compute stats based on recent progress. */ 83 90 if (!(diff = msdiff(&ph_list[oldest_hpos].time, now))) … … 85 92 rate = (double) (ofs - ph_list[oldest_hpos].ofs) * 1000.0 86 93 / diff / 1024.0; 87 94 remain = rate ? (double) (size - ofs) / rate / 1000.0 : 0.0; 95 96 this_mb=(progressed_bytes+ofs)/1000000; 97 } 98 99 if (this_mb!=last_mb){ 100 last_mb=this_mb; 101 rprintf(FCLIENT, "%d\n", this_mb); 88 102 } 89 103 90 104 if (rate > 1024*1024) { … … 114 128 } else 115 129 strlcpy(eol, "\r", sizeof eol); 116 130 progress_is_active = 0; 117 rprintf(FCLIENT, "%12s %3d%% %7.2f%s %s%s", 118 human_num(ofs), pct, rate, units, rembuf, eol); 131 /* rprintf(FCLIENT, "%12s %3d%% %7.2f%s %s%s", 132 human_num(ofs), pct, rate, units, rembuf, eol);*/ 133 134 119 135 if (!is_last) 120 136 progress_is_active = 1; 121 137 } -
support/rrsync
Only in rsyncp/: progress.c.orig Only in rsync-3.0.9: proto.h Only in rsync-3.0.9: proto.h-tstamp Only in rsync-3.0.9: rsync.1 Only in rsync-3.0.9: rsyncd.conf.5 diff -u -r rsync-3.0.9/support/rrsync rsyncp/support/rrsync
old new 31 31 # command="rrsync logs/client" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAzGhEeNlPr... 32 32 # command="rrsync -ro results" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAmkHG1WCjC... 33 33 # 34 # Format of the env rionment variables set by sshd:34 # Format of the environment variables set by sshd: 35 35 # SSH_ORIGINAL_COMMAND=rsync --server -vlogDtpr --partial . ARG # push 36 36 # SSH_ORIGINAL_COMMAND=rsync --server --sender -vlogDtpr --partial . ARGS # pull 37 37 # SSH_CONNECTION=client_addr client_port server_port
Note: See TracBrowser
for help on using the repository browser.