> Sam Morris <s...@robots.org.uk>
> But more annoyingly, restarting cron results in atop being killed!

This was another bug, that even got fixed in stable:

 cron (3.0pl1-127+deb8u1) jessie; urgency=medium
 .
   * d/cron.service: Use KillMode=process to kill only the daemon.
     The default of KillMode=control-group kills all the processes in the 
control
     group, for example when restarting the daemon. This is a deviation from 
past
     behavior we do not want. Closes: #783683

----

Every little thing started from cron will end up in cron.service's cgroup.

To avoid that you'd need:
- a proper atop.timer that calls a new atop.service
- some logic in the crontab to make it a no-op if systemd is installed & running

 # start atop daily at midnight
-0 0 * * * root invoke-rc.d atop _cron
+0 0 * * * root test -e /run/systemd || invoke-rc.d atop _cron

Reply via email to