Enable sar in Ubuntu

On Ubuntu, when i run sar, i get error

root@localhost:~# sar
Cannot open /var/log/sysstat/sa31: No such file or directory
Please check if data collecting is enabled
root@localhost:~# 

This is because sysstat is not enabled by default on Ubuntu, to enable, edit file

vi /etc/default/sysstat

Find

ENABLED="false"

Replace with

ENABLED="true"

Now restart sysstat

systemctl restart sysstat

See sar

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *