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?
journalctlcommand confirms for you that systemd started the atop process. What command have you invoked that shows you that atop is still running?systemctl status atopoutputs: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