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 midnight
59              on a given system, and since the first record from sadc can also
60              be written to the previous day's data file (thereby  moving  its
61              modification  time up a bit), the sa2 script will leave 30 files
62              untouched. So for a setting of 28, and counting the data file of
63              the current day, there will always be 31 files (or 30 files, de‐
64              pending on the number of days in a month) in the /var/log/sa di‐
65              rectory 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       REPEAT_HEADER
91              Maximum number of lines after which a header will be inserted in
92              the  report  generated by sa2 script. By default there is only a
93              header at the beginning of each report and it  is  not  repeated
94              afterwards.
95
96       REPORTS
97              Set this variable to false to prevent the sa2 script from gener‐
98              ating reports (the sarDD files).
99
100       SA_DIR Directory where the standard system activity daily data and  re‐
101              port files are saved. Its default value is /var/log/sa.
102
103       SADC_OPTIONS
104              Options  that  should  be passed to sadc(8).  With these options
105              (see sadc(8) manual page), you can select some  additional  data
106              which  are going to be saved in daily data files.  These options
107              are used only when a new data file is created. They will be  ig‐
108              nored with an already existing one.
109
110       YESTERDAY
111              By  default  sa2 script generates yesterday's summary, since the
112              cron job usually runs right after midnight. If you want  sa2  to
113              generate  the summary of the same day (for example when cron job
114              runs at 23:53) set this variable to no.
115
116       ZIP    Program used to compress data and report files.
117
118

FILE

120       /etc/sysconfig/sysstat
121
122

AUTHOR

124       Sebastien Godard (sysstat <at> orange.fr)
125
126

SEE ALSO

128       sadc(8), sa1(8), sa2(8)
129
130       https://github.com/sysstat/sysstat
131
132
133
134Linux                              MAY 2023                         SYSSTAT(5)
Impressum