Realtime Replication of a Single File

Scot L. Harris webid at
Thu Dec 8 18:41:21 UTC 2005

On Thu, 2005-12-08 at 11:55, Matt Roth wrote:
> List users,
> Please provide me with tips on how to replicate a single file to a 
> separate machine as changes are made to it.  I would prefer a method 
> that reacts to file modifications (ie. FAM/gamin) as opposed to timed 
> loops/polling (cron + rsync).  I'd also like to avoid NFS altogether.
> Keeping resource consumption low on the source machine is a priority.  A 
> bit of research has lead me to believe that calling rsync when gamin is 
> alerted to a file modification would be a good fit for my scenario, but 
> I'm unclear on the easiest implementation.
> My scenario is as follows.  I have a machine that runs Asterisk VoIP PBX 
> software.  Asterisk creates a log file that we generate reports off of.  
> Another machine handles the generation of these reports, which involves 
> significant number crunching and file I/O.  By replicating the file on 
> the reporting machine, I'd like to decouple the resource consumption of 
> reporting from the VoIP server.  Some of the reports are used to monitor 
> activities in realtime, so cronning off rsync on a large time interval 
> is not an option.

Can you get Asterisk to log things via syslog?  If you can then you can
use syslog to send that information to a remote server.  Then you run
your reports on the log on the remote system.

More information about the users mailing list