How do I get sar to show for specific dates?

11,470

As far as I know, there is no specific option to get a result between 2 dates.

HOWEVER:

1) sysstat put logs usually in /var/log/sysstat/ or /var/log/sa/. Then the files numbered here should correspond to the day of the month, so, sa01 should be the 1rst day of the month

2) You can read the raw data using the sar command: example: sar -f sa01

3) you can't choose to read from a date to another date, but you can select a start time to an end time, using -s and -e options.

Playing with this, with a minimum of scripting, you should be able to have a solution to your problem.

Hope it will help!

Share:
11,470
ErezN
Author by

ErezN

Updated on June 04, 2022

Comments

  • ErezN
    ErezN almost 2 years

    I am trying to display sar (CPU metrics) metrics between specific dates and I don't know exactly how it should be done.

    any help would be great thanks!

  • ErezN
    ErezN almost 8 years
    Thanks! what is the convention for -s and -e options? can you elaborate about this option with an example?