You are not logged in.

#1 2014-03-15 11:20:48

theking2
Banned
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 372

Size of systemd journal

Hi!

As one of my Archs sits on a rather small SSD I'm concerned about space. The system in question is a NAS that is on 365*7*24. I've found out that systemd generates quite some (nice) journal logs. But in my case i'm really not interested in what happened longer than a few weeks ago. I've found however that /var/log/journal is close to 250MB yet the settings in journal.conf should confine it to a much smaller value. As the journal.conf settings are quit obtuse certainly how they interact I'm a bit lost here. This is my journal.conf

/etc/systemd/journal.conf


[Journal]
Storage=auto
#Compress=yes
#Seal=yes
#SplitMode=login
#RateLimitInterval=10s
#RateLimitBurst=200
SystemMaxUse=10M
SystemMaxFileSize=1M
MaxRetentionSec=100 day
MaxFileSec=1 week
ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info

I assumed that by setting SystemMaxUse to 10M not more that 10M will be used by systemd. Or am I mistaken?

What would be the settings to only keep 2 weeks of log in all log files?


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#2 2014-03-15 11:46:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Size of systemd journal

The filename should be /etc/systemd/journald.conf.

Offline

#3 2014-03-15 11:46:57

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Size of systemd journal

Shouldn't that be journald.conf, not journal.conf? Have you looked at man journald.conf?

Offline

#4 2014-03-15 13:41:41

theking2
Banned
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 372

Re: Size of systemd journal

Thanks for responding and sorry to have confused you there. Yes, the file is called journald.conf not journal.conf. I made a typo in my message.

How can I reduce the size to only keep 2 weeks worth of logging. It seems that the documentation is not accurate (having specified a 10M systemmaxuse and over 240M of journal log)


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#5 2014-03-15 13:46:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Size of systemd journal

What's the output of 'sudo journalctl --disk-usage'?

Offline

#6 2014-03-15 14:16:16

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: Size of systemd journal

Old thread about this issue:
https://bbs.archlinux.org/viewtopic.php?pid=1201128

Last edited by teateawhy (2014-03-15 14:17:25)

Offline

#7 2014-03-15 14:21:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Size of systemd journal

I think the issue has been resolved: https://bbs.archlinux.org/viewtopic.php … 8#p1350008

Offline

#8 2015-01-03 13:07:25

theking2
Banned
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 372

Re: Size of systemd journal

# journalctl --disk-usage
Archived and active journals take up 16.0M on disk.

archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#9 2015-01-04 00:51:34

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Size of systemd journal

Sooo ... is it solved?

Offline

#10 2015-01-18 14:56:10

theking2
Banned
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 372

Re: Size of systemd journal

karol wrote:

What's the output of 'sudo journalctl --disk-usage'?

# sudo journalctl --disk-usage
Archived and active journals take up 12.0M on disk.

journald.conf

[Journal]
Storage=auto
#Compress=yes
#Seal=yes
#SplitMode=login
#RateLimitInterval=10s
#RateLimitBurst=200
SystemMaxUse=1M
RuntimeMaxUse=1M
SystemMaxFileSize=1M
MaxRetentionSec=100 day
MaxFileSec=1 week
ForwardToSyslog=yes
#ForwardToKMsg=no
#ForwardToConsole=no
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info

12M > 1M

Last edited by theking2 (2015-01-18 14:58:34)


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#11 2015-01-18 17:08:24

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: Size of systemd journal

Do you maybe have leftover files (files with a tilde, "~") under /var/log/journal/<some_hash>/... ?

It's mentioned in the thread linked in post #6.


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#12 2015-01-18 17:52:17

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Size of systemd journal

theking2 wrote:

12M > 1M

You have to wait until the old journal files get removed or do it yourself.

Offline

#13 2015-03-15 07:35:53

cb474
Member
Registered: 2009-04-04
Posts: 469

Re: Size of systemd journal

What is a reasonable size to set for the "SystemMaxUse" line in journald.conf?

I see people mentioning various sizes (16M, 50M), but have not seen any comments about whether those are reasonable limits?

And are there any downsides to a setting that's too small? Is there any rule of thumb for what one might want the limit to be?

Offline

#14 2015-03-15 08:52:37

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Size of systemd journal

cb474 => Please don't hijack threads. Start your own, it's free wink

Closing.

Offline

Board footer

Powered by FluxBB