Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.pod

rsync-log-collate

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.

USAGE

Simply pipe rsync logs into the script's STDIN:

cat rsync.log | ./rsync-log-collate

If 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.com

TODO

Refactor 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).

AUTHOR

David Precious <[email protected]>