Log File format

Dave Dykstra dwd at bell-labs.com
Thu Feb 28 06:40:56 EST 2002

On Wed, Feb 27, 2002 at 03:04:04PM -0000, John wrote:
> Thanks,
> But, my problem is exactly that I cannot key on the PID field, i.e.
> 2002/02/27 13:55:22 [15207] rsyncd version 2.5.3pre1 starting, listening
> on port 873
> 2002/02/27 13:55:32 [15217] rsync to in/redhat.jjnet.co.uk from
> charliebrown at redhat.jjnet.co.uk (
> 2002/02/27 13:55:40 [15218] wrote 73 bytes  read 12482 bytes  total size
> 26185280
> As you can see the 'rsync to' line and the 'wrote' lines have different
> PID's.  This was a single *client* initiated rsync, to a server daemon.

All access to rsync servers are initiated by clients.  The key factor is
that the *receiver* of an rsync transfer splits itself into two processes.
It must be that one of those processes is printing one of the messages
and the other process is printing the other.

> The 'log format' option in rsyncd.conf seems to have no effect on these
> lines, But is used to format the output of the 'transfer logging' lines, I
> would rather not enable transfer logging, since all I need is contained in
> these two lines.
> Perhaps I need to amend log.c?

Could be.  I would suggest that you play around with coming up with a patch
that will do what you want, and if it isn't very intrusive it could probably
be accepted.  I see a comment in rwrite() "first try to pass it off to our
sibling" so it's not clear to me why it isn't just one of the two processes
that is actually writing to the logfile.  The pid is added just before
writing to the logfile so it seems like it should already be working the
way you want it.

- Dave Dykstra

More information about the rsync mailing list