Patchwork [meta-oe,v2,2/3] systemd: enable logging to disk instead of tmpfs

login
register
mail settings
Submitter Koen Kooi
Date March 6, 2012, 9:22 a.m.
Message ID <1331025741-26216-2-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/22747/
State Accepted
Commit 81703d249df4d5e03808e9c6b219dd4b227df9c6
Headers show

Comments

Koen Kooi - March 6, 2012, 9:22 a.m.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta-oe/recipes-core/systemd/systemd_git.bb |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
Otavio Salvador - March 6, 2012, 11:59 a.m.
On Tue, Mar 6, 2012 at 06:22, Koen Kooi <koen@dominion.thruhere.net> wrote:
> +       # create dir for journal
> +       install -d ${D}${localstatedir}/log/journal

I am not against it creating the path for storing the logs but the
default configuration ought to use a memory buffer IMO.

What people think?

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
Andreas Müller - March 6, 2012, 12:21 p.m.
On Tue, Mar 6, 2012 at 12:59 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> On Tue, Mar 6, 2012 at 06:22, Koen Kooi <koen@dominion.thruhere.net> wrote:
>> +       # create dir for journal
>> +       install -d ${D}${localstatedir}/log/journal
>
> I am not against it creating the path for storing the logs but the
> default configuration ought to use a memory buffer IMO.
>
> What people think?
>
To make up mind: Which amount of memory do we expect per boot
approximately (uncompressed/compressed)?

Andreas
Andreas Müller - March 8, 2012, 5:15 p.m.
On Tue, Mar 6, 2012 at 1:21 PM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> On Tue, Mar 6, 2012 at 12:59 PM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
>> On Tue, Mar 6, 2012 at 06:22, Koen Kooi <koen@dominion.thruhere.net> wrote:
>>> +       # create dir for journal
>>> +       install -d ${D}${localstatedir}/log/journal
>>
>> I am not against it creating the path for storing the logs but the
>> default configuration ought to use a memory buffer IMO.
>>
>> What people think?
>>
> To make up mind: Which amount of memory do we expect per boot
> approximately (uncompressed/compressed)?
>
I played around with this a bit: After boot & starting GUI there is a
single file of ~600kB. After working with the system for few days the
contents of the folder grew up to ~40MB.

After reading journal design document [1] it seems that 'rotating'
scales with maximum size available.

My personal opinion: since RAM is most expensive prefer flash/disk as
default ( as Koen already pointed out this default can be simply
overridden by deleting /var/log/journal [2][3] )

so

Acked-by: Andreas Müller <schnitzeltony@googlemail.com>

Andreas

[1] https://docs.google.com/document/pub?id=1IC9yOXj7j6cdLLxWEBAGRL6wl97tFxgjLUEHIX3MSTs
[2] http://lists.linuxtogo.org/pipermail/openembedded-devel/2012-March/038427.html
[3] http://lwn.net/Articles/474968/
Otavio Salvador - March 8, 2012, 5:59 p.m.
On Thu, Mar 8, 2012 at 14:15, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> My personal opinion: since RAM is most expensive prefer flash/disk as
> default ( as Koen already pointed out this default can be simply
> overridden by deleting /var/log/journal [2][3] )

If this is the case, then let's make this patch ensure this works out
of box ... I do think most people will get full flash/disk without
knowing why.
Koen Kooi - March 9, 2012, 6:48 a.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 08-03-12 18:59, Otavio Salvador schreef:
> On Thu, Mar 8, 2012 at 14:15, Andreas Müller 
> <schnitzeltony@googlemail.com> wrote:
>> My personal opinion: since RAM is most expensive prefer flash/disk as 
>> default ( as Koen already pointed out this default can be simply 
>> overridden by deleting /var/log/journal [2][3] )
> 
> If this is the case, then let's make this patch ensure this works out of
> box ... I do think most people will get full flash/disk without knowing
> why.

We're working on it with the systemd people to see what is causing the
'runaway' logs.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAk9Zp9gACgkQMkyGM64RGpEdEQCgrvRjHfFYxa8ZSwi647xeQffa
47IAnR/aaqwUVbVBPiE5+XV7KtYcBrrA
=x8rX
-----END PGP SIGNATURE-----

Patch

diff --git a/meta-oe/recipes-core/systemd/systemd_git.bb b/meta-oe/recipes-core/systemd/systemd_git.bb
index 2b549a0..4a8e9a1 100644
--- a/meta-oe/recipes-core/systemd/systemd_git.bb
+++ b/meta-oe/recipes-core/systemd/systemd_git.bb
@@ -14,7 +14,7 @@  inherit gitpkgv
 PKGV = "v${GITPKGVTAG}"
 
 PV = "git"
-PR = "r18"
+PR = "r19"
 
 inherit useradd pkgconfig autotools vala perlnative
 
@@ -59,6 +59,9 @@  do_install() {
 
 	# provide support for initramfs
 	ln -s ${base_bindir}/systemd ${D}/init
+
+	# create dir for journal
+	install -d ${D}${localstatedir}/log/journal
 }
 
 python populate_packages_prepend (){