A simple script to process an rsync log file on STDIN, collate the log entries by connection (using a combination of PID and remote hostname), then output each one, so all lines for a given connection are togther rather than all interspersed.
Simply pipe rsync logs into the script's STDIN:
cat rsync.log | ./rsync-log-collateIf you only want log entries for a certain host, supply the hostname as the script's --only-host argument:
cat rsync.log | ./rsync-log-collate --only-host foo.example.comRefactor to ensure connections are output in time order; currently log lines are collated simply by using a hash with the hostname and PID as the key, so when iterating over them to output them, they'll be in indeterminate order (but all lines within the same collated connection will be in correct order, of course).
David Precious <[email protected]>