Re: syslogd and pipe to email

2005-05-31 Thread Danny Howard

Jim Pazarena wrote:


I would rather have a script which waits at least 30 seconds
before terminating rather than after one line, because some
of the records I am looking for are multi-line, and I'm not
sure if a script can be made to timeout. 


Jim,

Even without setting up some sort of fancy interrupt thing, of course 
you can get a script to time out.


In fact, I think you'd WANT the script to time out, even if it was 
getting input from syslog, because if syslog were spewing warning 
messages, you'd want the script to let go and send its warnings.


Script would look something like:
to=30
while( to  0 )
   output .= STDIN
   sleep 1
   to--
do send-email

Cheers,
-danny

--
http://dannyman.toldme.com/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


syslogd and pipe to email

2005-05-30 Thread Jim Pazarena

I would like to email some kernel.warning messages
to myself via the pipe action in syslog.conf, but I'm
getting hung up on the fact that the pipe stays open
(unless I HUP syslogd).

The man page suggests that a script wrapper can be
written to capture one line output and exit, but I wonder
if there is any other method, such as an option/flag
I am missing to terminate the pipe after, say, 30 seconds?
I would rather have a script which waits at least 30 seconds
before terminating rather than after one line, because some
of the records I am looking for are multi-line, and I'm not
sure if a script can be made to timeout.

TIA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]