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?
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?
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.
Adding an answer for my version (also found in the man pages):
Ubuntu: 17.04
$ atop -V
Version: 2.2.6
The script is located: /usr/share/atop/atop.daily
I've dropped mine down to 7 days of logs.
Always read the
man
page. Always.Do so by running
man atop
If you would have done so, you would have seen this:
This solution works for Ubuntu and perhaps other systems as well:
Open the config file
/etc/default/atop
It will look something like this
LOGGENERATIONS
is the number of days of history that will be stored (the config value is read by /usr/share/atop/atop.daily which will delete older log files)You can change
LOGGENERATIONS
to a smaller number of days.