Skip to content

Instantly share code, notes, and snippets.

@tolumide-ng
Last active March 8, 2024 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tolumide-ng/3c0dd88800840cbb9a5ebbc4d7d7fb79 to your computer and use it in GitHub Desktop.
Save tolumide-ng/3c0dd88800840cbb9a5ebbc4d7d7fb79 to your computer and use it in GitHub Desktop.
Enable SAR on Ubuntu 20.x
1. # Open sysstat file
sudo vim /etc/default/sysstat
2. # Change the ENABLED="false" part to ENABLED="true" and save the changes
3. # Restart sysstat:
sudo service sysstat restart
4. ## To adjust the schedule the statistic is recorded run the command below, and update the activity report to your taste
sudo vim /etc/cron.d/sysstat
5. ## You can use `sadf` for viewing in different formats (-j for json), (-g for svg), and (-d for csv)
e.g -> sadf -j sa06 #to view the log for in `/var/log/sysstat/sa06` in jsoin format
6. ## Archive data stored by `sar` can be viewed in `/var/log/sysstat`, each day of the months archive is stored as `sa*` where `*` represents the day of that month e.g `sa07` represents the data for the seventh data of that month
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment