"Cannot open /var/log/sysstat/sa16 Please check if data collecting is enabled in /etc/default/sysstat" "Cannot open /var/log/sysstat/sa16 Please check if data collecting is enabled in /etc/default/sysstat" unix unix

"Cannot open /var/log/sysstat/sa16 Please check if data collecting is enabled in /etc/default/sysstat"


Try restarting the service and see the data collects or not

$ sudo service sysstat restart 


I assume that you have installed the sysstat utility properly,

apt-get install sysstat

STEP 1

Open "/etc/default/sysstat" using your favorite file editor and change ENABLED="false" to ENABLED="true"

vim /etc/default/sysstat----# Should sadc collect system activity informations? Valid values# are "true" and "false". Please do not put other values, they# will be overwritten by debconf!ENABLED="true"----

STEP 2

change the collection interval from every 10 minutes to every 2 minutes. So that we get metrics for every two minutes, you can change the interval as per your need.

----vim /etc/cron.d/sysstatChange5-55/10 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1To*/2 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1----

STEP 3

Next we need to restart the sysstat service.

service sysstat restartOr/etc/init.d/sysstat restart

For reference you can click here


Please follow the steps below to get it to work:https://www.crybit.com/sysstat-sar-on-ubuntu-debian/

Open /etc/default/sysstat using your favorite editor and change ENABLED="false" to ENABLED="true"

$ vi /etc/cron.d/sysstat

Change

5-55/10 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1

To:

*/2 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1

Then:

$ service sysstat restart