Bug 445174
Summary: | There is a bad cron entry provided by atop | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Bruno Wolff III <bruno> |
Component: | atop | Assignee: | Kairo Araujo <kairoaraujo> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | alan.christopher.jenkins, brian |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2008-05-06 16:43:09 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Bruno Wolff III
2008-05-05 06:16:19 UTC
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. |