You are not logged in.

#1 2015-06-25 22:53:55

joseribeiro
Member
Registered: 2013-02-17
Posts: 73

Systemd, journal: Vacuuming problem

The journalctl's vacuum option is not working on my system:

[user@hostname ~]$ journalctl --disk-usage 
Archived and active journals take up 72.1M on disk.

[user@hostname ~]$ journalctl --vacuum-size=35M 
Vacuuming done, freed 0B of archived journals on disk.

[user@hostname ~]$ journalctl --disk-usage 
Archived and active journals take up 72.3M on disk.

Anyone knows how to fix this?

Last edited by joseribeiro (2015-06-25 22:55:12)

Offline

#2 2015-06-25 23:35:21

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

Re: Systemd, journal: Vacuuming problem

man journalctl wrote:

Note that running --vacuum-size= has only indirect effect on the output shown by --disk-usage as the latter includes active journal files, while the former only operates on archived journal files.

Post the output of

ls -l /var/log/journal/

Offline

#3 2015-06-25 23:37:24

joseribeiro
Member
Registered: 2013-02-17
Posts: 73

Re: Systemd, journal: Vacuuming problem

[user@hostname ~]$ ls -l /var/log/journal/
total 0
drwxr-sr-x+ 1 root systemd-journal 62 Jun 21 18:58 6c29f1847ffc4dec8bb52a174fd5d862

Last edited by joseribeiro (2015-06-25 23:37:43)

Offline

#4 2015-06-26 01:02:39

mrlamud
Member
Registered: 2014-09-27
Posts: 105

Re: Systemd, journal: Vacuuming problem

joseribeiro wrote:

The journalctl's vacuum option is not working on my system:

[user@hostname ~]$ journalctl --disk-usage 
Archived and active journals take up 72.1M on disk.

[user@hostname ~]$ journalctl --vacuum-size=35M 
Vacuuming done, freed 0B of archived journals on disk.

[user@hostname ~]$ journalctl --disk-usage 
Archived and active journals take up 72.3M on disk.

Anyone knows how to fix this?

You're messing with file under root directory,  you can read but not write or modify it without the root privilege.

Offline

#5 2015-06-26 09:00:13

Spider.007
Member
Registered: 2004-06-20
Posts: 1,176

Re: Systemd, journal: Vacuuming problem

Interesting; when I try the same commands; it says "Permission denied", I wonder why you're not getting that? Is your system up to date?

Offline

#6 2015-06-26 12:59:54

joseribeiro
Member
Registered: 2013-02-17
Posts: 73

Re: Systemd, journal: Vacuuming problem

mrlamud wrote:

You're messing with file under root directory,  you can read but not write or modify it without the root privilege.

I get the same result with superuser permission. Look:

[user@hostame ~]$ sudo journalctl --disk-usage
Archived and active journals take up 72.1M on disk.

[user@hostame ~]$ sudo journalctl --vacuum-size=35M
Vacuuming done, freed 0B of archived journals on disk.

[user@hostame ~]$ sudo journalctl --disk-usage
Archived and active journals take up 72.3M on disk.
Spider.007 wrote:

Interesting; when I try the same commands; it says "Permission denied", I wonder why you're not getting that? Is your system up to date?

Yes.

Last edited by joseribeiro (2015-06-26 13:00:58)

Offline

#7 2015-06-27 10:04:54

Spider.007
Member
Registered: 2004-06-20
Posts: 1,176

Re: Systemd, journal: Vacuuming problem

Okay, show us what `ls -l /var/log/journal/*/` outputs, maybe there are files that journalctl counts but ignores when vacuuming?

Offline

#8 2015-06-27 12:25:38

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

Re: Systemd, journal: Vacuuming problem

Is it related to:

Note that running --vacuum-size= has only indirect effect on the output shown by --disk-usage as the latter includes active journal files, while the former only operates on archived journal files.

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

Offline

#9 2015-06-27 16:11:55

joseribeiro
Member
Registered: 2013-02-17
Posts: 73

Re: Systemd, journal: Vacuuming problem

Spider.007 wrote:

Okay, show us what `ls -l /var/log/journal/*/` outputs, maybe there are files that journalctl counts but ignores when vacuuming?


Here is the output:

 $ ls -l /var/log/journal/*/
total 16388
-rw-r-x---+ 1 root systemd-journal 8388608 Jun 27 16:43 system.journal
-rw-r-x---+ 1 root systemd-journal 8388608 Jun 27 17:10 user-1000.journal

Offline

#10 2015-07-01 23:15:27

joseribeiro
Member
Registered: 2013-02-17
Posts: 73

Re: Systemd, journal: Vacuuming problem

I've recreated /var/log/journal:

Now I have this:

$ ls -1s /var/log/journal/*/
total 57344
 8192 system@bcaa2f2178c7450d9ab5bb5d1c496892-000000000001c5ba-000519acc5b3571d.journal
 8192 system@bcaa2f2178c7450d9ab5bb5d1c496892-000000000001fa65-000519ad0ff00bd2.journal
 8192 system.journal
16384 user-1000@ee13e6436422421da906549125cdc0fa-000000000001c5b9-000519acc5b355e5.journal
16384 user-1000.journal

Here is my journald.conf:

$ grep -v "#" /etc/systemd/journald.conf 

Storage=persistent
SystemMaxUse=50M
SystemMaxFileSize=16M
RuntimeMaxUse=32M
RuntimeMaxFileSize=12M

Actually systemd journal log occupy 57M(57344), more than I set. Is it normal?

I still can't get vacuum option to work...

Last edited by joseribeiro (2015-07-01 23:16:01)

Offline

Board footer

Powered by FluxBB