Trying to colour syslog-ng logs to ttyv7 but won't work after a
reboot
Ashley Moran
ashley.moran at codeweavers.net
Thu Sep 15 07:09:58 PDT 2005
I have a 5.4-STABLE server that I've reconfigured to use syslog-ng
instead of syslogd. It collects logs from all our servers and sorts
them into per-host folders.
Our network admin showed me his gentoo machine earlier which uses ccze
to colour log files as they scroll up the screen. He wanted a high-res
display with our whole network's logs scrolling in the background (as
much for the geek-porn factor as the usefulness).
After a lot of hacking and patching I managed to get the machine running
1024x768. I installed ccze, then modified syslog-ng.conf to use it as a
destination:
destination term { program("ccze -r > /dev/ttyv7"); };
I set syslog-ng to log all remote logs to this destination, and after
re-starting syslog-ng to reload the config, it worked fine. However,
for some reason way beyond me, it *will not work* after a reboot. I
have to restart syslog-ng after a reboot before it will log to the
virtual terminal.
Here is the startup script I created in /usr/local/etc/rc.d/syslog-ng.sh:
(the mountcritremote and cleanvar requirements I copied from the syslogd
file - I assume I want devfs to access /dev/ttyv7)
#!/bin/sh
#
# PROVIDE: syslogng
# REQUIRE: devfs mountcritremote cleanvar
# BEFORE: SERVERS
. /etc/rc.subr
name="syslogng"
rcvar=`set_rcvar`
required_files="/usr/local/etc/syslog-ng/syslog-ng.conf"
command="/usr/local/sbin/syslog-ng"
load_rc_config $name
run_rc_command "$1"
Maybe this is some subtle quirk of the boot process that I haven't
understood. Can anybody help?
Cheers
Ashley
More information about the freebsd-questions
mailing list