1SYSSTAT(5)                    Linux User's Manual                   SYSSTAT(5)
2
3
4

NAME

6       sysstat - sysstat configuration file.
7
8

DESCRIPTION

10       This file is read by sa1(8) and sa2(8) shell scripts from the sysstat's
11       set of tools.  It consists of a sequence of shell variable  assignments
12       used  to  configure  sysstat logging.  The variables and their meanings
13       are:
14
15       COMPRESSAFTER
16              Number of days after which daily  data  files  are  to  be  com‐
17              pressed.  The compression program is given in the ZIP variable.
18
19       DELAY_RANGE
20              Tell  sa2  script  to  wait  for a random delay in the indicated
21              range before running.  This delay is expressed in  seconds,  and
22              is  aimed  at preventing a massive I/O burst at the same time on
23              VM sharing the same storage area.  A value of 0 means  that  sa2
24              script will generate its reports files immediately.
25
26       HISTORY
27              The  number  of  days during which a daily data file or a report
28              should be kept. Data files or reports older than this number  of
29              days will be removed by the sa2(8) shell script.  Data files and
30              reports are normally saved in the /var/log/sa  directory,  under
31              the name saDD (for data files) or sarDD (for reports), where the
32              DD parameter indicates the current day.
33
34              The number of files actually kept in the  /var/log/sa  directory
35              may be slightly higher than the HISTORY value due to the way the
36              sa2 script figures out which files are to be removed (see  below
37              "How the sa2(8) script applies HISTORY value"). Using a value of
38              28 keeps a whole month's worth of data. If you set HISTORY to  a
39              value  greater than 28 then you should consider using sadc's op‐
40              tion -D to prevent older data files from being overwritten  (see
41              sadc(8)  manual  page). In this latter case data files are named
42              saYYYYMMDD and reports sarYYYYMMDD, where YYYY  stands  for  the
43              current  year,  MM  for the current month and DD for the current
44              day.
45
46              How the sa2(8) script applies HISTORY value
47
48              The sa2 script uses the find command with the -mtime  option  to
49              figure  out  which files are to be removed. The find command in‐
50              terprets this value as "N 24 hour periods", ignoring  any  frac‐
51              tional  part.  This means that the last modified time of a given
52              sa[r]DD data or report file, using a HISTORY of 1, has  to  have
53              been  modified  at least two days ago before it will be removed.
54              And for a HISTORY of 28 that would mean 29 days ago.
55
56              To figure out how a HISTORY of 28 is  applied  in  practice,  we
57              need  to  consider that the sa2 script that issues the find com‐
58              mand to remove the old files typically  runs  just  before  mid-
59              night  on  a  given system, and since the first record from sadc
60              can also be written to the previous  day's  data  file  (thereby
61              moving  its  modification  time  up  a bit), the sa2 script will
62              leave 30 files untouched. So for a setting of 28,  and  counting
63              the  data file of the current day, there will always be 31 files
64              (or 30 files, depending on the number of days in a month) in the
65              /var/log/sa directory during the majority of a given day.  E.g.:
66
67              April 30th: 31 files (Apr 30th-1st, Mar 31th)
68              May 1st: 30 files (May 1st, Apr 30th-2nd)
69
70              Yet  we  can note the following exceptions (as inspected at Noon
71              of the given day):
72
73              February 28th: 31 files (Feb 28th-1st, Jan 31st, 30th & 29th)
74              March 1st: 30 files (Mar 1st, Feb 28th-2nd, Jan 31st & 30th)
75              March 2nd: 29 files (Mar 1st & 2nd, Feb 28th-3rd, Jan. 31st)
76              March 3rd: 28 files (Mar 1st-3rd, Feb 28th-4th)
77              March 4th - March 28th: 28 files
78              March 29th: 29 files
79              March 30th: 30 files
80              March 31st: 31 files
81
82              (Determining the number of files in March on a leap year is left
83              as an exercise for the reader).
84
85              Things  are  simpler  if  you use the sa[r]YYYYMMDD name format.
86              Apply the same logic as above in this case  and  you  will  find
87              that  there  are always HISTORY + 3 files in the /var/log/sa di‐
88              rectory during the majority of a given day.
89
90       REPORTS
91              Set this variable to false to prevent the sa2 script from gener‐
92              ating reports (the sarDD files).
93
94       SA_DIR Directory  where the standard system activity daily data and re‐
95              port files are saved. Its default value is /var/log/sa.
96
97       SADC_OPTIONS
98              Options that should be passed to sadc(8).   With  these  options
99              (see  sadc(8)  manual page), you can select some additional data
100              which are going to be saved in daily data files.  These  options
101              are  used only when a new data file is created. They will be ig‐
102              nored with an already existing one.
103
104       YESTERDAY
105              By default sa2 script generates yesterday's summary,  since  the
106              cron  job  usually runs right after midnight. If you want sa2 to
107              generate the summary of the same day (for example when cron  job
108              runs at 23:53) set this variable to no.
109
110       ZIP    Program used to compress data and report files.
111
112

FILE

114       /etc/sysconfig/sysstat
115
116

AUTHOR

118       Sebastien Godard (sysstat <at> orange.fr)
119
120

SEE ALSO

122       sadc(8), sa1(8), sa2(8)
123
124       https://github.com/sysstat/sysstat
125       http://pagesperso-orange.fr/sebastien.godard/
126
127
128
129Linux                              JULY 2020                        SYSSTAT(5)
Impressum