Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] syslog messages during boot not recorded?
@ 2013-04-08 16:30 Francesco Montorsi
  2013-04-08 16:38 ` Gustavo Zacarias
  0 siblings, 1 reply; 7+ messages in thread
From: Francesco Montorsi @ 2013-04-08 16:30 UTC (permalink / raw)
  To: buildroot

Hi all,
I'm using buildroot v10.11 on an embedded system running Linux kernel 
2.6.32.2.

I installed some daemons wrote by me which are started at boot time by some 
/etc/init.d scripts of mine. These daemons use many syslog() to provide 
verbose debugging messages... however, for some reason, when I boot the 
system and cat /var/log/messages, I do not see any message.
If I start manually the daemons, the messages are correctly logged to 
/var/log/messages... 

I think that this problem maybe because syslogd is startd AFTER all 
/etc/init.d scripts have been processed.. is that right?


I tried to comment the lines:

null::respawn:/sbin/syslogd -n -m 0
null::respawn:/sbin/klogd -n

contained in /etc/inittab and then to add the S01logging script found in 
this patch:
http://lists.busybox.net/pipermail/buildroot/2011-July/043828.html

but I obtained the same results... (of course my etc scripts start with S90, 
S91, etc, so they should run AFTER S01logging...)

Thanks for any hint!
Francesco

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] syslog messages during boot not recorded?
  2013-04-08 16:30 [Buildroot] syslog messages during boot not recorded? Francesco Montorsi
@ 2013-04-08 16:38 ` Gustavo Zacarias
  2013-04-08 16:51   ` Francesco
  0 siblings, 1 reply; 7+ messages in thread
From: Gustavo Zacarias @ 2013-04-08 16:38 UTC (permalink / raw)
  To: buildroot

On 04/08/2013 01:30 PM, Francesco Montorsi wrote:

> I installed some daemons wrote by me which are started at boot time by some 
> /etc/init.d scripts of mine. These daemons use many syslog() to provide 
> verbose debugging messages... however, for some reason, when I boot the 
> system and cat /var/log/messages, I do not see any message.
> If I start manually the daemons, the messages are correctly logged to 
> /var/log/messages... 
> 
> I think that this problem maybe because syslogd is startd AFTER all 
> /etc/init.d scripts have been processed.. is that right?

Hi.
Or maybe your busybox is configured to use the circular buffer (in RAM)
for logs (CONFIG_FEATURE_IPC_SYSLOG)... and you should just read your
logs with "logread"...
Regards.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] syslog messages during boot not recorded?
  2013-04-08 16:38 ` Gustavo Zacarias
@ 2013-04-08 16:51   ` Francesco
  2013-04-08 16:54     ` Gustavo Zacarias
  0 siblings, 1 reply; 7+ messages in thread
From: Francesco @ 2013-04-08 16:51 UTC (permalink / raw)
  To: buildroot

Hi,

2013/4/8 Gustavo Zacarias <gustavo@zacarias.com.ar>:
> Or maybe your busybox is configured to use the circular buffer (in RAM)
> for logs (CONFIG_FEATURE_IPC_SYSLOG)... and you should just read your
> logs with "logread"...
well, my buildroot is not the latest version... I'm using version
10.11 and I cannot see anything similar to IPC_SYSLOG in its
.config... maybe this is a feature of newer buildroots?

Thanks!
FM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] syslog messages during boot not recorded?
  2013-04-08 16:51   ` Francesco
@ 2013-04-08 16:54     ` Gustavo Zacarias
  2013-04-09  8:01       ` Francesco
  0 siblings, 1 reply; 7+ messages in thread
From: Gustavo Zacarias @ 2013-04-08 16:54 UTC (permalink / raw)
  To: buildroot

On 04/08/2013 01:51 PM, Francesco wrote:

> well, my buildroot is not the latest version... I'm using version
> 10.11 and I cannot see anything similar to IPC_SYSLOG in its
> .config... maybe this is a feature of newer buildroots?
> 
> Thanks!
> FM

It's a feature of BUSYBOX, not buildroot, meant for syslogd to work in
scenarios where your /var/log directory isn't writable for example.
Which begs the question, is it writable?
Regards.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] syslog messages during boot not recorded?
  2013-04-08 16:54     ` Gustavo Zacarias
@ 2013-04-09  8:01       ` Francesco
  2013-04-09  8:21         ` Francesco
  0 siblings, 1 reply; 7+ messages in thread
From: Francesco @ 2013-04-09  8:01 UTC (permalink / raw)
  To: buildroot

2013/4/8 Gustavo Zacarias <gustavo@zacarias.com.ar>:
> It's a feature of BUSYBOX, not buildroot, meant for syslogd to work in
> scenarios where your /var/log directory isn't writable for example.
> Which begs the question, is it writable?
good point... my /var/log is a symbolic link to /tmp and "ls -l" shows
that its permissions (after system boot) are "drwxrwxrwt".
I think the problem may be due to /tmp being mounted AFTER/AT THE END
of the system boot... in fact, /tmp is a tmpfs... the relevant line in
/etc/fstab is:

     tmpfs           /tmp           tmpfs    defaults          0      0

now my question is: how do I ensure that /tmp is mounted before
/etc/init.d scripts are run?

Thanks a lot!
Francesco

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] syslog messages during boot not recorded?
  2013-04-09  8:01       ` Francesco
@ 2013-04-09  8:21         ` Francesco
  2013-04-11 10:06           ` Francesco Montorsi
  0 siblings, 1 reply; 7+ messages in thread
From: Francesco @ 2013-04-09  8:21 UTC (permalink / raw)
  To: buildroot

In any case, something I do not understand is the reason why
/var/log/messages contains a lot of messages marked as "kernel: " and
referring to the boot of the system (hardware configuration, CPU
features, etc etc etc)... these messages are probably generated much
earlier than /etc/init.d scripts are run!

Thanks for any hint,
Francesco


2013/4/9 Francesco <francesco.montorsi@gmail.com>:
> 2013/4/8 Gustavo Zacarias <gustavo@zacarias.com.ar>:
>> It's a feature of BUSYBOX, not buildroot, meant for syslogd to work in
>> scenarios where your /var/log directory isn't writable for example.
>> Which begs the question, is it writable?
> good point... my /var/log is a symbolic link to /tmp and "ls -l" shows
> that its permissions (after system boot) are "drwxrwxrwt".
> I think the problem may be due to /tmp being mounted AFTER/AT THE END
> of the system boot... in fact, /tmp is a tmpfs... the relevant line in
> /etc/fstab is:
>
>      tmpfs           /tmp           tmpfs    defaults          0      0
>
> now my question is: how do I ensure that /tmp is mounted before
> /etc/init.d scripts are run?
>
> Thanks a lot!
> Francesco

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] syslog messages during boot not recorded?
  2013-04-09  8:21         ` Francesco
@ 2013-04-11 10:06           ` Francesco Montorsi
  0 siblings, 0 replies; 7+ messages in thread
From: Francesco Montorsi @ 2013-04-11 10:06 UTC (permalink / raw)
  To: buildroot

A few more results from my investigations: the absence of logged messages 
does not depend from the values of the facility/level options passed to 
openlog() or syslog() (apparently).
Moreover, a process started at boot time and doing periodic syslog() calls, 
will generate output in /var/log/messages at some point, but all its initial 
syslog() messages are lost.

At this point, I will write a syslog() wrapper to log to a file the messages 
I need, rather than rely on a working syslog() during boot :(

Francesco

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-04-11 10:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08 16:30 [Buildroot] syslog messages during boot not recorded? Francesco Montorsi
2013-04-08 16:38 ` Gustavo Zacarias
2013-04-08 16:51   ` Francesco
2013-04-08 16:54     ` Gustavo Zacarias
2013-04-09  8:01       ` Francesco
2013-04-09  8:21         ` Francesco
2013-04-11 10:06           ` Francesco Montorsi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox