When running sar on Ubuntu, i get error
root@ip-172-31-0-223:~# sar Cannot open /var/log/sysstat/sa01: No such file or directory Please check if data collecting is enabled root@ip-172-31-0-223:~#
To fix, run
dpkg-reconfigure sysstat
This will ask you to activate cronjob for data collection. Select Yes. Now wait some time for cronjob to run, sar will work.
See sar