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