Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1231660

Bug#1094965: wtmpdb: provides no way to prune rotated logs

From Andrew Bower <andrew@bower.uk>
Newsgroups linux.debian.bugs.dist
Subject Bug#1094965: wtmpdb: provides no way to prune rotated logs
Date 2025-02-03 23:40 +0100
Message-ID <KcdgJ-ebGo-1@gated-at.bofh.it> (permalink)
References <KbtdT-dDEI-1@gated-at.bofh.it> <KbtdT-dDEI-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Control: tags -1 patch

On Sat, Feb 01, 2025 at 09:24:31PM +0000, Andrew Bower wrote:
> wtmpdb will rotate logs but nothing will prune them (like logrotate would for
> other types of log - unfortunately it doesn't fit in well with the wtmpdb way).

I have come up with a solution whereby a 'prune' systemd unit is chained
from the 'rotate' service. This calls into a script to prune logs beyond
a configured limit. One can disable the prun unit or edit it to adjust
the parameters.

Any feedback much appreciated!

https://salsa.debian.org/abower/wtmpdb/-/commit/512fa747f9943e1b8b4e7c169dabc1c67c004313
(branch 'log-pruning')

One nicety of the old wtmp logrotate config is that it wouldn't even
rotate until the log hit 1MB.

What do we think of that idea? It seems logical - no point in rotating
tiny files!

Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#1094965: wtmpdb: provides no way to prune rotated logs Andrew Bower <andrew@bower.uk> - 2025-02-01 22:30 +0100
  Bug#1094965: wtmpdb: provides no way to prune rotated logs Andrew Bower <andrew@bower.uk> - 2025-02-03 23:40 +0100
    Bug#1094965: wtmpdb: provides no way to prune rotated logs Chris Hofstaedtler <zeha@debian.org> - 2025-02-04 00:00 +0100
      Bug#1094965: wtmpdb: provides no way to prune rotated logs Andrew Bower <andrew@bower.uk> - 2025-02-04 01:40 +0100
        Bug#1094965: wtmpdb: provides no way to prune rotated logs Chris Hofstaedtler <zeha@debian.org> - 2025-02-04 10:40 +0100
          Bug#1094965: wtmpdb: provides no way to prune rotated logs Andrew Bower <andrew@bower.uk> - 2025-02-04 11:00 +0100

csiph-web