I was trying to change the atop log interval on CentOS 7 cPanel server from 600 to 60 seconds and tried editing the file /etc/system/system/multi-user.target.wants/atop.service
(Environment="LOGINTERVAL=60") and did service atop restart
, then edited /usr/share/atop/atop.daily
(LOGINTERVAL=60) and did service atop restart
but couldn't see that bringing intended result.
So, I tried editing /usr/lib/systemd/system/atop.service
(Environment="LOGINTERVAL=60") which I saw in service atop status
After this when I checked service atop status
I'm seeing a warning Warning: atop.service changed on disk. Run 'systemctl daemon-reload' to reload units.
[root@**** ~]# service atop status
Redirecting to /bin/systemctl status atop.service
● atop.service - Atop advanced performance monitor
Loaded: loaded (/usr/lib/systemd/system/atop.service; enabled; vendor preset: disabled)
Active: active (running) since *** ****-**-** **:**:** GMT; 29min ago
Docs: man:atop(1)
Process: 20856 ExecStartPost=/usr/bin/find ${LOGPATH} -name atop_* -mtime +${LOGGENERATIONS} -exec rm -v {} ; (code=exited, status=0/SUCCESS)
Process: 20852 ExecStartPre=/bin/sh -c test -n "$LOGGENERATIONS" -a "$LOGGENERATIONS" -eq "$LOGGENERATIONS" (code=exited, status=0/SUCCESS)
Process: 20851 ExecStartPre=/bin/sh -c test -n "$LOGINTERVAL" -a "$LOGINTERVAL" -eq "$LOGINTERVAL" (code=exited, status=0/SUCCESS)
Main PID: 20855 (atop)
CGroup: /system.slice/atop.service
└─20855 /usr/bin/atop -w /var/log/atop/atop_******** 600
*
*
*
Warning: atop.service changed on disk. Run 'systemctl daemon-reload' to reload units.
[root@**** ~]# service atop restart
Redirecting to /bin/systemctl restart atop.service
Warning: atop.service changed on disk. Run 'systemctl daemon-reload' to reload units.
[root@**** ~]# service atop status
Redirecting to /bin/systemctl status atop.service
● atop.service - Atop advanced performance monitor
Loaded: loaded (/usr/lib/systemd/system/atop.service; enabled; vendor preset: disabled)
Active: active (running) since *** ****-**-** **:**:** GMT; 5s ago
Docs: man:atop(1)
Process: 25789 ExecStartPost=/usr/bin/find ${LOGPATH} -name atop_* -mtime +${LOGGENERATIONS} -exec rm -v {} ; (code=exited, status=0/SUCCESS)
Process: 25785 ExecStartPre=/bin/sh -c test -n "$LOGGENERATIONS" -a "$LOGGENERATIONS" -eq "$LOGGENERATIONS" (code=exited, status=0/SUCCESS)
Process: 25784 ExecStartPre=/bin/sh -c test -n "$LOGINTERVAL" -a "$LOGINTERVAL" -eq "$LOGINTERVAL" (code=exited, status=0/SUCCESS)
Main PID: 25788 (atop)
CGroup: /system.slice/atop.service
└─25788 /usr/bin/atop -w /var/log/atop/atop_******* 600
*
*
*
Warning: atop.service changed on disk. Run 'systemctl daemon-reload' to reload units.
How should I proceed at this point? I didn't try running systemctl daemon-reload
as I'm not sure what all changes it'll bring