Description of problem: In /etc/cron.d/atop there is a reference to /etc/atop/atop.daily which is NOT provided by the atop package. (It looks like /etc/cron.d/atop might not be unnecessary as /etc/cron.daily/atop may be doing the same thing.) Version-Release number of selected component (if applicable): 1.23-6.fc9 How reproducible: 100% Steps to Reproduce: 1.yum install atop 2.Either look at the files directory or wait for the cron error message to be mailed. 3. Actual results: Daily emails noting the problem with cron. Expected results: No daily emails about problems. Additional info:
Indeed, /etc/cron.d/atop was superseded by /etc/cron.daily/atop and should no longer be packaged.
Fixed in atop-1.23-7
Can you push this to bodhi? It hasn't been pushed out to Fedora 9 at least. I don't know about other places.
Can someone reopen this bug? It is still present in atop-1.23-10.fc12 and atop-1.23-8.el5
Thinking more about this, it's not ideal to have the cron job responsible for restarting atop in /etc/cron.daily. Scripts there are set to run at 4AM by default, but atop's raw log file reading functionality works best if the raw log file is rotated at midnight. This is illustrated in the manpage: "A raw file can be read and visualized again with the flag -r followed by the filename... If a filename is specified in the format yyyymmdd (where yyyymmdd are digits representing any valid date), the file /var/log/atop/atop_yyyymmdd is opened." One fix would be to move /etc/cron.daily/atop to somewhere like /usr/share/atop/restart_atop and have a file in /etc/cron.d that calls it at midnight. This is similar to what the sysstat package does.
Another approach might be to eliminate /etc/cron.daily/atop altogether. The only difference I see between it and /usr/bin/atopd is that atopd will restart atop or start atop if it isn't already running, while the cron job will only restart atop. This makes sense, since you don't want atop to be started by the cron job when you haven't started the atop service. However, /etc/rc.d/init/atop has a working condrestart function that will execute /usr/bin/atopd only if /usr/bin/atop isn't already running. Using this from cron seems like a better approach then duplicating code between /usr/bin/atopd and /etc/cron.daily/atop. Thus, my proposed fix to this bug is 1) Remove /etc/cron.daily/atop from the package 2) Change /etc/cron.d/atop to be # start atop daily at midnight 0 0 * * * root /etc/rc.d/init.d/atop condrestart This has the dual advantages of reducing code duplication and preserving the relationship between a raw log file's name and the day's data it contains.
I'm doing what I describe in comment 6 in my environment; you can see a puppet module for it at https://github.com/sciurus/puppet-atop.
This bug has been fixed following comment 6, if someone with access would like to close it. $ rpm -q atop atop-2.3.0-8.fc27.x86_64 $ rpm -q --dump atop|grep cron /etc/cron.d/atop 78 1514904906 8dc1ce7fc7daeb7f7ba097a55d19e817eac6e19f038840bcae2785281dd3a65f 0100644 root root 1 0 0 X
Gah, I got confused. Sorry for the noise.