HOW to get SAR Report for one month or 31 days with single command

  1. By using below command, we get CPU report for 31 days.
ls /var/log/sa/sa[0-9][0-9] | while read safile ; do sar -u -f "$safile" ; done > /tmp/sareport_cpu

  1. By using below command, we get Memory Report for 31 days.
ls /var/log/sa/sa[0-9][0-9] | while read safile ; do sar -r -f "$safile" ; done > /tmp/sareport_memory

  1. By using below command, we get load average report for 31 days.
ls /var/log/sa/sa[0-9][0-9] | while read safile ; do sar -q -f "$safile" ; done > /tmp/sareport_load_average

Leave a Reply

Your email address will not be published. Required fields are marked *