[Gllug] Re: Accesing files over the network with perl

Jon Dye jon at pecorous.co.uk
Mon Oct 17 13:25:00 UTC 2005


Gerhardus Geldenhuis wrote:
> On 10/17/05, Russell Howe <rhowe at siksai.co.uk> wrote:
> 
>>On Mon, Oct 17, 2005 at 08:54:28AM +0100, Gerhardus Geldenhuis wrote:
>>
>>>Hi
>>>I am looking for a way to access files over the network with perl every 15 min.
>>
>>Very easy, pretty secure (aside from the unencrypted-ness of it,
>>although you could probably pipe through openssl or something if you
>>wish...).
>>
>>echo 'logdump 23623/tcp # Dumps /path/to/logfile to client upon connect. See inetd.conf' >> /etc/services
>>echo 'logdump stream tcp nowait nobody.nogroup /bin/cat /path/to/logfile' >> /etc/inetd.conf && /etc/init.d/inetd reload
>>
>>Then in the perl script, just connect to port 23623 on a client to
>>receive the latest log file...
[...]
> In the end I want as a simple and failsafe a solution possible, and as
> I mentioned in a reply somewhere in this thread, the volume of data is
> a problem. I dont want to send 150 megs of logfiles over the network
> every 15 minutes.

You could save network bandwidth by changing the above suggestion to:

logdump stream tcp nowait nobody.nogroup /bin/gzip -c /path/to/logfile

and then on the other end you'd need to unzip the file

JD
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list