Public bug reported:

I did a `sudo apt remove atop` because of
https://rachelbythebay.com/w/2025/03/25/atop/ and now every day I get an
email from cron, saying

    From: Cron Daemon <root@...>
    To: root@...
    Subject: Cron <root@...> [ -d "/run/systemd/system" ] && systemctl restart 
atop
    Date: Thu, 27 Mar 2025 00:00:01 +0200 (EET)

    Failed to restart atop.service: Unit atop.service is masked.

The /etc/cron.d/atop looks like this:

    PATH=/bin:/usr/bin:/sbin:/usr/sbin

    # daily restart of atop at midnight
    0 0 * * * root [ -d "/run/systemd/system" ] || /usr/share/atop/atop.daily&
    0 0 * * * root [ -d "/run/systemd/system" ] && systemctl restart atop


It should also check whether /usr/bin/atop exists before it runs `systemctl 
restart` (or, I suppose, /usr/share/atop/atop.daily, for non-systemd systems, 
if any exist).

I have not purged the atop package because I do not want to lose the
collected logs in /var/log/atop/.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: atop (not installed)
ProcVersionSignature: Ubuntu 5.15.0-134.145-generic 5.15.173
Uname: Linux 5.15.0-134-generic x86_64
NonfreeKernelModules: lkp_Ubuntu_5_15_0_134_145_generic_110 zfs zunicode zavl 
icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu82.6
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Thu Mar 27 13:11:58 2025
InstallationDate: Installed on 2016-09-10 (3120 days ago)
InstallationMedia: Ubuntu-GNOME 16.04.1 LTS "Xenial Xerus" - Release amd64 
(20160720)
SourcePackage: atop
UpgradeStatus: Upgraded to jammy on 2023-10-21 (522 days ago)

** Affects: atop (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug jammy

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2104363

Title:
  atop spams cron errors after removal

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/atop/+bug/2104363/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to