Re: [SLUG] Syslogd and klogd

From: Eben King (eben1@tampabay.rr.com)
Date: Thu May 13 2004 - 21:17:36 EDT


On Thu, 13 May 2004, Russell Hires wrote:

> > First guess is you could create a process which is something like
> >
> > tail -f $PIPE | grep -v $SOUND_MESSAGE >> kern.log
> >
> > and have syslogd write all relevant messages to $PIPE.
>
> But isn't that going backwards? I want to take those messages *out* of
> kern.log and syslog.

Yes, that's why I think "-v" might be relevant. Suppose the messages use
facility foo. Then you tell syslogd in /etc/syslog.conf

foo.* $PIPE

(I think I have the syntax right.)

> I would put the messages from kern.log, take them out, then rewrite
> kern.log.

I think that would be monstrously inefficient, if you intend to do it
continuously. If you're only going to do it on demand, no worries. Just
make sure you do something like "cat foo > kern.log" not "mv foo
kern.log", else syslogd will keep writing to the old kern.log and you
won't see new output.

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar
ARIES:  The look on your face will be priceless when you find that 40lb
watermelon in your colon.  Trade toothbrushes with an albino dwarf, then
give a hickey to Meryl Streep.  -- Weird Al, _Your Horoscope for Today_

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:15:06 EDT