What does Rsync's output tell here about to-chk?

20

4

I was using rsync using --progress option , So the file transfer completed and I got following output

receiving incremental file list
Makefile
          9,935 100%    9.47MB/s    0:00:00 (xfr#1, to-chk=0/1)

My question is what does to-chk=0/1 means ?

I am transferring only 1 file here ,that is Makefile. transfer number (xfr#1) clearly indicates 1 file , but what does to-chk = 0/1 stands for ?

Akshay Patil

Posted 2013-01-14T07:50:14.500

Reputation: 323

Did your transfer only consist of one file? – slhck – 2013-01-14T07:53:03.933

yes , only 1 file – Akshay Patil – 2013-01-14T19:51:45.887

Answers

31

to-chk or to-check gives you the number of files still to be checked, e.g. 0/1 means 0 of a total of 1 files in the queue still need to be checked.

During a normal transfer with, let's say 42 files, to-check will basically count down from 42 to 0 (to-check=38/42to-check=2/42) until rsync is done syncing.

Note that for large amounts of files, the last number in to-check may also grow since rsync doesn't queue all files at once (to-check=38/42...to-check=2/56). That's because it uses a recursion algorithm:

Beginning with rsync 3.0.0, the recursive algorithm used is now an incremental scan that uses much less memory than before and begins the transfer after the scanning of the first few directories have been completed.

To disable this behavior add the --no-inc-recursive option.

Note that in newer releases of rsync (3.1.0), the label has been changed to ir-chk to indicate incremental recursive progress (ie: the default) and to-check to indicate non incremental recursive progress (ie: with the --no-inc-recursive option).

slhck

Posted 2013-01-14T07:50:14.500

Reputation: 182 472

I think in addition to this, ir-chk is when it is still scanning through the filesystem and there are more of the filesystem to scan through, then when it reaches the end, it changes to say to-chk, meaning no more scanning is required and the total value output is the final countdown, it wont increment anymore – Christopher Thomas – 2016-10-18T09:04:55.083