syslogd/klogd problem on CentOS4.3

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
jeffliu
Posts: 1
Joined: 2006/08/22 03:44:06

syslogd/klogd problem on CentOS4.3

Post by jeffliu » 2006/08/22 03:47:31

Hi all,

I have installed a CentOS4.3 box and migrated some application from
FC1 to the new box, everything else runs perfectly except
syslogd/klogd.

/etc/rc.d/init.d/syslog starts without any problem, but there is
nothing logged into /var/log/messages, even I restart the service.
However, I tried to shut the service down and run "syslogd -m 0 &" and
"klogd -x &" as root from shell, it works good.

I have spent a lot of time, but still can not figure out why it does
not work when starts by init as a daemon.

Anybody had the same issue before? Any suggestion is highly appreciated.

Thanks,
Jeff L

webasdf
Posts: 1
Joined: 2009/02/18 18:58:12

Re: syslogd/klogd problem on CentOS4.3

Post by webasdf » 2009/02/18 19:14:38

I just had the exact same problem this morning. After researching klogd and syslogd, I ended up editing my /etc/init.d/syslog file. There I found:

[code]
...
start() {
...
echo -n $"Starting kernel logger: "
passed klogd skipped # klogd $KLOGD_OPTIONS
...
stop() {
echo -n $"Shutting down kernel logger: "
passed klogd skipped # killproc klogd
...
[/code]

I simply uncommented the klogd statement inside the start procedure and commented out the passed klogd statement. Also did something similar in the stop procedure....Ended up with the following:

[code]
...
start() {
...
echo -n $"Starting kernel logger: "
klogd $KLOGD_OPTIONS
## passed klogd skipped
...
stop() {
echo -n $"Shutting down kernel logger: "
killproc klogd
##passed klogd skipped
...
[/code]


I also had to turn on kernel logging in /etc/syslog.conf

[code]
...
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;kern.*;mail.none;authpriv.none;cron.none /var/log/messages
...
[/code]


Then, of course, I did a service syslog restart. I suspect this is part of the default image from our virtual hosting provider. Anyway, it now works! Now I see kernel logs in /var/log/messages. Hope this helps.

Post Reply

Return to “CentOS 4 - Server Support”