SUMMARY: syslog problems

From: Dave Wreski (
Date: Thu Jan 14 1999 - 21:41:44 CST

Hi all. I asked a question regarding why the following command wouldn't
work with my /etc/syslog.conf:

# logger -p kern.debug test-info

It turns out that apparently logger can't generate a kern.debug message.
Also, after creating an /etc/syslog.conf that simply contains the
following line:

kern.debug /var/adm/messages

and starting '/usr/sbin/syslogd -d', no info was sent to the file. While
'dmesg' produced the desired results, the previous did not. I rebooted,
and it worked fine.

I have also worked on porting `logrotate' from my RH Linux box, and
another kind Solaris admin improved on my work. It uses a configuration
file, /etc/logrotate.conf, which allows you specify parameters such as:

# Compress log files after rotation

# Rotate daily

# Only rotate if greater than 500k
size 500k

As well as `functions' to define the specific properties of log files:

/var/adm/messages {
        size 100k
                ps -ef | grep syslogd | awk '{print $2}' | xargs kill -HUP

etc, etc... If you'd like a copy, point your browser to:

Perhaps you could mail me and mention you find it useful, and perhaps I'll
turn it into a package...

The following is a very effective /etc/syslog.conf file for me:

# /etc/syslog.conf -- This file controls the logging of system
# This typically is generated by the OS system daemons.
# January 11, 1999
# o A configuration entry is composed of two TAB seperated fields:
# selector action
# o A `selector' consists of `facility.level'. The levels available are,
# in ascending order of severity:
# (Least information)
# emerg - For panic conditions
# alert - Immediate attention necessary
# crit - Critical warnings, such as disk failure
# err - General error
# warning - Warning messages
# notice - Not error conditions, but require special
# attention
# info - Informational messages
# debug - Normally used when debugging problems
# (Most information)
# none - Disable a particular facility
# o See the man page for syslog.conf(4) for a description of facility and
# level. See syslogd(1M) for instructions on using the daemon.
# o These files must already exist, as they will not automatically be
# created.
# This is currently configured to log notice level or higher. See also
# the /etc/logrotate.conf file for information on rotating logs
# These control the types of log data this host controls. Change from
# `undefine' to `define' in order to enable.

# Send another copy of all data to normal /var/adm/messages file.
*.err;kern.debug;daemon.notice;mail.crit;user.none /var/adm/messages

# Log all kernel messages to the console.
kern.notice /dev/console
# Log all kernel events, including NFS and other network problems,
# driver info, serious kernel problems, etc.
kern.debug /var/log/kern.log

# Keep track of all mail sent and retrieved by this system. /var/log/mail.log

# Log daemon problems and events, such as POP, telnet, ftp, etc.

# Send all POP mail requests to a seperate file.
# If the POPLOG environment variable is defined, data will go to the
# /var/log/POP.log file, otherwise local0.debug data will go to the
# /var/log/debug.log file.
# Define POPLOG=1 at the top of this file to enable this feature

# Log all authentication and other security events, including failed
# login, su attempts, getty, etc /var/log/auth.log

# Messages generated by user processes /var/log/user.log

# Log all cron events, and especially watch for failures /var/log/cron.log

# Everyone should get a copy of emergency messages
*.emerg *

# Save mail, news, and lpr messages of level err or higher
uucp.err;lpr.err;news.err /var/log/spooler.log

# Uncomment this line for full debugging. This is useful for
# difficult problems
#*.debug /var/log/debug.log

Thanks to:

Shaun O'Connor <>
Stephen Harris <>
Francois Leclerc <>
Benedetto Lo Giudice <>
Casper Dik <casper@holland.Sun.COM>
(Thomas Anders) <>
Arthur Rossiter <>

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:14 CDT