systemd journal using too much disc space

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

systemd journal using too much disc space

Colin Law
I note that the files in /var/log/journal are consuming 2.9GB and
journalctl --disk-usage
also shows 2.9GB. Since this is on Ubuntu 17.04 installed in an 80GB
partition on an SSD this is a significant chunk of my free disc space.
As far as I can see journalctl is using its default values as there
are no commented out settings in /etc/systemd/journald.conf and I
cannot see any overriding conf files.

I see how to adjust the settings for this but am surprised the default
is so large. For example if I run
journalctl -u systemd-resolved.service
I see 70,000 lines going back over 9 months which seems a bit excessive.

Is what I am seeing to be expected for the default settings?

Colin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: systemd journal using too much disc space

Colin Law
On 22 June 2017 at 09:18, Colin Law <[hidden email]> wrote:

> I note that the files in /var/log/journal are consuming 2.9GB and
> journalctl --disk-usage
> also shows 2.9GB. Since this is on Ubuntu 17.04 installed in an 80GB
> partition on an SSD this is a significant chunk of my free disc space.
> As far as I can see journalctl is using its default values as there
> are no commented out settings in /etc/systemd/journald.conf and I
> cannot see any overriding conf files.
>
> I see how to adjust the settings for this but am surprised the default
> is so large. For example if I run
> journalctl -u systemd-resolved.service
> I see 70,000 lines going back over 9 months which seems a bit excessive.
>
> Is what I am seeing to be expected for the default settings?

Ah, I see now why this is. By default systemd does not log to disc,
but if the directory /var/log/journal exists then it *does* log to
disc. Some time ago I created that dir in order to get more detail on
a booting issue. I should have removed it when I had finished.  I have
now done that.

Sorry for the noise.

Colin

>
> Colin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: systemd journal using too much disc space

Oliver Grawert
In reply to this post by Colin Law
hi,
Am Donnerstag, den 22.06.2017, 09:18 +0100 schrieb Colin Law:

> I note that the files in /var/log/journal are consuming 2.9GB and
> journalctl --disk-usage
> also shows 2.9GB. Since this is on Ubuntu 17.04 installed in an 80GB
> partition on an SSD this is a significant chunk of my free disc
> space.
> As far as I can see journalctl is using its default values as there
> are no commented out settings in /etc/systemd/journald.conf and I
> cannot see any overriding conf files.
>
> I see how to adjust the settings for this but am surprised the
> default
> is so large. For example if I run
> journalctl -u systemd-resolved.service
> I see 70,000 lines going back over 9 months which seems a bit
> excessive.
>
> Is what I am seeing to be expected for the default settings?
>
since ubuntu does not set journald to logging to disc by default, there
are no size options set (for ram logging the builtin defaults are
fine).

if you enable logging to disc you should likely also adjust the file
size values inĀ /etc/systemd/journald.conf

ciao
        oli
--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: systemd journal using too much disc space

Tom H-4
In reply to this post by Colin Law
On Thu, Jun 22, 2017 at 7:23 AM, Colin Law <[hidden email]> wrote:

> On 22 June 2017 at 09:18, Colin Law <[hidden email]> wrote:
>>
>> I note that the files in /var/log/journal are consuming 2.9GB and
>> journalctl --disk-usage
>> also shows 2.9GB. Since this is on Ubuntu 17.04 installed in an 80GB
>> partition on an SSD this is a significant chunk of my free disc space.
>> As far as I can see journalctl is using its default values as there
>> are no commented out settings in /etc/systemd/journald.conf and I
>> cannot see any overriding conf files.
>>
>> I see how to adjust the settings for this but am surprised the default
>> is so large. For example if I run
>> journalctl -u systemd-resolved.service
>> I see 70,000 lines going back over 9 months which seems a bit excessive.
>>
>> Is what I am seeing to be expected for the default settings?
>
> Ah, I see now why this is. By default systemd does not log to disc,
> but if the directory /var/log/journal exists then it *does* log to
> disc. Some time ago I created that dir in order to get more detail on
> a booting issue. I should have removed it when I had finished. I have
> now done that.

It's "Storage=auto" (the default) in "/etc/systemd/journald.conf" that
makes the journald logs persistence if "/var/log/journal/" exists.

If rsyslog is installed (and set up to collect logs), there's no need
for the journald logs to be persistent, except that "journalctl" will
only display the current boot's logs.

But if rsyslog is uninstalled or disabled, persistent journald logs
are necessary/desirable.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: systemd journal using too much disc space

Tom H-4
In reply to this post by Oliver Grawert
On Thu, Jun 22, 2017 at 9:26 AM, Oliver Grawert <[hidden email]> wrote:
>
> since ubuntu does not set journald to logging to disc by default, there
> are no size options set (for ram logging the builtin defaults are
> fine).
>
> if you enable logging to disc you should likely also adjust the file
> size values in /etc/systemd/journald.conf

IIRC, by default, the journald files don't grow to more than 10% of
the filesystem where "/var/log/journal/" is and they have to leave at
least 15% of that filesystem free.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: systemd journal using too much disc space

Colin Law
Thanks Tom and Oliver. As I posted it was that fact that I had
forgotten that I had enabled disc logging (by creating the directory)
that caused it to be using disc in the first place. I had missed the
fact that it will leave a percentage of disc free, so presumably if I
had started getting low on space it would automatically have cut down
its usage, which, it has to be admitted, makes it remarkably well
behaved s/w.

Cheers

Colin

On 22 June 2017 at 14:36, Tom H <[hidden email]> wrote:

> On Thu, Jun 22, 2017 at 9:26 AM, Oliver Grawert <[hidden email]> wrote:
>>
>> since ubuntu does not set journald to logging to disc by default, there
>> are no size options set (for ram logging the builtin defaults are
>> fine).
>>
>> if you enable logging to disc you should likely also adjust the file
>> size values in /etc/systemd/journald.conf
>
> IIRC, by default, the journald files don't grow to more than 10% of
> the filesystem where "/var/log/journal/" is and they have to leave at
> least 15% of that filesystem free.
>
> --
> ubuntu-users mailing list
> [hidden email]
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Loading...