How to make `atop` create less log files

disk-space-utilizationlog-files

Currently I have like 3.5GB of atop log files at
/var/log/atop/

I do not need that much log data.
Files there are as old as 28 days ago.

I cannot find a way to configure atop log limit/quota/age.

How to lower that disk space usage?

Best Answer

Using this tip, I edited
/etc/init.d/atop

As the manual page says "four weeks", it was clearly there this command:
find $LOGPATH -name 'atop_*' -mtime +28 -exec rm {} \;

So, 28 days old files will be kept...

I changed it to
find $LOGPATH -name 'atop_*' -mtime +1 -exec rm {} \;

And ran this command:
sudo service atop _cron

Now the logs are only at most for yesterday, that is what I need.

Related Topic