You are not logged in.

#1 2012-12-13 12:43:51

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

journal size in systemd

I have put

SystemMaxUse=5M

in /etc/systemd/journald.conf and rebooted. However du -hs /var/log/journal still return 13M. How can it be? How systemd manage the disk usage?

Offline

#2 2012-12-13 13:42:59

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: journal size in systemd

Think there is a log size to set as well.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2012-12-13 14:56:58

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: journal size in systemd

There is a bug i think. Falconindy posted something on the systemd mailing list.

You are not alone in this.

Offline

#4 2012-12-13 15:00:18

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: journal size in systemd

http://lists.freedesktop.org/archives/s … 07585.html

Edit: and I do believe I'm correct about this.

Last edited by falconindy (2012-12-13 15:33:04)

Offline

#5 2012-12-14 00:18:08

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: journal size in systemd

falconindy wrote:

http://lists.freedesktop.org/archives/s … 07585.html

Edit: and I do believe I'm correct about this.

Have you filed a bug about it??

Anyone can do of course but you are technically competent, a contributor for sD (+you matter more than a random user) and you ll probably give more relevant info than a "Hey this doesn't work". Hence the question.

Offline

#6 2012-12-14 00:32:50

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: journal size in systemd

No, I haven't. Perhaps someone else already has.

Offline

#7 2012-12-20 01:34:59

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Offline

#8 2013-03-13 20:20:00

multixrulz
Member
Registered: 2005-04-05
Posts: 25

Re: journal size in systemd

Has this been resolved for anyone yet?  My journal also seems to grow without bound, although I have yet to see if journald respects the SystemKeepFree option.

[root@Server ~]# cat /etc/systemd/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
#RateLimitInterval=10s
#RateLimitBurst=200
SystemMaxUse=50M
SystemKeepFree=1500M
#SystemMaxFileSize=5M
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#MaxRetentionSec=
#MaxFileSec=1month
ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info

[root@Server ~]# journalctl --disk-usage
Journals take up 115.1M on disk.

It got up to around 250M before I deleted some very old journal files.

(BTW I did have SystemMaxFileSize=5M set but the doco claims that the default value is SystemMaxUse / 8 so I turned it off to see if that would help.)

Offline

#9 2013-03-13 22:33:54

the sad clown
Member
From: 192.168.0.X
Registered: 2011-03-20
Posts: 837

Re: journal size in systemd

What are the sizes of the individual journals?  Here are mine:

me, ~ » ls -l /var/log/journal/d0ef63e9960b4a46950abcf85e5018f4/
total 92M
4.2M -rw-r-----  1 root adm             4.2M Feb 23 22:49 system@0004d67127f60f4e-e942ee2d6b50ef8c.journal~
 13M -rw-r-----  1 root adm              13M Feb 27 10:59 system@0004d6b7b0e9da5e-613b563e7ac757a8.journal~
5.6M -rw-r-----  1 root adm             5.6M Mar  1 10:12 system@0004d6df452f9557-5c7535c0e4089a22.journal~
 45M -rw-r-----  1 root adm              45M Mar  9 12:00 system@0004d781b628a258-37c5012c07333dfd.journal~
4.4M -rw-r-----  1 root root            4.4M Mar 10 12:04 system@0004d7950ba9bd95-62496204a9631d59.journal~
4.3M -rw-r-----  1 root root            4.3M Mar 10 12:12 system@0004d795280d3cbf-02fe3bee59c0ec20.journal~
4.5M -rw-r-----  1 root systemd-journal 4.5M Mar 11 15:37 system@0004d7ac2391d6bc-c94c4dbdc09313c1.journal~
4.6M -rw-r-----  1 root systemd-journal 4.6M Mar 13 02:05 system@0004d7c9069926bb-962b20964b5c1002.journal~
4.3M -rw-r-----  1 root systemd-journal 4.3M Mar 13 17:05 system.journal
3.6M -rw-r-----+ 1 root adm             3.6M Feb 27 10:51 user-1000.journal

This would seem to indicate that there has been some sort of size control in effect since the logs only go back to Feb 23 and I've only used the defaults.  This isn't anywhere near the supposed 10% of filesystem limit default (I'm assuming that is calculated from the size of the partition and not the entire device, so it should be 19G=1.9G), so I'm not sure what to make of it.

edited for poor grammar and atrocious arithmetic.

Last edited by the sad clown (2013-03-13 22:35:40)


I laugh, yet the joke is on me

Offline

#10 2013-03-13 22:47:18

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: journal size in systemd

My journal doesn't grow without bound.
I have the shutdown hook in the initial ramdisk generated by mkinitcpio, and I use only:

SystemMaxUse=16M
ForwardToSyslog=no

as no default values in the /etc/systemd/journald.conf file.

The disk usage always is around 20M, which corresponds to one month of rotated log files.
But I don't clearly understand what exact procedure is playing here, ie using size or date parameters.
Happily I don't get corrupted log files and uncleanly closed ones (except after power failure).

This command may be used to force a rotation and cleanup of the journal log files:

# systemctl kill --kill-who=main --signal=SIGUSR2 systemd-journald.service

But definitely the journal should not grow without bound filling an entire file system.

Offline

#11 2013-03-14 14:04:10

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: journal size in systemd

multixrulz wrote:

Has this been resolved for anyone yet?  My journal also seems to grow without bound, although I have yet to see if journald respects the SystemKeepFree option.

The bug that falconindy opened hasn't been marked as fixed so probably nothing changed.

Offline

Board footer

Powered by FluxBB