[PLUG] Restart a 'hung'(?) process
Roderick A. Anderson
raanders at acm.org
Wed Mar 2 23:32:38 UTC 2005
On Wed, 2 Mar 2005, Michael Rasmussen wrote:
> What about having your log information sent to a pipe and having the log watch
> program monitor that?
Damn I hate it when someone has to jog my memory. I knew of this type of
process but must of had to remember something new so I did a brain flush
... :-)
> For example in /etc/syslog.conf modify like:
> authpriv.* /var/log/secure
> authpriv.* |/var/log/logpipe
Syslog will allow multiple 'log-to' lines? Cool. I've never seen this
mentioned.
> then have colorize monitor logpipe
>
> create logpipe with `mkfifo /var/log/logpipe`
>
> You don't fill up space with the pipe so you don't need to log rotate
> it. The log rotation won't affect your monitoring process. No need to
> hup or whatever.
>
> Did you initially say that colorize was a Perl thing? You could edit the code to
> install whatever signal handler you'd like...
Yup perl , but as much as I love it I'm still working at learning it
better. I'll check out CPAN and pull the Camel from the bookshelf. Still
I really like the pipe idea. Seems more old-time *N*X.
Rod
--
"Open Source Software - You usually get more than you pay for..."
"Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"
More information about the PLUG
mailing list