Query live connections?

Wayne Davison wayned at samba.org
Wed Jan 6 23:02:54 MST 2010


On Wed, Jan 6, 2010 at 2:06 PM, Erich Weiler <weiler at soe.ucsc.edu> wrote:

> 2: Or better yet, how does rsync itself check for the number of
> connections?
>

See the connection.c file in the rsync source for the file locking used
(which calls a routine in util.c).  Rsync tries to lock a 4-byte range in
the file, starting from the start and incrementing by 4 bytes for each slot.
 So, one way to check for the number of lockers is to use fcntl() with
F_GETLK to query the presence of existing locks on the lockfile.

..wayne..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20100106/73fad514/attachment.html>


More information about the rsync mailing list