How to get rid of /tmp/atop.d/atop.acct

You should never terminate atop by 'kill -9', because then it has no chance to stop process accounting; as a result the accounting file may consume a lot of disk space after a while!!!

Lets do this smoothly:

systemctl stop atopd
systemctl disable atopd

Check atop processes
ps auxfS |grep atop

Kill if any using 'kill -15'
kill -15 PID

Check for links and unlink if any:
ls /etc/systemd/system/ |grep atop

Remove atopd.service file
rm -fv /usr/lib/systemd/system/atopd.service
or
rm -fv /usr/lib/systemd/system/atop.service

Enter /tmp/atop.d/ where the file atop.acct shouldn't be increasing any longer
cd /tmp/atop.d/
If so, go ahead and remove it
rm -rf /tmp/atop.d/

systemctl daemon-reload
systemctl reset-failed

Should be empty:
systemctl list-units |grep atop

In case you've got a server where atop had been removed incorrectly you will need to reinstall atop and do the steps above

Useful URLs:

https://linux.die.net/man/1/atop

https://wiki.archlinux.org/index.php/systemd

https://superuser.com/questions/513159/how-to-remove-systemd-services

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *