• Re: Using - journalctl -

    From Charles Curley@21:1/5 to Arbol One on Thu Aug 29 00:20:01 2024
    On Wed, 28 Aug 2024 11:47:48 -0400
    Arbol One <[email protected]> wrote:

    Having said that, I would like to keep my 'events' log showing only
    the last two days; as explain here <https://unix.stackexchange.com/questions/139513/how-to-clear-journalctl>, using the following command : *journalctl --vacuum-time=2d*. However,
    when I use the 'journal' command to see the log record, it shows
    dates as back as January-2021. Just for the record, we are in
    August-2024.

    I'm no expert on systemd, nor have I played one on television. However…

    Rather than do this manually, take a look at the second answer,
    starting "You don't typically clear the journal yourself."


    What am I doing wrong?

    Are you doing this as root?

    If you watch the journal in one terminal (run "journalctl -f" as root),
    and run that command in another, do you see any interesting entries? If
    so, please copy and paste them into your reply.

    On Monday I installed trixie on a virtual machine so I could play
    with it. Running that command on that machine, I saw the following
    output (which your email program may mangle):

    root@testing:/media/disk# journalctl --vacuum-time=2d
    Vacuuming done, freed 0B of archived journals from /var/log/journal/7ed347a1b9484dae91ba8c621e621d5d.
    Vacuuming done, freed 0B of archived journals from /var/log/journal.
    Vacuuming done, freed 0B of archived journals from /run/log/journal. root@testing:/media/disk#

    Do you see any such output?

    --
    Does anybody read signatures any more?

    https://charlescurley.com
    https://charlescurley.com/blog/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Thu Aug 29 00:40:01 2024
    Arbol One (12024-08-28):
    Having said that, I would like to keep my 'events' log showing only the last two days; as explain here <https://unix.stackexchange.com/questions/139513/how-to-clear-journalctl>, using the following command : *journalctl --vacuum-time=2d*. However, when I use the 'journal' command to see the log record, it shows dates as back as January-2021. Just for the record, we are in August-2024.

    What am I doing wrong?

    # --vacuum-time= removes archived journal files older than the

    I notice the *archived* word. Maybe your journal since January is not
    archived.

    You should look at the size and timestamps of the files in
    /var/log/journal/.

    Maybe also try to run “journalctl --rotate” before or after “journalctl --vacuum-time=2d”, to have a point to discard the next time.

    Regards,

    --
    Nicolas George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)