Skip to content

Install sar error: Please check if data collecting is enabled

1、安装sysstat

apt-get install sysstat

2、安装后提示

Cannot open /var/log/sysstat/sa02: No such file or directory
Please check if data collecting is enabled in /etc/default/sysstat

3、修改配置文件:/etc/default/sysstat

将False改为True

----
# 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"
----

4、重启sysstat服务即可

service sysstat restart

Disclaimer
  1. License under CC BY-NC 4.0
  2. Copyright issue feedback me#imzye.me, replace # with @
  3. Not all the commands and scripts are tested in production environment, use at your own risk
  4. No privacy information is collected here
Try iOS App