You are not logged in.

#1 2013-07-01 01:13:29

nbtrap
Member
Registered: 2011-02-24
Posts: 110

[SOLVED] Systemd journal not preserved through reboot

It appears that my journal in /var/log/journal is being flushed just before reboot. Every time I view the journal with the --all flag, the furthest back I can go is to right before the last reboot or power-off. Moreover, my /var/log/journal directory seems incapable of growing bigger than 2.6Mb or so, even though I have the journal configured to max out at 50Mb.

Here's my /etc/journald.conf:

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# See journald.conf(5) for details

[Journal]
Storage=auto
#Compress=yes
#Seal=yes
#SplitMode=login
#SyncIntervalSec=5m
#RateLimitInterval=10s
#RateLimitBurst=200
SystemMaxUse=50M
#SystemKeepFree=
#SystemMaxFileSize=
#RuntimeMaxUse=500M
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=yes
#ForwardToKMsg=no
#ForwardToConsole=no
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info

Any ideas?

Last edited by nbtrap (2013-07-01 10:10:47)

Offline

#2 2013-07-01 01:31:26

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [SOLVED] Systemd journal not preserved through reboot

How much free space do you have on the partition housing /var? journal is limited by that, as well.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2013-07-01 01:34:05

nbtrap
Member
Registered: 2011-02-24
Posts: 110

Re: [SOLVED] Systemd journal not preserved through reboot

cfr wrote:

How much free space do you have on the partition housing /var? journal is limited by that, as well.

Currently 692M. It's not much, but the journal used to take up too much space, which is why I limited it to 50M.

Offline

#4 2013-07-01 02:19:36

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [SOLVED] Systemd journal not preserved through reboot

Check the man pages. It is limited by default to a particular percentage of the partition.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2013-07-01 02:23:09

nbtrap
Member
Registered: 2011-02-24
Posts: 110

Re: [SOLVED] Systemd journal not preserved through reboot

cfr wrote:

Check the man pages. It is limited by default to a particular percentage of the partition.

The defaults are proportions of the entire filesystem, not just its free space. And in any case, I set SystemMaxUse explicitly.

Offline

#6 2013-07-01 02:34:26

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [SOLVED] Systemd journal not preserved through reboot

Also of free space and that will trump SystemMaxUse. I know because it happens on my system. As /var fills, systemd keeps smaller persistent journal records.

EDIT:

SystemMaxUse= and RuntimeMaxUse= control how much disk space the
           journal may use up at maximum. Defaults to 10% of the size of the respective file system.  SystemKeepFree= and
           RuntimeKeepFree= control how much disk space the journal shall always leave free for other uses if less than the disk space
           configured in SystemMaxUse= and RuntimeMaxUse= is available. Defaults to 15% of the size of the respective file system.
           SystemMaxFileSize= and RuntimeMaxFileSize= control how large individual journal files may grow at maximum.

Strictly speaking this seems inaccurate, though. You have more than the value of SystemMaxUse available so SystemKeepFree should not apply. However, it does.

Last edited by cfr (2013-07-01 02:41:22)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#7 2013-07-01 02:40:24

nbtrap
Member
Registered: 2011-02-24
Posts: 110

Re: [SOLVED] Systemd journal not preserved through reboot

cfr wrote:

Also of free space and that will trump SystemMaxUse. I know because it happens on my system. As /var fills, systemd keeps smaller persistent journal records.

I hope you're right. I now have several gigabytes of free space thanks to pacman -Sc. We'll see what happens.

Offline

#8 2013-07-01 02:47:45

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Systemd journal not preserved through reboot

Instead of -Sc'ing it, you should learn how to use paccache.  It gives much finer grained control over how much you throw out.

Offline

#9 2013-07-01 10:10:24

nbtrap
Member
Registered: 2011-02-24
Posts: 110

Re: [SOLVED] Systemd journal not preserved through reboot

cfr wrote:

Strictly speaking this seems inaccurate, though. You have more than the value of SystemMaxUse available so SystemKeepFree should not apply. However, it does.

I thought so too. But anyway, clearing up some space did work.

Offline

Board footer

Powered by FluxBB