After installing sysstat package and running sar command you may have error message: “Cannot open /var/log/sysstat/sa18: No such file or directory. Please check if data collecting is enabled”. I will show how to fix that error on Ubuntu and CentOS Linux.
Fix: Please check if data collecting is enabled in CentOS / RedHat
To fix that error in CentOS we need restart the sysstat service, and the data will start collecting
# service sysstat restart
Now run again sar command, if service start collects data you will see something like this:
Fix: Please check if data collecting is enabled in Ubuntu / Debian
To fix in Ubuntu we need do one more step
1. Edit sysstat config
Open and edit /etc/default/sysstat config file and change row from ENABLED=”false” to ENABLED=”true”
2. Restart sysstat service
Now restart sysstat service:
$ sudo service sysstat restart
Run sar command, if service start collects data you will see command execution result without error.
Discuss article in ArsTech Forum
Start the discussion at forum.arstech.net