Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

on our servers, typing sar show's the system load statistics for today starting at midnight, is it possible to show yesterdays statistics?

share|improve this question

1 Answer 1

up vote 24 down vote accepted

Usually, sysstat, which provides a sar command, keeps logs in /var/log/sysstat/ or /var/log/sa/ with filenames such as /var/log/sysstat/sadd where dd is a numeric value for the day of the week (starting at 01). By default, the file from the current day is used; however, you can change the file that is used with the -f command line switch. Thus for the 3rd of the month you would do something like:

sar -f /var/log/sysstat/sa03

If you want to restrict the time range, you can use the -s and -e parameters. If you want to routinely get yesterday's file and can never remember the date and have GNU date you could try

sar -f /var/log/sysstat/sa$(date +%d -d yesterday)

I highly recommend reading the manual page for sar.

share|improve this answer
on our cPanel/CentOS systems it appears to be in /var/log/sa – xenoterracide Jan 10 '11 at 6:59
yup, centos it's: sar -b -f /var/log/sa/sa20 for the 20th of the month. – stantonk Jan 21 at 0:51
/var/log/sa for Redhat as well – sweetfa Feb 3 at 21:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.