Tag: sysstat

  • 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

  • Enable sar in Ubuntu

    On Ubuntu, when i run sar, i get error

    root@localhost:~# sar
    Cannot open /var/log/sysstat/sa31: No such file or directory
    Please check if data collecting is enabled
    root@localhost:~# 
    

    This is because sysstat is not enabled by default on Ubuntu, to enable, edit file

    vi /etc/default/sysstat
    

    Find

    ENABLED="false"
    

    Replace with

    ENABLED="true"
    

    Now restart sysstat

    systemctl restart sysstat
    

    See sar