Bug 1425830

Summary: logrotate rotates atop.log but process created atop_YYYYMMDD files
Product: [Fedora] Fedora EPEL Reporter: Stefan Neufeind <redhat>
Component: atopAssignee: Gwyn Ciesla <gwync>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: guillem.cuberes, gwync, joeytwiddle, redhat
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 14:54:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stefan Neufeind 2017-02-22 14:32:59 UTC
logrotate can't rotate anything since atop itself appends the current date to logfiles instead of writing to alog.log.

The problem appears here with atop.x86_64 0:2.1-1.el7.

Similar issues were reported in the past against atop 1.x for el6 (#1024759) and el5 (#542598).

Startscript contains:
$BINPATH/atop -a -w $LOGPATH/atop_$CURDAY $INTERVAL > $LOGPATH/atop.log 2>&1 &

So it semes like it expects atop to eventually write "something" to atop.log (which actually remains empty) and the logfiles themselves are not rotated or cleared.


Is this "by design" (datafiles are never removed) or should some way of logrotating / deleting old files be implemented?

Comment 1 Gwyn Ciesla 2019-08-06 14:54:22 UTC
As of atop-2.4.0-1.el7, this no longer uses logrotate.

Comment 2 joeytwiddle 2021-11-09 03:46:17 UTC
I don't know the solution to this.

The issue has been raised on GitHub, but without a clear indication of how to fix it:

https://github.com/Atoptool/atop/issues/33

We might find some inspiration here: https://github.com/Atoptool/atop/search?q=log

In the meantime, I am using a workaround, doing a daily restart of atop daily, as mentioned in the GitHub issue.

----

I would also add one other concern: On most distributions, when I install atop it also start the atop service automatically, so it starts recording logs in the background.  On CentOS, with atop version 2.6.0 release 6.el7, I did not realise until I went to look for the logs a few days later, that the service had not been started!

If it doesn't contradict your policies, I think it would be good to start the service automatically.