Re: journalctl --vacuum-time does nothing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

You might want to combine the vacuum option with `--rotate`, since journalctl
won't vacuum journals that are currently online, only archived ones
(`journalctl --header` to get the states of the respective journal files).

From the journalctl man page[1]:

These three switches may also be combined with --rotate into one command. If so, all active files are rotated first, and the requested vacuuming operation is executed right after. The rotation has the effect that all currently active files are archived (and potentially new, empty journal files opened as replacement), and hence the vacuuming operation has the greatest effect as it can take all log data written so far into account.

[0] https://www.freedesktop.org/software/systemd/man/journalctl.html#--vacuum-size=

On 5/15/22 11:12, baba wrote:
Hello,

root@debian:/# journalctl --list-boots
-7 23e0ab37a4774932a2574ca383925641 Sun 2022-05-08 10:47:07 CEST—Sun 2022-05-08 11:05:24 CEST
-6 60441d099e984f1497ba7dea43f60163 Mon 2022-05-09 08:50:10 CEST—Mon 2022-05-09 09:05:03 CEST
-5 d30aa08d14f54dc2a3b412f8f3738b85 Tue 2022-05-10 09:30:20 CEST—Tue 2022-05-10 09:41:46 CEST
-4 03759ec71b984a73b9e577130fa21626 Wed 2022-05-11 10:31:05 CEST—Wed 2022-05-11 10:40:36 CEST
-3 f9913cc67e0e49ae8323829c43838741 Thu 2022-05-12 09:25:45 CEST—Thu 2022-05-12 09:40:44 CEST
-2 472f92993a7b4d5b9a48f85223160ec7 Fri 2022-05-13 10:12:50 CEST—Fri 2022-05-13 10:40:21 CEST
-1 bc878a0a745c4009a68b625c30a0c9e2 Sat 2022-05-14 10:31:51 CEST—Sat 2022-05-14 10:53:42 CEST
  0 f4dd9da7701b4f96b76396842934ddf4 Sun 2022-05-15 10:33:15 CEST—Sun 2022-05-15 10:51:56 CEST
root@debian:/# journalctl --vacuum-time=3days
Vacuuming done, freed 0B of archived journals from /var/log/journal.
Vacuuming done, freed 0B of archived journals from /var/log/journal/ac27c4f71b94428396fc1096906bddb6.
Vacuuming done, freed 0B of archived journals from /run/log/journal.

What's wrong?


--
Frantisek Sumsal
GPG key ID: 0xFB738CE27B634E4B



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux