Introduction to Sysstat
        
        
          The Sysstat package contains
          utilities to monitor system performance and usage activity.
          Sysstat contains the sar utility, common to many
          commercial Unixes, and tools you can schedule via cron to collect
          and historize performance and activity data.
        
        
          This package is known to build and work properly using an LFS 12.4
          platform.
        
        
          Package Information
        
        
       
      
        
          Installation of Sysstat
        
        
          Install Sysstat by running the
          following commands:
        
        sa_lib_dir=/usr/lib/sa    \
sa_dir=/var/log/sa        \
conf_dir=/etc/sysstat     \
./configure --prefix=/usr \
            --disable-file-attr &&
make
        
          This package does not come with a working test suite.
        
        
          Now, as the root user:
        
        make install
        
          Install the systemd units and timers by running the following
          commands as the root user:
        
        install -v -m644 sysstat.service /usr/lib/systemd/system/sysstat.service                      &&
install -v -m644 cron/sysstat-collect.service /usr/lib/systemd/system/sysstat-collect.service &&
install -v -m644 cron/sysstat-collect.timer /usr/lib/systemd/system/sysstat-collect.timer     &&
install -v -m644 cron/sysstat-rotate.service /usr/lib/systemd/system/sysstat-rotate.service   &&
install -v -m644 cron/sysstat-rotate.timer /usr/lib/systemd/system/sysstat-rotate.timer       &&
install -v -m644 cron/sysstat-summary.service /usr/lib/systemd/system/sysstat-summary.service &&
install -v -m644 cron/sysstat-summary.timer /usr/lib/systemd/system/sysstat-summary.timer
        
          Fix one of the systemd units by running the following command as
          the root user:
        
        sed -i "/^Also=/d" /usr/lib/systemd/system/sysstat.service
       
      
        
          Command Explanations
        
        
          sa_lib_dir: This environment variable
          specifies the location of the package-specific library directory.
        
        
          sa_dir: This environment variable
          specifies the location of the directory containing the data files.
        
        
          conf_dir: This environment variable
          specifies the location of the system configuration directory.
        
        
          --disable-file-attr: Do not
          set attributes on files being installed. This parameter causes the
          installation to ignore the man group variable resulting in the man
          files having root: root ownership.
        
        
          ![[Note]](../images/note.png) 
          
            Note
          
          
            Run ./configure
            --help to see other influential environment
            variables you can pass to configure. You may want to use
            the history and compressafter variables to customize the amount of
            data files kept on the system.
          
         
       
      
        
          Configuring Sysstat
        
        
          
            Config Files
          
          
            /etc/sysconfig/sysstat and
            /etc/sysconfig/sysstat.ioconf
          
         
        
          
            System Startup
            Information
          
          
            At system startup, a LINUX RESTART message must be inserted in
            the daily data file to reinitialize the kernel counters. This can
            be automated by enabling the previously installed systemd unit by
            running the following command as the root user:
          
          systemctl enable sysstat
          
            In addition to placing the LINUX RESTART message into the daily
            data file, there are systemd timers installed which will
            automatically capture the required history information for the
            sar command.