How To Fix Error: “Please check if data collecting is enabled”

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.

Please check if data collecting is enabled

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:

sar command

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

edit default sysstat

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.

sar command

Discuss article in ArsTech Forum

If you like what you are reading, please:

Buy me a coffeeBuy me a coffee

arstech

Start the discussion at forum.arstech.net