Symptoms
When attempting to run sar to check the sysstat logs, you encounter a message similar to the following.
[root@server ~]cPs# sar -q
Invalid system activity file: /var/log/sa/sa31
File created by sar/sadc from sysstat version 10.1.5
Current sysstat version cannot read the format of this file (0x2171)
Description
When the sysstat package gets updated, the log format may change. This will prevent sar from parsing the old log files and can prevent the files from being updated.
Workaround
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Nove aside the current log directory.
mv -v /var/log/sa{,.oldformat} - Re-create the log directory.
mkdir -v /var/log/sa
- Enable the
sysstatservice.systemctl enable --now sysstat
- Restart the
sysstatservice.systemctl restart sysstat
- Restart the
sysstat-collectservice.systemctl restart sysstat-collect
- Convert the old log files to the current format.
find /var/log/sa.oldformat/ -type f | while read salog ; do sadf -c $salog > $salog.converted ; done
Comments
0 comments
Article is closed for comments.