From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] log storage strategy
Date: Thu, 05 Mar 2015 23:08:18 +0100 [thread overview]
Message-ID: <54F8D3D2.1030102@mind.be> (raw)
In-Reply-To: <CAK9TtU1zZpPYOf_B695CkRRzHbVc46diwihTpKs9O4QrJmczJg@mail.gmail.com>
On 05/03/15 10:30, Sylvain LG wrote:
> Hello,
>
> many services like to write log files.
>
> I suppose that it could be a problem on an embedded device, since space is
> limited and NAND has write limitation in time.
>
> What is the correct strategy to deal with log?
There is no single strategy that will work for everybody.
Often the logs are put in a tmpfs so they are never committed to NAND. But then
of course you loose them when the system reboots.
If you do write to flash, with a decent wear-levelling filesystem the write
limit is not necessarily a problem, especially if you enable some write
buffering (which defaults to 5-30 secs anyway, cfr. sysctl
vm.dirty_writeback_centisecs and vm.dirty_expire_centisecs) and rate limiting
(rsyslogd and journald have controls for that).
And finally, you'll have to clean up old logs. You can use logrotate, or the
built-in rotation in rsyslogd and journald.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
prev parent reply other threads:[~2015-03-05 22:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 9:30 [Buildroot] log storage strategy Sylvain LG
2015-03-05 22:08 ` Arnout Vandecappelle [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54F8D3D2.1030102@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.