syslog basic querry

Wolfgang Denk wd at denx.de
Wed Dec 28 09:05:53 UTC 2005


Dear Alfred,

in message <29f916510512271831x5e822bet68cbca3382bfd779 at mail.gmail.com> you wrote:
> 
> Thanks for tip on unchanged-stats, it's exactly what I was looking for.
> May be i will patch busybox tail for it, should be helpful patch IMHO.

I'm glad I was able to help.

> pramfs from it's web page looked like meant for NVRAM based logging ?

If you have NVRAM then a pramfs file system can survive even a  power
failure.  If  you  just  have to deal with crashes / resets / reboots
(including such resets that are initiated  by  a  hardware  watchdog)
then  you  can  use  a reserved area in system RAM to create a pramfs
file system - the data will be available as long as power is supplied
to the system.

> I didnt quite fully get u-boot thing you pointed.

U-Boot supports a log buffer  (allocated  typically  at  the  end  of
physical RAM) which uses the same format and data structures like the
Linux  syslog buffer. With a small patch to the Linux kernel this log
buffer can be preserved and used by Linux, too (instead of allocating
a new buffer). That means that:

1 - you can use standard Linux syslog facilities to read and  process
    log  messages  (like  results from your POST code) created by the
    boot loader

2 - you can read the Linux syslog buffer after a reset / crash from
    U-Boot
    
> If I understand it well, that you are saying that u-boot can be told
> to leave out an area of RAM (from clearing / init'ing it ?)  ? and so
> memory snapshot will be retained across boots ?

Correct.

> This  should work across processor generated resets .. But, will it
> fail if say there has been an external reset pin triggered. External
> button reset will send reset / power cycle not only processor but also
> all peripherals ?

Reset is fine, no matter if it's caused by a soft reboot  or  a  hard
reset. You will lose the log buffer when power cycling, though.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Witch!  Witch!  They'll burn ya!
	-- Hag, "Tomorrow is Yesterday", stardate unknown



More information about the busybox mailing list