You are not logged in.

#1 2015-09-13 11:27:32

unknwn
Member
Registered: 2008-02-02
Posts: 35

journalctl log file size

Hello,

I have below values in /etc/systemd/journald.conf

[Journal]
SystemMaxUse=50M
SystemMaxFileSize=10M

However journalctl --disk-usage gives:

Archived and active journals take up 88.0M on disk.

du -sh /var/log/journal:

89M	/var/log/journal.

Also I cannot manually clean up the log with journalctl --vacuum-size=10M which gives:

Vacuuming done, freed 0B of archived journals on disk.

How to adjust the maximum log file size or clean the log manually? Thanks.

Last edited by unknwn (2015-09-13 11:28:41)

Offline

#2 2015-09-13 12:20:24

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: journalctl log file size

By any chance, there are corrupted files in your journal corrupted? Can you please post the output of the following commands?

$ journalctl --verify
$ journalctl -b -u systemd-journald

Last edited by mauritiusdadd (2015-09-13 12:20:48)


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#3 2015-09-13 12:48:06

unknwn
Member
Registered: 2008-02-02
Posts: 35

Re: journalctl log file size

$ journalctl --verify
PASS: /var/log/journal/052fcaef9eb749a88e906e27e176bae2/system.journal
PASS: /var/log/journal/052fcaef9eb749a88e906e27e176bae2/user-1000.journal
$ journalctl -b -u systemd-journald
-- No entries --

Offline

#4 2015-09-13 12:50:33

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: journalctl log file size

Also bear in mind that vacuuming only works on archived journal files, not active ones.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#5 2015-09-13 13:41:55

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: journalctl log file size

And what does systemctl say?

$ systemctl status systemd-journald.service

and also post the output of

$ ls -lah /var/log/journal/052fcaef9eb749a88e906e27e176bae2/

Last edited by mauritiusdadd (2015-09-13 13:42:04)


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#6 2015-09-13 18:51:22

unknwn
Member
Registered: 2008-02-02
Posts: 35

Re: journalctl log file size

$ systemctl status systemd-journald.service
● systemd-journald.service - Journal Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-journald.service; static; vendor preset: disabled)
   Active: active (running) since Sun 2015-09-13 14:15:00 EEST; 7h ago
     Docs: man:systemd-journald.service(8)
           man:journald.conf(5)
 Main PID: 154 (systemd-journal)
   Status: "Processing requests..."
   CGroup: /system.slice/systemd-journald.service
           └─154 /usr/lib/systemd/systemd-journald

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

it seems log size decreased, althought I didn't change anything:

$ ls -lah /var/log/journal/052fcaef9eb749a88e906e27e176bae2/
total 17M
drwxr-sr-x+ 2 root systemd-journal 4.0K Sep 13 15:39 .
drwxr-sr-x+ 4 root systemd-journal 4.0K Sep 10 00:40 ..
-rw-r-----+ 1 root systemd-journal 8.0M Sep 13 21:45 system.journal
-rw-r-x---+ 1 root systemd-journal 8.0M Sep 13 21:46 user-1000.journal

Last edited by unknwn (2015-09-13 18:51:53)

Offline

#7 2015-09-13 19:25:56

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: journalctl log file size

Well, it seems that journald respects all the rules you have imposed: your persistent journal files occupy about 16M which respects the rule SystemMaxUse=50M and each journal file has a size of about 8M, which respects the rule SystemMaxFileSize=10M. Does journalctl reports a lower disk usage too, now?


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#8 2015-09-13 20:18:05

unknwn
Member
Registered: 2008-02-02
Posts: 35

Re: journalctl log file size

It does:

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

The confusing part was that it took a few restarts until journald started to respect the rules.

Offline

Board footer

Powered by FluxBB