[NCLUG] /var/log/message to console...

Gary Rogers garyr at dmin.net
Tue Jun 12 18:59:46 MDT 2001


On a different note, does anyone know if it's possible to define 'tail
/var/adm/SYSLOG' (or your syslog location of choice) as the default program
for a TTY? I seem to rememer that you could do it with SAF under Solaris,
but haven't the slightest of where it start on Linux, other than maybe man
tty.

g:wq
----- Original Message -----
From: "Michael Dwyer" <mdwyer at sixthdimension.com>
To: <nclug at nclug.org>
Sent: Tuesday, June 12, 2001 9:45 AM
Subject: Re: [NCLUG] /var/log/message to console...


> > I've got a window into which I "tail -f | logcolorise" the
> > contents of /var/log/messages. This works until the log gets
> > rotated, and then it silently fails. I can fix it with a
> > more complicated solution that periodically reopens the
> > file and cats that to logcolorise, but I'm wondering if
> > someone else has already done the work. I see a lot of
> > screenshots with message log screens, so presumably other
> > people are working on this vexing problem.
>
> When the log-rotator hits them, it closes the files, and
> hups the daemons.  They then open up fresh files with new
> file descriptors (usually).  Tail is no longer tailing the
> right file descriptor.  What you might do is just add the
> tail -f | logcolorize >/dev/tty7
> line to the log-rotate scripts, so it always starts a
> new one after a hup...  Look for the logrotate.d directory
> in /etc, I think.
>
> For a more /complicated/ solution, you can add a line in your
> /etc/syslog.conf file that sends all logs, regardless, through
> some pipe.  I'm not sure it would work, and there are surely
> reasons /not/ to do it, but it would probably do exactly what
> you really want it to do...
>
>
>
>
>
> _______________________________________________
> NCLUG mailing list
> NCLUG at nclug.org
> http://www.nclug.org/mailman/listinfo/nclug
>




More information about the NCLUG mailing list