|
How do I view syslog without tail? |
|
|
|
|
Written by Oliver Wainwright, Jr. - RHCE
|
|
Monday, 03 July 2006 |
|
Most Linux distros are configured by default to support up to six
virtual consoles (VC). VC can be accessed via CTRL-ALT F1 - F12. The F1
thru F12 represent the VC number.
Adding an entry to /etc/syslog.conf, can direct syslogd to
send log output to a virtual console in addition to or instead of a log
file.
Example /etc/syslog.conf:
# Syslog messages spooled to logfile and displayed in VC 12 at syslogd
startup
*.* /var/log/messages
*.* /dev/tty12
Syslogd will have to be restarted after any changes are made to the
configuration file. In Redhat or Fedora run "service syslog
restart". Syslog output has been redirected to VC 12 (CTRL-ALT
F12).
This technique of redirecting output to a console can be useful for
ther commands as well. I use the following for troubleshooting with
tcpdump:
tcpdump -n -i eth0 > /dev/tty11 &
Tcpdump output has been redirected to VC 11 (CTRL-ALT F11).
|
|
Last Updated ( Sunday, 03 December 2006 )
|