Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1020565: Redundant atop log rotation

45 views
Skip to first unread message

IB Development Team

unread,
Sep 23, 2022, 8:50:03 AM9/23/22
to
Package: atop
Version: 2.6.0-2

Installing atop in Debian 11 adds atop-rotate.service that restarts atop
at midnight and rotates its log.

Same task is still fired using /etc/cron.d/atop when systemd is present...

0 0 * * * root [ -d "/run/systemd/system" ] && systemctl restart atop

...and atop is restarted+rotated twice -> races may occur.

Please consider:

* removing above line from /etc/cron.d/atop,

* randomizing rotation schedule to avoid resource congestions (all
systems rotating in same time).

Randomization docs:
https://www.freedesktop.org/software/systemd/man/systemd.timer.html#RandomizedDelaySec=

Randomization example:

[Timer]
AccuracySec=10s
RandomizedDelaySec=600s
FixedRandomDelay=true

--

Regards,
Paweł Bogusławski

IB Development Team
E:d...@ib.pl

Marc Haber

unread,
Sep 26, 2022, 11:10:04 AM9/26/22
to
Control: tags -1 confirmed

On Fri, Sep 23, 2022 at 02:42:11PM +0200, IB Development Team wrote:
> Installing atop in Debian 11 adds atop-rotate.service that restarts atop at
> midnight and rotates its log.
>
> Same task is still fired using /etc/cron.d/atop when systemd is present...
>
> 0 0 * * * root [ -d "/run/systemd/system" ] && systemctl restart atop

That slipped by my attention. Thanks for spotting this. cron.d line
removed in git.

> Please consider:
>
> * removing above line from /etc/cron.d/atop,

Done.

> * randomizing rotation schedule to avoid resource congestions (all systems
> rotating in same time).

Sorry, no. atop relies on the midnight rotation as it is designed to
read back its own logs for playback. I have discussed this with upstream
years ago and this is by design.

I also contemplated moving the log file from /var/log to /var/lib as it
is not correctly a log (it's a binary format that cannot be read by
humans in contrast to a classical log file), but as this moves away from
Upstream's configuration and offers an entire class of failure modes in
upgrade, I decided against this.

This will be documented in a future README, see
https://salsa.debian.org/debian/atop/-/blob/master/debian/README

Greetings
Marc

--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
0 new messages