My system is centos 7.4 with atop 2.3.0
I want to change atop log interval from default 600
to 300
,then I vi /usr/share/atop/atop.daily
as below:
#!/bin/bash
CURDAY=`date +%Y%m%d`
LOGPATH=/var/log/atop
BINPATH=/usr/bin
PIDFILE=/var/run/atop.pid
INTERVAL=600 # interval 10 minutes
# support /etc/sysconfig/atop
source /etc/sysconfig/atop
I notice source /etc/sysconfig/atop
,then I open /etc/sysconfig/atop
:
CURDAY=`date +%Y%m%d`
# Log files path
LOGPATH=/var/log/atop
# Binaries path
BINPATH=/usr/bin
# PID File
PIDFILE=/var/run/atop.pid
# interval (default 10 minutes)
INTERVAL=600
Both files has INTERVAL=600
,which file should be revised?
For Centos 7.
If you have a look at /usr/share/atop/atop.daily, it expects variable $LOGINTERVAL to be overriden