[NTLUG:Discuss] RH7 not writing /var/log/messages
Neil Aggarwal
neil at JAMMConsulting.com
Mon Mar 5 18:09:10 CST 2001
Carl:
> Have you confirmed /etc/syslog.conf (or whatever syslog configuration file
> is named in /etc/rc.d/init.d/syslog) is intact, and is in fact requiring
> log entries?
The file /etc/rc.d/init.d/syslog contents are:
#!/bin/sh
#
# syslog Starts syslogd/klogd.
#
#
# chkconfig: 2345 12 88
# description: Syslog is the facility by which many daemons use to log \
# messages to various system log files. It is a good idea to always \
# run syslog.
# Source function library.
. /etc/init.d/functions
[ -f /sbin/syslogd ] || exit 0
[ -f /sbin/klogd ] || exit 0
RETVAL=0
umask 077
start() {
echo -n "Starting system logger: "
# we don't want the MARK ticks
daemon syslogd -m 0
RETVAL=$?
echo
echo -n "Starting kernel logger: "
daemon klogd
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/syslog
return $RETVAL
}
stop() {
echo -n "Shutting down kernel logger: "
killproc klogd
echo
echo -n "Shutting down system logger: "
killproc syslogd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/syslog
return $RETVAL
}
rhstatus() {
status syslogd
status klogd
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
rhstatus
;;
restart|reload)
restart
;;
condrestart)
[ -f /var/lock/subsys/syslog ] && restart || :
;;
*)
echo "Usage: syslog {start|stop|status|restart|condrestart}"
exit 1
esac
exit $?
The contents of /etc/syslog.conf are:
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none
/var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* /var/log/maillog
# Log cron stuff
cron.* /var/log/cron
# Everybody gets emergency messages, plus log them on another
# machine.
*.emerg *
# Save mail and news errors of level err and higher in a
# special file.
uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log
local.* /var/log/boot.log
> Also, is syslogd running (ps ax | grep syslogd)?
ps ax | grep syslogd give me:
# ps ax | grep syslogd
389 ? S 0:00 syslogd -m 0
925 pts/0 S 0:00 grep syslogd
So, it seems to be running, but I dont know about the configuration.
Thanks,
Neil.
--
Neil Aggarwal
JAMM Consulting, Inc. -- (972) 612-6056, http://www.JAMMConsulting.com
Custom Internet Development -- Java, JSP, servlets, databases
More information about the Discuss
mailing list