Sebastien GODARD [Fri, 28 Jun 2019 09:33:14 +0000 (11:33 +0200)]
simtest: sar: Add non regression tests for sensors statistics
Sensors statistics cannot be read in Travis CI environment because the
requested library is not available. But we can at least display sensors
statistics from a binary datafile already containing them.
Sebastien GODARD [Fri, 28 Jun 2019 07:23:51 +0000 (09:23 +0200)]
simtest: Try to simulate the addition of a new FB host
For this, we need to make sure that FB hosts will always be read in
the same order (and especially on Travis CI VM) though this may depend
on the underlying filesystem implementation.
Sebastien GODARD [Fri, 28 Jun 2019 06:54:36 +0000 (08:54 +0200)]
sar: Better handle the case when FB hosts are added to the system
If a new Fibre Channel host is registered in the system, now display its
statistics even for the interval during which it has been registered. In
this case, its initial counters values are considered as 0.
Sebastien GODARD [Fri, 28 Jun 2019 06:00:05 +0000 (08:00 +0200)]
simtest: Make it possible to use /dev/sdb in iostat test
/dev/sdb probably doesn't exist on Travis CI virtual machine, making
iostat non regression test using it fail.
Make sure we stay in our simulation environment by providing a
replacement function for realpath() system call.
Sebastien GODARD [Fri, 21 Jun 2019 15:48:44 +0000 (17:48 +0200)]
iostat: Fix wrong CPU stats displayed with option -y
CPU statistics written for the first sample was wrong when option -y was
used. This was because the interval of time used was that since system
startup whereas it should have been the interval of time since last
sample (which is not displayed with option -y).
In 789cd86fb0, read_net_icmp() obtained code to differentiate between
the old and new format of /proc/net/snmp, which differ by the addition
of "InCsumErrors" in the 3rd position. Add the exact same handling logic
to read_net_eicmp() as well
sar/sadf: Allow to select individual CPU/interrupts with option -A
Previously, using option -A with sar or sadf would display statistics
for all CPU and interrupts (i.e. using -A would also imply -P ALL -I
ALL).
Now this will be true only if the user didn't specify explicitly a list
of CPU or interrupts using options -P or -I.
Example: "sar -A -P1,4" will display all possible statistics but only those
concerning CPU 1 and 4 for CPU-related metrics.
Sebastien GODARD [Fri, 31 May 2019 07:00:08 +0000 (09:00 +0200)]
sysstat-12.1.5
sysstat version 12.1.5 final packaging.
lsm and spec files updated.
Changelog added.
This version completes the support for PCP (Performance Co-Pilote)
output format with sadf: All statistics collected by sar/sadc can now
be exported to a PCP archive file.
This version also includes now a simulation test environment. This makes
it possible to run non regression tests with reproducible results. The
tests are run in a simulated environment composed of kernel files with
predefined values.
For now, only non regression tests have been added for sar, sadc and
sadf commands. Yet they have permitted to identify several bugs which
have been fixed here and also backported to version 12.0.5.
Sebastien GODARD [Fri, 10 May 2019 16:23:00 +0000 (18:23 +0200)]
sadf: Fix PCP and SVG output for filesystem statistics
When the mount point had to be displayed instead of the filesystem name
with sar's option -F (i.e. the user entered "-F MOUNT" instead of just
"-F"), no data were found by sadf -g (SVG output) and sadf -l (PCP
output). This patch fixes the problem.
Sebastien GODARD [Fri, 10 May 2019 06:09:02 +0000 (08:09 +0200)]
iostat: Fix iostat regression for groups of devices
Device groups specified with iostat's option -g were no longer
displayed in the device report because of a regression introduced by
commit ccda26c. Fix that.
sadf: Time used by options -s/-e no longer depends on the timezone value
The time specified with options -s and -e used by sadf has no longer to
be expressed in local time. This time is now consistent with that
displayed by sadf, e.g.: If sadf displays its timestamps in local time
then the time specified with options -s/-e is considered as expressed in
local time. If sadf displays its timestamps in UTC then the time used
with options -s/-e is also considered as expressed in UTC.
sar: Use nanoseconds to distinguish between saDD and saYYYYMMDD
When no input datafile is specified, sar uses the most recent file
between saDD and saYYYYMMDD. The comparison had a precision of a second,
which is quite enough for normal use. Yet I needed more precision for
use in simulation tests. So use now a precision of the nanosecond.
The statistics will depend on the host where the tests are run. So
don't collect them.
They also should not appear in datafile header displayed by sadf -H.
Don't add another Fibre Channel host when running sysstat simulation
tests. The output displayed by sar and sadf will depend on the order in
which filenames are read, which is dependent on the underlying
filesystem implementation, thus making tests non reproducible.
This patch adds all the necessary files to be able to run non regression
tests with reproducible results. The tests run in a simulated
environment composed of kernel files with predefined values.
sadc: Fix bad number of CPU displayed in a LINUX RESTART message
sadc didn't take into account properly a different number of CPU
When appending data to an existing file. This was because the number of
CPU recorded with the restart message was overwritten with that
originally saved in the file.
This patch fixes the problem.
sar: Better detect if a disk has been unregistered then registered again
If a disk was mounted read-only then sar might not detect that a disk
had been unregistered then registered again. This is because detection
is based on counters (like number of written sectors) going down. Yet
with a read-only device, the number of written sectors is always 0 and
is never decremented.
sysstat version 12.1.4 final packaging.
lsm and spec files updated.
Changelog added.
This version adds initial support for PCP (Performance Co-Pilot) output
format. sadf can now export part of its data to a PCP archive file.
This support is still experimental and will be completed in next sysstat
version.
This version also fixes several bugs. The major ones are:
* autofs entries in /etc/mtab are now ignored so that sar/sadf don't
mount the corresponding filesystems when reading their statistics.
* JSON output for iostat and mpstat has been improved so that the
commands can be interrupted with ^C (SIGINT signal) and we still get a
valid JSON output.
This flag indicates that corresponding output format shall use a decimal
point, e.g. to be locale independant (SVG output) or compliant with
RFC7159 (JSON output).
pmiWrite() function (from the PCP API) has a very nasty impact on
mktime().
Once pmiWrite has been called, subsequent mktime() calls will no longer
give the same result using the same input data, resulting in timestamps
that can be wrong because associated with a different timezone.
This patch tries to fix that.
Sebastien GODARD [Fri, 29 Mar 2019 20:29:54 +0000 (21:29 +0100)]
sadf: PCP: Take into account timezone value
The user can choose to save data in PCP archive with timestamps in UTC
(by default) or in local time (when option -T is used).
Timezone value, which is saved in PCP archive, is set accordingly.