Enable sar in Ubuntu
On Ubuntu, when i run sar, i get error
1 2 3 4 |
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
1 |
vi /etc/default/sysstat |
Find
1 |
ENABLED="false" |
Replace with
1 |
ENABLED="true" |
Now restart sysstat
1 |
systemctl restart sysstat |
See sar