views:

30

answers:

1

I need a tool which gets a list of machine names and file wildcards. Then it connects to all these machines (SSH) and begins to monitor changes (appendings to the end) in each file matched by wildcards. New lines in each such file are saved to the local machine to the file with the same name.

(This is a task of real-time log files collecting.)

I could use ssh + tail -f, of course, but it is not very robust: if a monitoring process dies and then restarts, some data from remote files may be lost (because tail -f does not save the position at which it is finished before). I may write this tool manually, but before - I'd like to know: does such tool already exists or not.

A: 

Can you just rsync regularly? rsync will only sync the changes. I guess we need to know more about the intended usage.

d11wtq