🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #302230

Re: Can the journal logs be deleted?

#302230
From: Bit Twister
Date: Sun, 03 Feb 2019 07:47
44 lines
2187 bytes
On Sat, 2 Feb 2019 18:56:15 -0600, noreply@sfc.com wrote:

> Can the journal logs be deleted?
Yes

> root@me/var/log/journal# fs
> 961M    d9a927bb8f0e49d5ac04b37ee7635bc9
> 849M    journal/bbb0ea85b2a148cd98286b3a6801a8ee
> 353M    journal/a020e2bc938143aba9ef23302ee2f102
> 8.1M    journal/f011e1d2970c4d348a39adaa7b907921
> 1.3G    journal/2b875bc9741c428088f233e199fe0682
> 1.1G    journal/f7d12af3b8fd4ac98c339516c736d4df
>
>   What are they for?

/var/log/journal/* are the different journal directories where
the system log database files are stored.

You use journalctl to view the contents in a given directory.
Homework:    man journalctl

A quick glance in the current journal directory on my system has
$ ls -1 /var/log/journal/$(cat /etc/machine-id)
system.journal
user-1500.journal
user-1503.journal
user-1504.journal
user-1508.journal
user-1511.journal
user-1513.journal
user-1521.journal
user-1524.journal
user-1526.journal

If you have no use/desire to look back at old journal contents,
you can delete the old directories/contents.

As you can see from my command "cat /etc/machine-id" gives you
the sub-directory of the current log.

I wrote my own script, new_boot_logs, to delete/empty log directories/files
and it calls my new_journal script to rotate the journal twice and deletes
all the journal files then reboots the system.
Technical Details
Message-ID: <slrnq5d73t.j54.BitTwister@wb.home.test>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <q35e6b$v8$1@news.neodome.i2p>

Show Full Headers
Complete Article Headers
Message-ID: <slrnq5d73t.j54.BitTwister@wb.home.test>
Subject: Re: Can the journal logs be deleted?
Date: Sun, 3 Feb 2019 01:47:04 -0600
From: Bit Twister <BitTwister@mouse-potato.com>
References: <q35e6b$v8$1@news.neodome.i2p>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Organization: A noiseless patient Spider
Lines: 45
User-Agent: slrn/1.0.3 (Linux)
X-Received-Bytes: 2239
X-Received-Body-Crc: 2142735440
Cancel-Lock: sha1:CvK54LaJMJvnTv1zNg445YcVUdw=
X-pugleaf-debug: badGroups=2 valid=3
Newsgroups: alt.privacy.anon-server,alt.os.linux,comp.os.linux.misc