Tag: sar

  • View Past Performance Data With sar

    View Past Performance Data With sar

    sysstat stores past data in the directory

    /var/log/sa - for RHEL based OS
    /var/log/sysstat - for Debian based OS
    

    sar historical data

    Each day log files are stored in a file with the respective date.

    sa01 - log file for day 1
    sa31 - log file for day 31
    

    To view logs for day 9, run

    sar -f /var/log/sa/sa09
    

    If you want to see entries during a specific time, you can use

    sar -f /var/log/sa/sa09 -s hh:mm:ss
    

    Example

    sar view past data for specific time

    You can specify end time with -e option

    If you want to see IO data, use -b option

    sar -f /var/log/sa/sa09 -b
    
  • install sysstat on centos

    To install sysstat/sar on CentOS, run

    yum install sysstat
    

    Enable and start sysstat

    systemctl enable sysstat
    systemctl start sysstat
    systemctl status sysstat
    

    Allow several minutes to collect data, then you will be able to see stats with sar ommand.

    See sar

  • sar

    Enable sar in Ubuntu

    install sysstat on CentOS

    View Past Performance Data With sar

    To see stats for the previous day, run

    sar -f /var/log/sysstat/saDD

    Where DD is day of the month. For example, to see stats for 10th, run

    sar -f /var/log/sysstat/sa10