Frequent creation of “sa” files in /var/log/sa can quickly consume disk space on RHEL 8 servers, especially when sysstat’s data collection is left at its default settings. These files are generated by the sysstat package, which includes tools like sar for monitoring system performance. When left unmanaged, accumulated “sa” files may lead to disk space shortages and impact system stability.
Disable sysstat Data Collection
systemctl stop sysstat
This prevents sa files from being created until the service is restarted.
systemctl disable sysstat
This change ensures that sysstat does not resume logging after a system reboot, stopping further growth of /var/log/sa.
Join readers who trust AllThings.How
Add us as a preferred source on Google so our practical guides show up first next time you search.
Add to Google Preferences →Adjust sysstat Log Retention Period
vi /etc/sysconfig/sysstat
HISTORY=. This value controls how many days of data are kept. To reduce disk usage, set this to a lower number, such as 7:HISTORY=7
This limits the number of sa files retained, automatically removing older logs.
systemctl restart sysstat
Reducing retention minimizes disk consumption while still allowing recent performance data collection.
Manually Remove Old “sa” Files
ls /var/log/sa/sa*
find /var/log/sa/ -name "sa*" -type f -mtime +7 -delete
This command safely removes only those files older than 7 days, freeing up disk space without affecting recent logs.
crontab for regular execution.Alternative: Uninstall sysstat Package
dnf remove sysstat
This eliminates all sysstat-related logging and monitoring, so only use this approach if you are certain these tools are not needed for your system administration or troubleshooting.
Managing sysstat’s logging behavior ensures that /var/log/sa does not overfill your disk. Regularly review your retention settings or disable sysstat if ongoing monitoring is unnecessary.






