Linux (Ubuntu 18.10)中输入sar命令报错如下:

~$ sar
Cannot open /var/log/sysstat/sa28: No such file or directory
Please check if data collecting is enabled

解决办法:
vim /etc/default/sysstat文件内容如下:

#
# Default settings for /etc/init.d/sysstat, /etc/cron.d/sysstat
# and /etc/cron.daily/sysstat files
#

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

false改为true
然后重启sysstat:sudo service sysstat restart
完毕。

Logo

更多推荐