SPUG: /var/log/messages

Chris Wilkes cwilkes-spug at ladro.com
Thu May 30 18:04:36 CDT 2002


On Thu, May 30, 2002 at 02:59:43PM -0700, Mikel Tidwell wrote:
> 
> The example I have is when the mysql watching script finds the service hung
> (on a remote machine), it would write an error to /var/log/messages, and
> then someone would get paged about the message.  This made more sense to me
> than duplicating the process already in place.
> 
> So, how would all the gurus here recommend dealing with /var/log/messages?
> Do I treat it like a typical file, use a call to syslog somehow, or is this
> just a bad idea all together?  Thanks for your continued help. :>

Use Sys::Syslog to 'write' to syslog and let the OS handle putting it in
/var/log/messages.

For your pager app, look at File::Tail to look at the file or I would
build it into the script that's writting it out to the log file.

Chris

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list