-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mark Goldstein wrote:
Hi,
On Jan 7, 2008 2:37 PM, G T Smith
wrote: Marcin Floryan wrote:
Hi!
Anyone have any view over the best way to watch for changes in log files to do some analysis? ... * to use Perl File::Tail to listen on a file and process any text that arrives * to use tail -f and pipe the output to my software ...
Personal view is that it would be best to use a Perl module if it exists in a script daemon, rather than use a command line call and pipe data to a perl script.
Not on performance grounds, but more because one can design the script to handle unusual events and manage processing accordingly (especially if you are backending with a database that in itself may be adding to the logs you are monitoring).
I guess, it depends on what one wants to do with the logs. I used "tail" in a set of tests and found it very flexible and convenient. E.g. I did not want to know exactly in what log file the
<snip> It always does :-) If one is only filtering this is probably fine, as is the approach of using syslog suggested elsewhere ... but the thing I am picking up here is the perl script is intended to talk to something else as well (a database backend by the look of it). The Perl tail related modules offer a variety of options for performing this, Also without the need to call tail or any piping (e.g. File::Tail::App, Event::File::Tail, IO::Tail and File::Tail::FAM all seem to be possibilities here)....
Regards,
- -- ============================================================================== I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. Bjarne Stroustrup ============================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHgi9GasN0sSnLmgIRArY2AJ0cUhYCyKrWKWCUVa67CjH8V1eyOgCfSKfj qR/LASpXQ8BwAN1M/sJ4UaA= =4fGS -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org