OpenVZ Forum


Home » General » Support » syslog not working in VPS (Some system messages are not shown in /var/log/messages nor dmesg)  () 1 Vote
Re: syslog not working in VPS [message #39918 is a reply to message #39902] Wed, 23 June 2010 14:34 Go to previous messageGo to previous message
khorenko is currently offline  khorenko
Messages: 533
Registered: January 2006
Location: Moscow, Russia
Senior Member
Hi,

you need to do several things in order to collect messages inside a Container:

1) install klogd. In my case it was a part of "sysklogd" package and was not installed by default.

[root@dhcp-10-30-19-35 run]# rpm -qf `which klogd`
sysklogd-1.4.1-46.el5
[root@dhcp-10-30-19-35 run]# cat /etc/*rele*
CentOS release 5.4 (Final)


2) "syslog" is hacked not to start klogd, so you need to revert the hack.

--- /etc/init.d/syslog.log      2010-06-23 18:22:06.000000000 +0400
+++ /etc/init.d/syslog  2010-06-23 18:22:39.000000000 +0400
@@ -38,14 +38,14 @@ start() {
        RETVAL=$?
        echo
        echo -n $"Starting kernel logger: "
-       passed klogd skipped #daemon klogd $KLOGD_OPTIONS
+       daemon klogd $KLOGD_OPTIONS
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/syslog
        return $RETVAL
 }
 stop() {
        echo -n $"Shutting down kernel logger: "
-       passed klogd skipped #killproc klogd
+       killproc klogd
        echo
        echo -n $"Shutting down system logger: "
        killproc syslogd
@@ -56,7 +56,7 @@ stop() {
 }
 rhstatus() {
        status syslogd
-       #status klogd
+       status klogd
 }
 restart() {
        stop


Why it was done so?:
it was done historically in order to maximize the performance: on the one hand you'd better run syslog because it collects a lot of logs from userspace applications, on the other hand messages from kernel most often are useless inside a Container.

Hope that helps.

--
Konstantin


If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: VZ Kernel Recognizing HD's as IDE?
Next Topic: Can I install OpenVZ *without Console access* ?
Goto Forum:
  


Current Time: Fri Sep 27 14:16:52 GMT 2024

Total time taken to generate the page: 0.04252 seconds