View Past Performance Data With sar
sysstat stores past data in the directory
1 2 |
/var/log/sa - for RHEL based OS /var/log/sysstat - for Debian based OS |
Each day log files are stored in a file with the respective date.
1 2 |
sa01 - log file for day 1 sa31 - log file for day 31 |
To view logs for day 9, run
1 |
sar -f /var/log/sa/sa09 |
If you want to see entries during a specific time, you can use
1 |
sar -f /var/log/sa/sa09 -s hh:mm:ss |
Example
You can specify end time with -e option
If you want to see IO data, use -b option
1 |
sar -f /var/log/sa/sa09 -b |