# sysstat(5) - man - phpMan

[SYSSTAT(5)](https://www.chedong.com/phpMan.php/man/SYSSTAT/5/markdown)                               Linux User's Manual                              [SYSSTAT(5)](https://www.chedong.com/phpMan.php/man/SYSSTAT/5/markdown)



## NAME
       sysstat - sysstat configuration file.


## DESCRIPTION
       This  file  is  read  by [**sa1**(8)](https://www.chedong.com/phpMan.php/man/sa1/8/markdown) and [**sa2**(8)](https://www.chedong.com/phpMan.php/man/sa2/8/markdown) shell scripts from the sysstat's set of tools.  It
       consists of a sequence of shell variable assignments used to configure sysstat logging.   The
       variables and their meanings are:

       **COMPRESSAFTER**
              Number  of  days  after  which daily data files are to be compressed.  The compression
              program is given in the **ZIP** variable.

       **DELAY**___**RANGE**
              Tell **sa2** script to wait for a random delay in  the  indicated  range  before  running.
              This  delay is expressed in seconds, and is aimed at preventing a massive I/O burst at
              the same time on VM sharing the same storage area.  A value of 0 means that **sa2** script
              will generate its reports files immediately.

       **HISTORY**
              The  number  of  days  during which a daily data file or a report should be kept. Data
              files or reports older than this number of days will be removed by  the  [**sa2**(8)](https://www.chedong.com/phpMan.php/man/sa2/8/markdown)  shell
              script.   Data files and reports are normally saved in the /var/log/sysstat directory,
              under the name _saDD_ (for data files) or _sarDD_ (for reports), where  the  _DD_  parameter
              indicates the current day.

              The  number  of  files actually kept in the /var/log/sysstat directory may be slightly
              higher than the **HISTORY** value due to the way the **sa2** script figures  out  which  files
              are  to  be removed (see below "How the [**sa2**(8)](https://www.chedong.com/phpMan.php/man/sa2/8/markdown) script applies **HISTORY** value"). Using a
              value of 28 keeps a whole month's worth of data. If you set **HISTORY** to a value greater
              than  28  then  you should consider using **sadc**'s option **-D** to prevent older data files
              from being overwritten (see [**sadc**(8)](https://www.chedong.com/phpMan.php/man/sadc/8/markdown) manual page). In this latter case data  files  are
              named  _saYYYYMMDD_  and reports _sarYYYYMMDD_, where _YYYY_ stands for the current year, _MM_
              for the current month and _DD_ for the current day.

              How the [**sa2**(8)](https://www.chedong.com/phpMan.php/man/sa2/8/markdown) script applies **HISTORY** value

              The **sa2** script uses the **find** command with the **-mtime** option to figure out which  files
              are  to be removed. The **find** command interprets this value as "N 24 hour periods", ig‐
              noring any fractional part. This means that the last modified time of a given  _sa[r]DD_
              data or report file, using a **HISTORY** of 1, has to have been modified at least two days
              ago before it will be removed. And for a **HISTORY** of 28 that would mean 29 days ago.

              To figure out how a **HISTORY** of 28 is applied in practice, we need to consider that the
              **sa2**  script  that  issues the **find** command to remove the old files typically runs just
              before mid-night on a given system, and since the first record from **sadc** can  also  be
              written  to  the  previous  day's data file (thereby moving its modification time up a
              bit), the **sa2** script will leave 30 files untouched. So for a setting of 28, and count‐
              ing  the data file of the current day, there will always be 31 files (or 30 files, de‐
              pending on the number of days in a month) in the /var/log/sysstat directory during the
              majority of a given day.  E.g.:

              April 30th: 31 files (Apr 30th-1st, Mar 31th)
              May 1st: 30 files (May 1st, Apr 30th-2nd)

              Yet we can note the following exceptions (as inspected at Noon of the given day):

              February 28th: 31 files (Feb 28th-1st, Jan 31st, 30th & 29th)
              March 1st: 30 files (Mar 1st, Feb 28th-2nd, Jan 31st & 30th)
              March 2nd: 29 files (Mar 1st & 2nd, Feb 28th-3rd, Jan. 31st)
              March 3rd: 28 files (Mar 1st-3rd, Feb 28th-4th)
              March 4th - March 28th: 28 files
              March 29th: 29 files
              March 30th: 30 files
              March 31st: 31 files

              (Determining  the  number  of files in March on a leap year is left as an exercise for
              the reader).

              Things are simpler if you use the _sa[r]YYYYMMDD_ name format.  Apply the same logic  as
              above  in  this  case and you will find that there are always **HISTORY** + 3 files in the
              _/var/log/sysstat_ directory during the majority of a given day.

       **REPORTS**
              Set this variable to **false** to prevent the **sa2**  script  from  generating  reports  (the
              _sarDD_ files).

       **SA**___**DIR** Directory  where  the  standard system activity daily data and report files are saved.
              Its default value is _/var/log/sysstat_.

       **SADC**___**OPTIONS**
              Options that should be passed to [**sadc**(8)](https://www.chedong.com/phpMan.php/man/sadc/8/markdown).  With  these  options  (see  [**sadc**(8)](https://www.chedong.com/phpMan.php/man/sadc/8/markdown)  manual
              page),  you  can select some additional data which are going to be saved in daily data
              files.  These options are used only when a new data file is created. They will be  ig‐
              nored with an already existing one.

       **YESTERDAY**
              By  default  **sa2** script generates yesterday's summary, since the **cron** job usually runs
              right after midnight. If you want **sa2** to generate the summary of the same day (for ex‐
              ample when cron job runs at 23:53) set this variable to **no**.

       **ZIP**    Program used to compress data and report files.


## FILE
       _/etc/sysstat/sysstat_


## AUTHOR
       Sebastien Godard (sysstat <at> orange.fr)


## SEE ALSO
       [**sadc**(8)](https://www.chedong.com/phpMan.php/man/sadc/8/markdown), [**sa1**(8)](https://www.chedong.com/phpMan.php/man/sa1/8/markdown), [**sa2**(8)](https://www.chedong.com/phpMan.php/man/sa2/8/markdown)

       _<https://github.com/sysstat/sysstat_>
       _<http://pagesperso-orange.fr/sebastien.godard/_>



Linux                                         JULY 2020                                   [SYSSTAT(5)](https://www.chedong.com/phpMan.php/man/SYSSTAT/5/markdown)
