0

In latest version atop 2.4.0 (Repository - epel, CentOS 7) I can't change time interval through config file.

I set "INTERVAL=60" in /etc/sysconfig/atop, restart service, but no effect, interval stay on default value 10min (600sec)

In version 2.3.0 change interval work perfectly through config file.

How to change time interval?

Pavel Gromov
  • 133
  • 1
  • 1
  • 9

3 Answers3

1

https://bugzilla.redhat.com/show_bug.cgi?id=1712241

The default /etc/sysconfig/atop has "INTERVAL" defined not "LOGINTERVAL" Change it to use "LOGINTERVAL" and atop is started with the correct interval. Can the default config file be changed to use LOGINTERVAL.

Pavel Gromov
  • 133
  • 1
  • 1
  • 9
0

Find the appropriate file to override the interval from the running service or set it from LOGOPTS.

# systemctl cat atop |grep -i environmentfile
EnvironmentFile=/etc/default/atop

For example, here it shows /etc/default/atop as config file.

amized
  • 501
  • 4
  • 3
0

I have encountered same issue in CentOS Linux release 7.5.1804 (Core) and atop Version: 2.4.0 (also from epel)

My workaround is to use this command directly:

/usr/bin/atop -R -w /var/log/atop/atop_log [time intervel(s)]

For example, this will record data every 10 seconds:

/usr/bin/atop -R -w /var/log/atop/atop_20190810 10

Another way is to edit the script /usr/share/atop/atop.daily which will be executed by /usr/lib/systemd/system/atop.service when service start.But, I choose to use workaround.