[Techtalk] Tip of the Day (watching your logs)

Conor Daly conor.daly at oceanfree.net
Sun Apr 20 08:55:37 EST 2003

I like to be able to watch my system logs from time to time.  I have them
display on tty10, tty11, tty12 so I can watch them with a <CTRL><ALT><F10>
etc.  tty12 has all of the logged messages, tty11 has kernel messages and
tty10 has sshd messages.  

To set it up, edit /etc/syslog.conf thus:

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none				/var/log/messages
*.info;mail.none;authpriv.none                          /dev/tty12

# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*							/dev/console
kern.*                                                  /dev/tty11

# Log sshd messages to sshd.log
local5.*						/var/log/sshd.log
local5.*						/dev/tty10

You also need to edit /etc/ssh/sshd_config to turn on logging:

# Logging
SyslogFacility LOCAL5

service sshd restart 	# to enable local5 logging
service syslog restart	# to start logging to the ttys

That's it!

Happy log watching...

Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
  8:47am  up 30 days, 14:23,  0 users,  load average: 0.00, 0.00, 0.00
  8:46am  up 30 days, 14:22,  1 user,  load average: 0.15, 0.04, 0.01

More information about the Techtalk mailing list