2.4. I get the following error message when I try to run sar:
Cannot open /var/log/sa/sa30: No such file or directory
-Please read the sar(1) manual page! Daily data files are created in the
-/var/log/sa directory using the data collector (sadc) or using option
--o with sar. Once they are created, sar can display statistics saved
-in those files.
+Please read the sar(1) manual page! Daily data files are created by default
+in the /var/log/sa directory using the data collector (sadc) or using
+option -o with sar. Once they are created, sar can display statistics
+saved in those files.
But sar can also display statistics collected "on the fly": Just enter
the proper options on the command line to indicate which statistics are
to be displayed, and also specify <interval> and <count> numbers.
2.19. How can I keep sar data for more than one month?
By default sar saves its data in the standard system activity data file,
-the /var/log/sa/sa<DD> file, where <DD> is the current day in the month.
+the /var/log/sa/saDD file, where DD is the current day in the month.
To prevent sar from overwriting any existing files, just set the variable
HISTORY in /etc/sysconfig/sysstat to the number of days during which data
must be kept. When this variable has a value greater than 28, sa1 script
uses a month-by-month directory structure; datafiles are named YYYYMM/saDD
and the script maintains links to these datafiles to mimic the standard
-sar datafile structure.
-However please note that pre-existing datafiles will be deleted as links
-will be created and replace them.
+sar datafile structure. However please note that pre-existing datafiles
+will be deleted as links will be created and replace them.
+Beginning with sysstat version 11.0.0, this tree of directories is no
+longer created. When HISTORY has a value greater than 28, sa1 now calls
+sadc with option -D set, telling it to use saYYYYMMDD instead of saDD
+as the name for the standard system activity daily data files, where
+YYYY stands for the current year, MM for the current month and DD for
+the current day. All these files are saved in the same directory
+(/var/log/sa by default).
~~~
-.TH SA1 8 "AUGUST 2013" Linux "Linux User's Manual" -*- nroff -*-
+.TH SA1 8 "JUNE 2014" Linux "Linux User's Manual" -*- nroff -*-
.SH NAME
sa1 \- Collect and store binary data in the system activity daily data file.
.SH SYNOPSIS
.B sadc
command and handles all of the flags and parameters of that command. The
.B sa1
-command collects and stores binary data in the
-.IR @SA_DIR@/sa dd
-file, where the dd parameter indicates the current day. The
+command collects and stores binary data in the current standard
+system activity daily data file.
+
+The standard system activity daily data file is named
+.I saDD
+unless
+.BR sadc 's
+option
+.B -D
+is used, in which case its name is
+.IR saYYYYMMDD ,
+where YYYY stands for the current year, MM for the current month
+and DD for the current day. By default it is located in the
+.I @SA_DIR@
+directory.
+
+The
.I interval
and
.I count
.B 0,10,20,30,40,50 * * * * @SA_LIB_DIR@/sa1 1 1 -S DISK
.SH FILES
-.IR @SA_DIR@/sa dd
+.I @SA_DIR@/saDD
+.br
+.I @SA_DIR@/saYYYYMMDD
.RS
-Indicate the daily data file, where the
-.B dd
-parameter is a number representing the day of the month.
+The standard system activity daily data files and their default location.
+YYYY stands for the current year, MM for the current month and DD for the
+current day.
.SH AUTHOR
Sebastien Godard (sysstat <at> orange.fr)
.SH SEE ALSO
-.TH SA2 8 "AUGUST 2013" Linux "Linux User's Manual" -*- nroff -*-
+.TH SA2 8 "JUNE 2013" Linux "Linux User's Manual" -*- nroff -*-
.SH NAME
-sa2 \- Write a daily report in the @SA_DIR@ directory.
+sa2 \- Create a report from the current standard system activity daily data file.
.SH SYNOPSIS
.B @SA_LIB_DIR@/sa2
.SH DESCRIPTION
command is a shell procedure variant of the
.B sar
command which writes a daily report in the
-.IR @SA_DIR@/sar dd
-file, where the dd parameter indicates the current day.
-It will also remove reports more than one week old by default.
+.I sarDD
+or the
+.I sarYYYYMMDD
+file, where YYYY stands for the current year, MM for the current month
+and DD for the current day.
+By default the report is saved in the
+.I @SA_DIR@
+directory.
+The
+.B sa2
+command will also remove reports more than one week old by default.
You can however keep reports for a longer (or a shorter) period by setting
the HISTORY environment variable. Read the
.BR sysstat (5)
.B 5 19 * * 1-5 @SA_LIB_DIR@/sa2 -A &
-This will generate a daily report called
-.IR @SA_DIR@/sar dd.
+This will generate by default a daily report called
+.I sarDD
+in the
+.I @SA_DIR@
+directory, where the DD parameter is a number representing the day of the
+month.
.SH FILES
-.IR @SA_DIR@/sar dd
+.I @SA_DIR@/sarDD
+.br
+.I @SA_DIR@/sarYYYYMMDD
.RS
-Indicate the daily report file, where the
-.B dd
-parameter is a number representing the day of the month.
+The standard system activity daily report files and their default location.
+YYYY stands for the current year, MM for the current month and DD for the
+current day.
.SH AUTHOR
Sebastien Godard (sysstat <at> orange.fr)
.SH SEE ALSO
-.TH SADC 8 "JUNE 2013" Linux "Linux User's Manual" -*- nroff -*-
+.TH SADC 8 "JUNE 2014" Linux "Linux User's Manual" -*- nroff -*-
.SH NAME
sadc \- System activity data collector.
.SH SYNOPSIS
.B @SA_LIB_DIR@/sadc [ -C
.I comment
-.B ] [ -F ] [ -L ] [ -V ] [ -S { INT | DISK | SNMP | IPV6 | POWER | XDISK | ALL | XALL } ] [
+.B ] [ -D ] [ -F ] [ -L ] [ -V ] [ -S { INT | DISK | SNMP | IPV6 | POWER | XDISK | ALL | XALL } ] [
.I interval
.B [
.I count
.I outfile
is set to -, then
.B sadc
-uses the standard system activity daily data file, the
-.IR @SA_DIR@/sa dd
-file, where the dd parameter indicates the current day.
-In this case,
+uses the standard system activity daily data file (see below).
+In this case, if the file already exists,
.B sadc
-will overwrite the file if it is from a previous month.
+will overwrite it if it is from a previous month.
By default
.B sadc
collects most of the data available from the kernel.
.B sadc
to be collected (see option -S below).
+The standard system activity daily data file is named
+.I saDD
+unless option
+.B -D
+is used, in which case its name is
+.IR saYYYYMMDD ,
+where YYYY stands for the current year, MM for the current month
+and DD for the current day.
+By default it is located in the
+.I @SA_DIR@
+directory. Yet it is possible to specify an alternate location for
+it: If
+.I outfile
+is a directory (instead of a plain file) then it will be considered
+as the directory where the standard system activity daily data file
+will be saved.
+
When the
.I count
parameter is not specified,
string.
This comment can then be displayed with option -C of
.BR sar .
+.IP -D
+Use
+.I saYYYYMMDD
+instead of
+.I saDD
+as the standard system activity daily data file name.
.IP -F
The creation of
.I outfile
.B sadc
assumes that you are using at least a 2.6 kernel.
.SH FILES
-.IR @SA_DIR@/sa dd
+.I @SA_DIR@/saDD
+.br
+.I @SA_DIR@/saYYYYMMDD
.RS
-Indicate the daily data file, where the
-.B dd
-parameter is a number representing the day of the month.
+The standard system activity daily data files and their default location.
+YYYY stands for the current year, MM for the current month and DD for the
+current day.
.RE
-.IR /proc
-contains various files with system statistics.
+.I /proc
+and
+.I /sys
+contain various files with system statistics.
.SH AUTHOR
Sebastien Godard (sysstat <at> orange.fr)
.SH SEE ALSO
-.TH SADF 1 "AUGUST 2013" Linux "Linux User's Manual" -*- nroff -*-
+.TH SADF 1 "JUNE 2014" Linux "Linux User's Manual" -*- nroff -*-
.SH NAME
sadf \- Display data collected by sar in multiple formats.
.SH SYNOPSIS
.I datafile
is omitted,
.B sadf
-uses the standard system activity file, the
-.IR @SA_DIR@/sa dd
-file, where the dd parameter indicates the current day.
+uses the standard system activity daily data file.
+
+The standard system activity daily data file is named
+.I saDD
+or
+.IR saYYYYMMDD ,
+where YYYY stands for the current year, MM for the current month and
+DD for the current day.
+.B sadf
+will look for the most recent of
+.I saDD
+and
+.IR saYYYYMMDD ,
+and use it. By default it is located in the
+.I @SA_DIR@
+directory. Yet it is possible to specify an alternate location for it:
+If
+.I datafile
+is a directory (instead of a plain file) then it will be considered as
+the directory where the standard system activity daily data file is
+located.
The
.I interval
.RE
.SH FILES
-.IR @SA_DIR@/sa dd
+.I @SA_DIR@/saDD
+.br
+.I @SA_DIR@/saYYYYMMDD
.RS
-Indicate the daily data file, where the
-.B dd
-parameter is a number representing the day of the month.
+The standard system activity daily data files and their default location.
+YYYY stands for the current year, MM for the current month and DD for the
+current day.
.RE
.SH AUTHOR
-.TH SAR 1 "JUNE 2013" Linux "Linux User's Manual" -*- nroff -*-
+.TH SAR 1 "JUNE 2014" Linux "Linux User's Manual" -*- nroff -*-
.SH NAME
sar \- Collect, report, or save system activity information.
.SH SYNOPSIS
-.B sar [ -A ] [ -B ] [ -b ] [ -C ] [ -d ] [ -F ] [ -H ] [ -h ] [ -p ] [ -q ] [ -R ]
+.B sar [ -A ] [ -B ] [ -b ] [ -C ] [ -D ] [ -d ] [ -F ] [ -H ] [ -h ] [ -p ] [ -q ] [ -R ]
.B [ -r ] [ -S ] [ -t ] [ -u [ ALL ] ] [ -V ] [ -v ] [ -W ] [ -w ] [ -y ]
.B [ -I {
.I int
.I filename
is omitted,
.B sar
-uses the standard system activity daily data file,
-the
-.IR @SA_DIR@/sa dd
-file, where the dd parameter indicates the current day.
+uses the standard system activity daily data file (see below).
By default all the data available from the kernel are saved in the
data file.
of that days ago. For example, -1 will point at the standard system
activity file of yesterday.
+Standard system activity daily data files are named
+.I saDD
+or
+.IR saYYYYMMDD ,
+where YYYY stands for the current year, MM for the current month and
+DD for the current day. They are the default files used by
+.B sar
+only when no filename has been explicitly specified.
+When used to write data to files (with its option
+.BR -o ),
+.B sar
+will use
+.I saYYYYMMDD
+if option
+.B -D
+has also been specified, else it will use
+.IR saDD .
+When used to display the records previously saved in a file,
+.B sar
+will look for the most recent of
+.I saDD
+and
+.IR saYYYYMMDD ,
+and use it.
+
+Standard system activity daily data files are located in the
+.I @SA_DIR@
+directory by default. Yet it is possible to specify an alternate
+location for them: If a directory (instead of a plain file) is used
+with options
+.B -f
+or
+.B -o
+then it will be considered as the directory containing the data files.
+
Without the
.B -P
flag, the
.B sar
to display comments that have been inserted by
.BR sadc .
+.IP -D
+Use
+.I saYYYYMMDD
+instead of
+.I saDD
+as the standard system activity daily data file name. This option
+works only when used in conjunction with option
+.B -o
+to save data to file.
.IP -d
Report activity for each block device.
When data are displayed, the device specification
(created by the
.B -o filename
flag). The default value of the
-.B filename
-parameter is the current daily data file, the
-.IR @SA_DIR@/sa dd
-file. The -f option is exclusive of the -o option.
+.I filename
+parameter is the current standard system activity daily data file.
+If
+.I filename
+is a directory instead of a plain file then it is considered as the
+directory where the standard system activity daily data files are
+located. The -f option is exclusive of the -o option.
.IP -H
Report hugepages utilization statistics.
The following values are displayed:
.IP "-o [ filename ]"
Save the readings in the file in binary form. Each reading
is in a separate record. The default value of the
-.B filename
-parameter is the current daily data file, the
-.IR @SA_DIR@/sa dd
-file. The -o option is exclusive of the -f option.
+.I filename
+parameter is the current standard system activity daily data file.
+If
+.I filename
+is a directory instead of a plain file then it is considered as the directory
+where the standard system activity daily data files are located.
+The -o option is exclusive of the -f option.
All the data available from the kernel are saved in the file (in fact,
.B sar
calls its data collector
.B sar
assumes that you are using at least a 2.6 kernel.
.SH FILES
-.IR @SA_DIR@/sa dd
+.I @SA_DIR@/saDD
+.br
+.I @SA_DIR@/saYYYYMMDD
.RS
-Indicate the daily data file, where the
-.B dd
-parameter is a number representing the day of the month.
+The standard system activity daily data files and their default location.
+YYYY stands for the current year, MM for the current month and DD for the
+current day.
.RE
-.IR /proc
-contains various files with system statistics.
+.I /proc
+and
+.I /sys
+contain various files with system statistics.
.SH AUTHOR
Sebastien Godard (sysstat <at> orange.fr)
.SH SEE ALSO
-.TH SYSSTAT 5 "MAY 2014" Linux "Linux User's Manual" -*- nroff -*-
+.TH SYSSTAT 5 "JUNE 2014" Linux "Linux User's Manual" -*- nroff -*-
.SH NAME
sysstat \- sysstat configuration file.
.SH DESCRIPTION
It consists of a sequence of shell variable assignments used to
configure sysstat logging.
The variables and their meanings are:
+.TP
+.B COMPRESSAFTER
+Number of days after which daily data files are to be compressed,
+either by gzip or bzip2.
+
.TP
.B HISTORY
The number of days during which a daily data file or a report
manual page). In this latter case data files are named
.IR saYYYYMMDD
and reports
-.IR sarYYYYMMDD,
+.IR sarYYYYMMDD ,
where YYYY stands for the current year, MM for the
current month and DD for the current day.
exercise for the reader).
.TP
-.B COMPRESSAFTER
-Number of days after which daily data files are to be compressed,
-either by gzip or bzip2.
+.B SA_DIR
+Directory where the standard system activity daily data and report files
+are saved. Its default value is
+.IR @SA_DIR@ .
.TP
.B SADC_OPTIONS
These options are used only when a new data file is created. They will be
ignored with an already existing one.
+.TP
+.ZIP
+Compression program to use to compress data and report files.
+
.SH FILES
.IR @SYSCONFIG_DIR@/sysstat