Bug 1425830 - logrotate rotates atop.log but process created atop_YYYYMMDD files
Summary: logrotate rotates atop.log but process created atop_YYYYMMDD files
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: atop
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-22 14:32 UTC by Stefan Neufeind
Modified: 2021-11-09 03:46 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-08-06 14:54:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.