0

I installed atop on Rocky 9 to monitor CPU spike issues. On 2/8/2024 (2 days ago) I enabled and started atop:

systemctl enable atop
systemctl start atop

Thus, a file was created in /var/log/atop named atop_20240802.

journalctl -u atop output:

Aug 02 23:52:01 systemd[1]: Starting Atop advanced performance monitor...
Aug 02 23:52:01 systemd[1]: Started Atop advanced performance monitor.

I updated the config file /usr/share/atop/atop.daily:

#!/usr/bin/sh

LOGOPTS=""                              # default options
LOGINTERVAL=3600                        # default interval in seconds
LOGGENERATIONS=7                        # default number of days
LOGPATH=/var/log/atop                   # default log location

# allow administrator to overrule the variables
# defined above
#
DEFAULTSFILE=/etc/sysconfig/atop                # possibility to overrule vars

ls -ld /var/log/atop/ output:

drwxr-xr-x 2 root root 53 Aug  2 23:53 /var/log/atop/

Daily logs were not created for yesterday and today. How to fix it?

2
  • Your journalctl command confirms for you that systemd started the atop process. What command have you invoked that shows you that atop is still running? Commented Aug 4, 2024 at 17:19
  • @SottoVoce systemctl status atop outputs: atop.service - Atop advanced performance monitor Loaded: loaded (/usr/lib/systemd/system/atop.service; enabled; preset: dis Active: active (running) since Fri 2024-08-02 23:52:01 EEST; 1 day 23h ago Docs: man:atop(1) Main PID: 2760523 (atop) Tasks: 1 (limit: 22585) Memory: 15.0M CPU: 10.155s CGroup: /system.slice/atop.service └─2760523 /usr/bin/atop -w /var/log/atop/atop_20240802 600 Commented Aug 4, 2024 at 20:31

1 Answer 1

1

Apart from enabling and starting atop as a background process, also atop-rotate.timer has to be enabled to switch logfiles at midnight:

systemctl enable --now atop-rotate.timer

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.