Last active
March 8, 2024 22:04
-
-
Save tolumide-ng/3c0dd88800840cbb9a5ebbc4d7d7fb79 to your computer and use it in GitHub Desktop.
Enable SAR on Ubuntu 20.x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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