Click to See Complete Forum and Search --> : remote file system monitoring


chintan491
02-23-2006, 05:36 AM
i am trying to monitor the file system .. i had written the following code ..

#!/usr/bin/perl

use strict;

use SGI::FAM;

my $conn = new SGI::FAM;
$conn->monitor( "/var/log/messages" );

while (1) {
my $event = $conn->next_event;
print $event->filename, " ", $event->type, "\n";
}

this is working perfectly for local machine but how do i get it working for remote machine ..???

dkeav
02-23-2006, 11:29 AM
could you be a little more specific? you want the script to run on a remote computer and the output back to the local computer right?

ncsuapex
02-23-2006, 02:36 PM
Or he may want to run it locally but connect to a remote computer to get the results..

chintan491
02-24-2006, 01:25 AM
well either of the two could b gud enough ..
but i would prefer the script to on my system and connect to the other system and run it over there ..

ncsuapex
02-24-2006, 01:36 AM
well you would need to provide us with more information on the remote computer.

Can you connect remotely to this computer?

How do you connect to this computer?

I think you would need to edit this portion of the script to have the path to the connection on your remote computer.

"/var/log/messages"


It would need to have the path to your remote computer.

Im going to assume you want to monitor a file system on a remote linux machine.

j

dkeav
02-24-2006, 02:17 AM
presonally i think i would just modify the script and syslog on the computers, put the script on the remote computer, add it to a cron job to run every so many minutes or as a daemon maybe, then syslog can report it to your local syslog daemon on your workstation, you could then have any number of clients all reporting to the same place

happybunny
02-24-2006, 09:01 AM
I would think that this wonderfully written, insightful, deep, colorful, article can help you out.

It also slice's, makes julian fries and cures baldness....well, not the baldness...

http://justlinux.com/forum/showthread.php?t=144606&highlight=syslog-ng