]> granicus.if.org Git - sysstat/log
sysstat
6 years agosar/sadc: Make use of __nr_t type
Sebastien GODARD [Sun, 10 Dec 2017 08:35:16 +0000 (09:35 +0100)]
sar/sadc: Make use of __nr_t type

__nr_t type (which defaults to int) is used to define a number of items
(devices, network interfaces, etc.) So use it instead of int in various
places.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agosar: Enhance print_read_error() function
Sebastien GODARD [Sun, 10 Dec 2017 08:08:45 +0000 (09:08 +0100)]
sar: Enhance print_read_error() function

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agosar: No need to init previous iteration structure when a device has been
Sebastien GODARD [Sat, 9 Dec 2017 08:43:33 +0000 (09:43 +0100)]
sar: No need to init previous iteration structure when a device has been
registered again

Simplify code a bit: Don't reset previous iteration's statistics when a
known device has been registered again, since this is already done when
stats are displayed.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agoFix #168: sadf: Fix CSV output for TTY statistics
Sebastien GODARD [Sat, 9 Dec 2017 08:08:07 +0000 (09:08 +0100)]
Fix #168: sadf: Fix CSV output for TTY statistics

The TTY number was repeated before each field value in CSV output
display by sadf:

ubuntu;10;2017-09-29 12:00:31 UTC;0;0.00;0;0.00;0;0.00;0;0.00;0;0.00;0;0.00
ubuntu;10;2017-09-29 12:00:31 UTC;1;0.00;1;0.00;1;0.00;1;0.00;1;0.00;1;0.00

Expected output:

ubuntu;10;2017-09-29 12:00:31 UTC;0;0.00;0.00;0.00;0.00;0.00;0.00
ubuntu;10;2017-09-29 12:00:31 UTC;1;0.00;0.00;0.00;0.00;0.00;0.00

This patch fixes the problem.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agopr_stats.c: Simplify code a bit
Sebastien GODARD [Mon, 4 Dec 2017 17:30:07 +0000 (18:30 +0100)]
pr_stats.c: Simplify code a bit

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agosar/sadc: Get rid of volatile activities
Sebastien GODARD [Fri, 17 Nov 2017 13:37:09 +0000 (14:37 +0100)]
sar/sadc: Get rid of volatile activities

So called "volatile activities" were activities for which the number of
items could vary and corresponding structures were reallocated
accordingly.
In fact only A_CPU activity (CPU statistics) was volatile, to take into
account a possible restart of a VM machine including more CPU than when
the datafile was created.
The goal is now to allocate dynamically all the structures used by
activities, so we no longer have to distinguish between activities which
are volatile or not.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agosar/sadc: Don't assume CPU statistics are always recorded in file
Sebastien GODARD [Fri, 17 Nov 2017 08:33:50 +0000 (09:33 +0100)]
sar/sadc: Don't assume CPU statistics are always recorded in file

CPU statistics were always collected and saved when a saDD datafile was
created. Those statistics were in particular used to compute time
interval in jiffies, and to give the number of processors of the machine
(which was displayed in the report header).

We no longer use CPU jiffies to compute time interval (which is now
expressed in 1/100th of a second and calculated using the /proc/uptime
file). So CPU statistics are no longer compulsory: They may not be
collected and available in file.
Since we always need a way to know the number of CPU of the machine
where the data file has been created, we add a new field (sa_cpu_nr) in
the file_header structure.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agoRemove unused cpu_nr parameter from functions
Sebastien GODARD [Mon, 13 Nov 2017 15:49:03 +0000 (16:49 +0100)]
Remove unused cpu_nr parameter from functions

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agoRemove prealloc.h from .gitignore file
Sebastien GODARD [Mon, 13 Nov 2017 14:07:30 +0000 (15:07 +0100)]
Remove prealloc.h from .gitignore file

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agosar/sadc: Increase devices upper limits
Sebastien GODARD [Sun, 12 Nov 2017 09:14:20 +0000 (10:14 +0100)]
sar/sadc: Increase devices upper limits

We found that previous upper limits values were too low sometimes (e.g.
512 for the maximum number of network interfaces). So increase them.

(Upper limits exist to make sure we don't allocate unreasonably high
amount of memory to save devices statistics, in particular when we read
data from a -possibly- corrupted datafile).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agosar/sadc: Remove preallocation constants
Sebastien GODARD [Sun, 12 Nov 2017 08:17:55 +0000 (09:17 +0100)]
sar/sadc: Remove preallocation constants

Next sysstat version will dynamically allocate records for new devices
when they are registered by the system. So we no longer need to
preallocate those records.
This patch removes the constants and files that were used for this
purpose.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadc: Fix file_header structure composition
Sebastien GODARD [Wed, 1 Nov 2017 08:54:40 +0000 (09:54 +0100)]
sadc: Fix file_header structure composition

The new sa_hz member in file_header structure adds one unsigned long
integer to structure's composition.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadc: Save HZ value in sa datafile header
Sebastien GODARD [Sun, 22 Oct 2017 10:03:35 +0000 (12:03 +0200)]
sadc: Save HZ value in sa datafile header

This parameter gives the number of jiffies per second on the machine
that created the file. It is now saved in file's header.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoRemove unused parameters passed to functions
Sebastien GODARD [Sat, 21 Oct 2017 15:03:51 +0000 (17:03 +0200)]
Remove unused parameters passed to functions

Some variables were passed to functions but unused by them. So remove
them.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoHZ value is no longer needed in several sysstat commands
Sebastien GODARD [Sat, 21 Oct 2017 14:45:09 +0000 (16:45 +0200)]
HZ value is no longer needed in several sysstat commands

So don't pick up its value.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoUse a time interval expressed in seconds, not in jiffies
Sebastien GODARD [Sat, 21 Oct 2017 14:13:35 +0000 (16:13 +0200)]
Use a time interval expressed in seconds, not in jiffies

Now use a time interval expressed in 1/100th of a second instead of
jiffies to calculate statistics. This is independent of the machine.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoDon't compute global system uptime when reading CPU stats
Sebastien GODARD [Fri, 13 Oct 2017 12:20:30 +0000 (14:20 +0200)]
Don't compute global system uptime when reading CPU stats

Don't compute "global system uptime" (i.e. total number of jiffies spent
by all processors) in read_stat_cpu() function so that we don't have to
pass the result from one function to another.
Global system uptime is used only when displaying CPU statistics, so
this is now done locally in the functions displaying CPU statistics.
Also as a consequence, field uptime has been removed from the
record_header structure associated with every sample statistics in
sar/sadc.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoNo longer use /proc/stat to calculate system uptime
Sebastien GODARD [Fri, 13 Oct 2017 07:29:19 +0000 (09:29 +0200)]
No longer use /proc/stat to calculate system uptime

sysstat commands used the /proc/stat file to compute system uptime based
on the number of jiffies spent by CPU#0 (which cannot be set offline).
Now only use the /proc/uptime file which we assume always exists on a
Linux machine.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadf: Don't test for nr2 field value to display it
Sebastien GODARD [Sat, 7 Oct 2017 14:54:12 +0000 (16:54 +0200)]
sadf: Don't test for nr2 field value to display it

Testing for AO_MATRIX flag should be just enough for sadf -H to display
nr2 value.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadf: Don't use f_count2() function pointer
Sebastien GODARD [Wed, 4 Oct 2017 07:51:09 +0000 (09:51 +0200)]
sadf: Don't use f_count2() function pointer

activity structure's f_count2() member (used to count the number of
sub-items) was tested in sadf.c but never initialized (its value is
initialized only when sadc.c is compiled, not sadf.c). So use a specific
flag to indicate if activity has sub-items instead of testing f_count2()
value.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadc/sar: New format (part 6): Remap other structures
Sebastien GODARD [Wed, 4 Oct 2017 07:25:55 +0000 (09:25 +0200)]
sadc/sar: New format (part 6): Remap other structures

Remap file_activity and record_header structures from an older (or
newer) sysstat version to current sysstat version's format.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosa.h: Fix functions prototype
Sebastien GODARD [Sat, 30 Sep 2017 07:34:02 +0000 (09:34 +0200)]
sa.h: Fix functions prototype

Fix remap_struct() and swap_struct() prototypes according to commit
ad4fe0f.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadc/sar: New format (part 5): Remap file_header structure
Sebastien GODARD [Mon, 25 Sep 2017 15:39:17 +0000 (17:39 +0200)]
sadc/sar: New format (part 5): Remap file_header structure

Remap file_header structure from an older (or newer) sysstat version to
current format (from current sysstat version).

file_header is one the structure composing the header of a binary data
file.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoFortify use of structures map
Sebastien GODARD [Sun, 24 Sep 2017 16:16:35 +0000 (18:16 +0200)]
Fortify use of structures map

Add extra checks on *_types_nr[] values read from a file to cope with
possible corrupted files.
*_types_nr[] values give the number of fields of each type (long long,
long, int) composing a structure.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadc: Append data only to strictly compliant files
Sebastien GODARD [Sun, 24 Sep 2017 15:26:17 +0000 (17:26 +0200)]
sadc: Append data only to strictly compliant files

The rule is that sar/sadc should only append data to datafile whose
format is strictly that expected by current sysstat version.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosar: Add further comments in code
Sebastien GODARD [Sun, 24 Sep 2017 15:03:07 +0000 (17:03 +0200)]
sar: Add further comments in code

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoMakefile: Remove old nfsiostat files
Sebastien GODARD [Sun, 24 Sep 2017 09:59:59 +0000 (11:59 +0200)]
Makefile: Remove old nfsiostat files

Make sure that no references to nfsiostat files exist.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadc/sar: New format (part 4): Update file_magic structure
Sebastien GODARD [Fri, 22 Sep 2017 12:18:12 +0000 (14:18 +0200)]
sadc/sar: New format (part 4): Update file_magic structure

Use integer type for upgraded field instead of unsigned char in
file_magic structure. Thus we are no longer limited to 15 for the
patchlevel and sublevel version numbers.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadc/sar: New format (part 3): Use 64-bit time fields
Sebastien GODARD [Fri, 22 Sep 2017 07:27:01 +0000 (09:27 +0200)]
sadc/sar: New format (part 3): Use 64-bit time fields

Now use unsigned long long type for time fields (instead of
unsigned long, which are only 32-bit wide on 32-bit systems).
This is to avoid any future problems (like year 2038 integer
overflow).
Also code the year number as an integer instead of a char in datafile's
header.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadc/sar: New format (part 2): Remap statistics structures
Sebastien GODARD [Fri, 22 Sep 2017 06:40:38 +0000 (08:40 +0200)]
sadc/sar: New format (part 2): Remap statistics structures

Remap structures containing statistics from an older (or newer)
sysstat version to current format (from current sysstat version).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoAdd function to remap a structure
Sebastien GODARD [Fri, 22 Sep 2017 06:33:13 +0000 (08:33 +0200)]
Add function to remap a structure

This function will be used to map two structures from two
different sysstat versions.
It will thus be possible to add new fields, e.g., in structures
containing statistics and still be possible for another sysstat version
to read its contents properly.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosar/sadf: On-the-fly endianness conversion
Sebastien GODARD [Sun, 17 Sep 2017 08:54:34 +0000 (10:54 +0200)]
sar/sadf: On-the-fly endianness conversion

This patch aims at making sar and sadf able to read and process files
created on machines with a different endian type. It will now be
possible e.g., to read a file with sar on a little-endian machine even
if this has been created on a big-endian machine.
Yet it will still not be allowed to append (write) data with sar to a
file with a different endianness type.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoAdd function to swap bytes of the fields of a structure
Sebastien GODARD [Sun, 17 Sep 2017 08:12:30 +0000 (10:12 +0200)]
Add function to swap bytes of the fields of a structure

This function will be used to convert from one endianness type
(little/big endian) to the other.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoUse new gtypes_nr field in svg_stats.c
Sebastien GODARD [Sun, 17 Sep 2017 07:53:49 +0000 (09:53 +0200)]
Use new gtypes_nr field in svg_stats.c

Use new gtypes_nr field added in activity structure that describes the
corresponding structure containing statistics.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosa.h: Add new gtypes_nr field in activity structure
Sebastien GODARD [Sat, 16 Sep 2017 14:30:46 +0000 (16:30 +0200)]
sa.h: Add new gtypes_nr field in activity structure

This field describes the corresponding structure containing statistics
(as defined in rd_stats.h or rd_sensors.h): Number of fields of type
"long long", number of fields of type "long", number of fields of type
"int".
This field will be used for various purposes, e.g., big/little endian
conversion.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosa_common.c: Simplify a bit read_stat_bunch() function
Sebastien GODARD [Sat, 16 Sep 2017 14:13:06 +0000 (16:13 +0200)]
sa_common.c: Simplify a bit read_stat_bunch() function

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoMerge branch 'cpaelzer-fix-empty-char-in-output-bool'
Sebastien GODARD [Fri, 15 Sep 2017 08:36:34 +0000 (10:36 +0200)]
Merge branch 'cpaelzer-fix-empty-char-in-output-bool'

7 years agoFurther simplify cprintf_pc
Christian Ehrhardt [Wed, 13 Sep 2017 05:50:14 +0000 (07:50 +0200)]
Further simplify cprintf_pc

The former fix in cprintf_pc can be simplified further by
relying on the already existing variable "human".

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
7 years agofix 00 byte after values when --human is not set
Christian Ehrhardt [Tue, 12 Sep 2017 11:55:20 +0000 (13:55 +0200)]
fix 00 byte after values when --human is not set

Since 33557c3d: Display a percent sign after the value when --human
option used in non --human mode the output has an exta spurious '0'
byte.

That is printed by the percentage unit being set to char u = '\0'.
But that is not "nothing" it is literally byte "00".

This change only calls printf with a literal % when needed.

Fixes 165

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
7 years agosadf: Update SVG output for new binary datafile format
Sebastien GODARD [Wed, 6 Sep 2017 08:37:47 +0000 (10:37 +0200)]
sadf: Update SVG output for new binary datafile format

This is a small fix for I/O and transfer rate SVG graphs.
Structure stats_io members were considered as unsigned long integers
(since they were packed in the structure) but they actually are unsigned
long long integers.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadc/sar: New format for binary datafiles (part 1)
Sebastien GODARD [Wed, 6 Sep 2017 08:13:46 +0000 (10:13 +0200)]
sadc/sar: New format for binary datafiles (part 1)

This is the first patch aimed at redesigning sar binary datafiles (see
also issue #135).
This patch changes alignment for some structures, in particular:
long long integers don't need to be aligned on addresses multiple of 16
bytes
only long integers must be aligned on addresses multiple of 8 bytes
so that the size is sufficient for both 32 and 64 bit machines.

The consequence is a binary datafile which is much smaller in size than
its predecessor (on my machine, sa datafiles are now on average 33%
smaller than before).
But of course this new format is no longer compatible with previous one
and as a consequence, older sysstat versions won't be able to read it (I
still plan to update "sadf -c" so that old binary datafiles can be
converted to the up-to-date format).

This patch should also fix issue #148.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoFix #164: Allow reproducible build
Sebastien GODARD [Fri, 1 Sep 2017 14:27:09 +0000 (16:27 +0200)]
Fix #164: Allow reproducible build

Make SCCSID strings optional to allow reproducible build.
SCCSID strings are no longer included in executable files by default.
Use "./configure CFLAGS="-D USE_SCCSID" ; make" to include them.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoFix #163: 'iostat -y' json output includes an invalid token
Sebastien GODARD [Sat, 26 Aug 2017 13:34:00 +0000 (15:34 +0200)]
Fix #163: 'iostat -y' json output includes an invalid token

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoFix #162: sadc crashes on a mtab file with really long lines
Sebastien GODARD [Sat, 26 Aug 2017 12:42:28 +0000 (14:42 +0200)]
Fix #162: sadc crashes on a mtab file with really long lines

A segmentation fault may happen with "sadc -S DISK..." or
"sadc -S XDISK..." when lines longer than 512 bytes are read from
/etc/mtab.

Such lines are possible for instance when overlay2 filesystem
with docker is used. In such a case a single mtab entry can look
like this (note that new line characters were added for readability,
the original entry contained only one '\n' at the end):

overlay /var/lib/docker/overlay2/f23d2377a67b9ab1b49555ecd09b2ccdc03
7e0ee5d9e54f87e59f07f4398e71f/merged overlay rw,relatime,lowerdir=/v
ar/lib/docker/overlay2/l/L6VKIYXWBQSJ5R7V35SS43R6Y6:/var/lib/docker/
overlay2/l/UCCHKGXUJPWCMLHR36IZJNNIQP:/var/lib/docker/overlay2/l/RKV
YEXD2FH65FTMK76RDWPLESX:/var/lib/docker/overlay2/l/DX4JZRKTFP2GOO4V6
OWQ6CPJFY:/var/lib/docker/overlay2/l/6CYNWDKADUPPDZJ5IHOH2R7Y5S:/var
/lib/docker/overlay2/l/JTPINUZIATXADL6XWFHG2OYGSF:/var/lib/docker/ov
erlay2/l/OTSTIV5TTRHF4IUD7BODQ2FUON:/var/lib/docker/overlay2/l/QFNH3
EFS5EZGRTC4DPHU3PJ4TU:/var/lib/docker/overlay2/l/ZOOUKT2E5U4CSLP57Z7
MXYX5CD:/var/lib/docker/overlay2/l/3LUU6IDR2HWPTVBARC5K6XSMRC:/var/l
ib/docker/overlay2/l/XOHYBP4RWXQKQZ43I7JKG24KE4:/var/lib/docker/over
lay2/l/MN5M5B7AY5LPXQQC6V2MBJWWBF:/var/lib/docker/overlay2/l/3DRMKQ3
4AIZD2AROU3TVK3OCUT:/var/lib/docker/overlay2/l/73ZXDHBV6C53Q3SPXA57E
OLGHU:/var/lib/docker/overlay2/l/C2IZBQ55EUTGEAAORSLE73ZPNM:/var/lib
/docker/overlay2/l/ITHARNV7RPWN5S3BCZ2QDMZIMJ:/var/lib/docker/overla
y2/l/TQKUV4LEG4AFUUCMFHHRLDBHAH:/var/lib/docker/overlay2/l/N75JZWPPD
EKJ4DTN4GMEGTDIZL:/var/lib/docker/overlay2/l/QGUUYAETPMK643DG3AKWJAI
IZA,upperdir=/var/lib/docker/overlay2/f23d2377a67b9ab1b49555ecd09b2c
cdc037e0ee5d9e54f87e59f07f4398e71f/diff,workdir=/var/lib/docker/over
lay2/f23d2377a67b9ab1b49555ecd09b2ccdc037e0ee5d9e54f87e59f07f4398e71
f/work 0 0

The crash occurs in the get_filesystem_nr() and read_filesystem()
functions which call strchr(line, ' ') but fail to check if the result
is not NULL.

This patch adds this check, and when a single mtab entry requires more
that one call to fgets() (i.e. the entry is longer than 512 bytes), it
ignores outcome of the second and following calls.

Bugs-Debian: https://bugs.debian.org/872926
Signed-off-by: Robert Luberda <robert@debian.org>
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoadd korean translate
JoungKyun Kim [Sun, 20 Aug 2017 18:51:28 +0000 (03:51 +0900)]
add korean translate

7 years agoUpdated comment of SA_DIR
Lukas Zapletal [Tue, 15 Aug 2017 10:54:54 +0000 (12:54 +0200)]
Updated comment of SA_DIR

7 years agoStarting sysstat 11.7.1
Sebastien GODARD [Mon, 14 Aug 2017 06:46:14 +0000 (08:46 +0200)]
Starting sysstat 11.7.1

Update sysstat version number in configure script.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosysstat-11.6.0 v11.6.0
Sebastien GODARD [Mon, 14 Aug 2017 06:41:47 +0000 (08:41 +0200)]
sysstat-11.6.0

sysstat version 11.6.0 final packaging.
lsm and spec files updated.
Changelog added.

NOTE: Other stable versions (11.2.12 and 11.4.6) also exist and will be
available for download from my web site:

http://pagesperso-orange.fr/sebastien.godard/

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoUpdate NLS translations
Sebastien GODARD [Mon, 14 Aug 2017 06:30:44 +0000 (08:30 +0200)]
Update NLS translations

Sync with The Translation Project: Various translations updated.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoCosmetic changes in code
Sebastien GODARD [Sat, 22 Jul 2017 15:15:04 +0000 (17:15 +0200)]
Cosmetic changes in code

This is a bit more compact.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agopidstat: Update manual page
Sebastien GODARD [Mon, 17 Jul 2017 15:48:43 +0000 (17:48 +0200)]
pidstat: Update manual page

Explain pidstat's new option "-e".

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoAdd new option "-e" to pidstat, which can be used to pass a program
Sebastien GODARD [Mon, 17 Jul 2017 15:44:56 +0000 (17:44 +0200)]
Add new option "-e" to pidstat, which can be used to pass a program
to execute and make pidstat monitor it.
When the program terminates, pidstat will catch the SIGCHLD signal and
display the average statistics.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agopidstat: Update manual page
Sebastien GODARD [Sun, 16 Jul 2017 09:07:01 +0000 (11:07 +0200)]
pidstat: Update manual page

Add definition for option -H.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agopidstat: Add new option to display timestamps in seconds since the Epoch
Sebastien GODARD [Sun, 16 Jul 2017 08:51:29 +0000 (10:51 +0200)]
pidstat: Add new option to display timestamps in seconds since the Epoch

Previously, option -h used to display all activities horizontally on a
single line also displayed timestamps in second since the Epoch. Though
this was intended to be used by scripts, it was not necessarily a
desired feature (see #155).
This patch changes option -h so that time format remains unmodified (all
activities are displayed on a single line with no average statistics)
and adds a new option (-H) that tells pidstat to display time in seconds
since the Epoch. This option may be used separately from option -h.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoUpdate README file
Sebastien GODARD [Fri, 14 Jul 2017 15:49:14 +0000 (17:49 +0200)]
Update README file

Tell about the new BUG_REPORT template file.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoAdd BUG_REPORT template file
Sebastien GODARD [Fri, 14 Jul 2017 15:42:59 +0000 (17:42 +0200)]
Add BUG_REPORT template file

This file contains the data that should be provided to report a bug.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoRevert "Fix #148: ARM: sadc crashes because of unaligned memory accesses"
Sebastien GODARD [Mon, 10 Jul 2017 14:59:09 +0000 (16:59 +0200)]
Revert "Fix #148: ARM: sadc crashes because of unaligned memory accesses"

This reverts commit 569378eb1a3be23cdb45ac5d39e354683a7748f8.
Proposed fix for #148 "sadc crashes because of unaligned memory access"
doesn't work properly:
Copying old pointer contents to new pointer destination uses the size of
the memory pointed to by the newly allocated pointer... which is not the
size of the memory the old pointer was pointing to. The result is you
may get a segmentation fault in some cases.
So for now, revert the corresponding patch, awaiting a better solution.

7 years agoRevert "Fix CID 144609: Ressource leak"
Sebastien GODARD [Mon, 10 Jul 2017 14:58:25 +0000 (16:58 +0200)]
Revert "Fix CID 144609: Ressource leak"

This reverts commit 3c553ec126fa32f126ad1526da8a6e733f2bfd7d.

7 years agoUpdate README file
Sebastien GODARD [Mon, 10 Jul 2017 06:14:25 +0000 (08:14 +0200)]
Update README file

iostat doesn't display stats for network filesystems.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoUpdate lsm file
Sebastien GODARD [Mon, 10 Jul 2017 06:13:27 +0000 (08:13 +0200)]
Update lsm file

tapestat command was declared twice.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoStarting sysstat 11.6.0
Sebastien GODARD [Wed, 5 Jul 2017 08:54:05 +0000 (10:54 +0200)]
Starting sysstat 11.6.0

Update sysstat version number in configure script.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosysstat-11.5.7 v11.5.7
Sebastien GODARD [Wed, 5 Jul 2017 08:45:01 +0000 (10:45 +0200)]
sysstat-11.5.7

sysstat version 11.5.7 final packaging.
CREDITS, lsm and spec files updated.
Changelog added.

NOTE: Stable versions (11.2.11 and 11.4.5) also exist and will be
available for download from my web site:

http://pagesperso-orange.fr/sebastien.godard/

The stable versions include only the bug fixes added in sysstat 11.5.7
but not the new features.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoUpdate NLS translations
Sebastien GODARD [Wed, 5 Jul 2017 08:36:37 +0000 (10:36 +0200)]
Update NLS translations

Sync with The Translation Project: Various translation updated.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoSVG: Fix graphs for swap space utilization statistics
Sebastien GODARD [Sun, 25 Jun 2017 07:31:35 +0000 (09:31 +0200)]
SVG: Fix graphs for swap space utilization statistics

Commit 8b71682 added a new metric to sar's memory report (available free
memory). This new metric caused a shift in the array containing data to
be drawn that wasn't properly taken into account (see commit f90adb6).
As a consequence graphs for swap space utilisation statistics (those
corresponding to sar -S output) were wrong.
This patch fixes the problem by using the right position in data array.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosvg_stats.c: Fix typo in comment
Sebastien GODARD [Sun, 25 Jun 2017 07:10:06 +0000 (09:10 +0200)]
svg_stats.c: Fix typo in comment

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoFix #154: pidstat: Don't stop if /proc/#/schedstat files not found
Sebastien GODARD [Fri, 23 Jun 2017 10:00:01 +0000 (12:00 +0200)]
Fix #154: pidstat: Don't stop if /proc/#/schedstat files not found

Commit a41b24a added %wait field to pidstat CPU statistics. This field
is calculated for each task using the contents of /proc/#/schedstat
file. Yet pidstat should not stop if this file cannot be found: It
should display the other CPU statistics as usual and display 0.00 for
this particular field. This is what this patch does.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoStart collect and summary systemd services after sysstat.service
Sebastien GODARD [Fri, 16 Jun 2017 13:17:33 +0000 (15:17 +0200)]
Start collect and summary systemd services after sysstat.service

When booting a system, systemd could start sysstat.service and
sysstat-collect.service at the exact same time, causing sysstat.service
to fail with the "flock: Resource temporarily unavailable" error
message.

To avoid the failure, ensure that sysstat.service is started before the
collect and summary services and timers, by adding
"After=sysstat.service" ordering dependencies.

Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>
Acked-by: Tomasz Torcz <tomek@pipebreaker.pl>
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoDisplay a percent sign after the value when --human option used
Sebastien GODARD [Wed, 7 Jun 2017 13:16:49 +0000 (15:16 +0200)]
Display a percent sign after the value when --human option used

When option --human has been entered, display a percent sign (%)
following every percentage value.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoAdd unit to areq-sz values when --human option has been used
Sebastien GODARD [Wed, 7 Jun 2017 12:01:28 +0000 (14:01 +0200)]
Add unit to areq-sz values when --human option has been used

When iostat and sar display areq-sz, rareq-sz and wareq-sz fields, they
also display the unit if the user has entered option --human.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoDefine constants for metrics units
Sebastien GODARD [Wed, 7 Jun 2017 11:47:04 +0000 (13:47 +0200)]
Define constants for metrics units

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoiostat: Remove trailing colon following "Device" field name
Sebastien GODARD [Wed, 7 Jun 2017 09:38:41 +0000 (11:38 +0200)]
iostat: Remove trailing colon following "Device" field name

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadf: Update DTD/XSD documents
Sebastien GODARD [Wed, 7 Jun 2017 09:29:44 +0000 (11:29 +0200)]
sadf: Update DTD/XSD documents

Take into account new fields names for "sar -d".

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosar: Update manual page
Sebastien GODARD [Wed, 7 Jun 2017 09:13:54 +0000 (11:13 +0200)]
sar: Update manual page

Update fields names and new units used.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoApply "sar -d" changes to sadf
Sebastien GODARD [Wed, 7 Jun 2017 09:02:22 +0000 (11:02 +0200)]
Apply "sar -d" changes to sadf

Replace "rd_sec/s" and "wr_sec/s" fields  (expressed in sectors) with
"rkB/s" and "wkB/s" (expressed in kilobytes).
Replace "avgrq-sz" field (expressed in sectors) with "areq-sz" (expressed
in kilobytes).

Rename "avgqu-sz" field to "aqu-sz".

Original field names are still present in sadf's XML and JSON output to
keep backward compatibility.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosar: Update "sar -d" output contents
Sebastien GODARD [Wed, 7 Jun 2017 08:12:42 +0000 (10:12 +0200)]
sar: Update "sar -d" output contents

Replace "rd_sec/s" and "wr_sec/s" fields with "rkB/s" and "wkB/s". These
fields are now expressed in kilobytes instead of sectors. This also make
them consistent with iostat's output.

Replace "avgrq-sz" field with "areq-sz". This field is now expressed in
kilobytes instead of sectors and make it consistent with iostat's output.

Rename "avgqu-sz" field to "aqu-sz" to make it consistent with iostat's
output.

Notes:
1) All those changes don't break the format of sar's binary data files.
The values for rkB/s, wkB/s and areq-sz fields are still saved as a
number of sectors. Only the output displayed onto the screen changes.
2) I plan to keep the original field names (in addition to the new ones)
in sadf's XML and JSON output to keep backward compatibility. This means
you will still get fields named rd_sec, wr_sec and avgrq-sz (expressed
in sectors) in XML and JSON output in addition to the new fields rkB,
wkB and areq-sz expressed in kB.
Field avgqu-sz will still exist too.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoiostat: JSON output now depends on options used
Sebastien GODARD [Mon, 5 Jun 2017 19:08:17 +0000 (21:08 +0200)]
iostat: JSON output now depends on options used

Make JSON output take into account the options used with iostat.

This fixes a problem where some fields had a name like rkB/s or wkB/s
even when data were expressed in MB. In this example, the name will now
be rMB/s or wMB/s when data are expressed in MB.

This patch renames several fields, breaking backward compatibility that
I first hoped to keep. However all fields are now consistent with
iostat's standard report.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoiostat: Update manual page
Sebastien GODARD [Sun, 4 Jun 2017 13:50:28 +0000 (15:50 +0200)]
iostat: Update manual page

Explain new metrics that have been added.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoiostat: Express requests average size in kB, not sectors
Sebastien GODARD [Sun, 4 Jun 2017 13:36:55 +0000 (15:36 +0200)]
iostat: Express requests average size in kB, not sectors

Since field "avgrq-sz" was renamed to "areq-sz", also change its unit:
This is now a number of kilobytes, and not sectors.
JSON output keeps both fields for backward compatibility: "avgrq-sz"
expressed in sectors, and "areq-sz" expressed in kilobytes.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoUpdate iostat manual page (option -s)
Sebastien GODARD [Sat, 3 Jun 2017 14:22:31 +0000 (16:22 +0200)]
Update iostat manual page (option -s)

Explain iostat's new option "-s".

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoiostat: Add new metrics in extended statistics output
Sebastien GODARD [Sat, 3 Jun 2017 13:35:36 +0000 (15:35 +0200)]
iostat: Add new metrics in extended statistics output

Add the following metrics to iostat -x output:

%rrqm: percentage of read requests merged
%wrqm: percentage of write requests merged
rareq-sz: average size (in sectors) of the read requests
wareq-sz: average size (in sectors) of the write requests

The metric previously known as "avgqu-sz" has been renamed to "aqu-sz"
(except in the JSON output where the name remains unchanged).
The metric previously known as "avgrq-sz" has been renamed to "areq-sz"
(except in the JSON output where the name remains unchanged).

The "await" metric is no longer displayed in the default output (you
have separate values for reads and writes: "r_await", "w_await"),
except in the short output version where it replaces "r_await" and
"w_await".

Sample output for "iostat -xd":

Device:           r/s     w/s     rkB/s     wkB/s   rrqm/s   wrqm/s
%rrqm  %wrqm r_await w_await aqu-sz rareq-sz wareq-sz  svctm  %util
sda              4.52    1.46    122.57     21.55     1.16     0.96
20.39  39.75   12.42   56.40   0.14    54.22    29.52   2.60   1.55

The short output version (using switch -s) merges data for reads and
writes (when relevant).
Sample output for "iostat -xds":

Device:            tps      kB/s    rqm/s   await aqu-sz  areq-sz  %util
sda               5.89    141.65     2.09   23.12   0.14    48.14   1.53

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoiostat: Add new "-s" switch
Sebastien GODARD [Sat, 3 Jun 2017 08:53:13 +0000 (10:53 +0200)]
iostat: Add new "-s" switch

This switch will tell iostat to display a short version of its output.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoUpdate year in (C) message
Sebastien GODARD [Sat, 3 Jun 2017 08:39:38 +0000 (10:39 +0200)]
Update year in (C) message

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoCast variables to target type before use
Sebastien GODARD [Fri, 2 Jun 2017 07:38:40 +0000 (09:38 +0200)]
Cast variables to target type before use

This patch casts some variables to target type before they are used.
Without this patch, problems may happen (like issue #150) notably on 32
bit architectures where sizeof(long) is different from sizeof(long
long).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoSVG: Define a max number of horizontal lines for the background grid
Sebastien GODARD [Sat, 27 May 2017 13:58:54 +0000 (15:58 +0200)]
SVG: Define a max number of horizontal lines for the background grid

When a graph for percentage values is displayed, a background grid with
horizontal lines for 25%, 50%, 75% and 100% is drawn.
This works well except when sadf gets a bogus value for the maximum
value reached by the metric. For example, if sadf thinks that the max
value is 123456789% then a high number of horizontal lines will be
drawn, resulting in a huge SVG file that can weigh hundreds of megabytes
or more (NB: There are metrics which are percentage values that can go
above 100%, e.g., %commit).
This patch fixes that by setting a limit for the number of horizontal
lines that can be drawn.

See issue #150.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoUpdate sysstat's manual pages
Sebastien GODARD [Wed, 24 May 2017 13:21:49 +0000 (15:21 +0200)]
Update sysstat's manual pages

Update default colors used by sysstat commands in manual pages.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoFix #151: sar: Default colors are suboptimal for light backgrounds
Sebastien GODARD [Wed, 24 May 2017 12:03:10 +0000 (14:03 +0200)]
Fix #151: sar: Default colors are suboptimal for light backgrounds

Default colors are suboptimal for terminals with light backgrounds.
Change them so that they can usable on both dark and light terminal
backgrounds.

Reported-by: Peter Schiffer
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoFix #153: sar program buffer overflow when options -s or -e specified
Sebastien GODARD [Wed, 24 May 2017 09:23:03 +0000 (11:23 +0200)]
Fix #153: sar program buffer overflow when options -s or -e specified

When a short time format is used with sar's options -s or -e (e.g.,
sar -s 04:00), 5 characters are copied by strncpy in parse_timestamp
to timestamp variable. Unfortunately these 5 characters do not contain
the termination, therefore the following strcat appends after the
next "random" null byte. Therefore writing beyond the end of timestamp.

This patch tries to prevent this by explicitly terminating.

Debian bug #863197.

Reported-by: Robert Luberda
Signed-off-by: Bernhard Ubelacker <bernhardu@mailbox.org>
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoFix CID 144609: Ressource leak
Sebastien GODARD [Sun, 14 May 2017 16:52:06 +0000 (18:52 +0200)]
Fix CID 144609: Ressource leak

In SREALLOC() macro: Old pointer was not freed when a realloc() had
happened.
Bug introduced by commit 569378e.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoStarting sysstat 11.5.7
Sebastien GODARD [Wed, 10 May 2017 14:12:01 +0000 (16:12 +0200)]
Starting sysstat 11.5.7

Update sysstat version number in configure script.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosysstat-11.5.6 v11.5.6
Sebastien GODARD [Wed, 10 May 2017 14:04:42 +0000 (16:04 +0200)]
sysstat-11.5.6

sysstat version 11.5.6 final packaging.
lsm and spec files updated.
Changelog added.

NOTE: Stable versions (11.2.10 and 11.4.4) also exist and will be
available for download from my web site:

http://pagesperso-orange.fr/sebastien.godard/

The stable versions include only the bug fixes added in sysstat 11.5.6
but not the new features.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoUpdate NLS translations
Sebastien GODARD [Wed, 10 May 2017 13:55:15 +0000 (15:55 +0200)]
Update NLS translations

Sync with The Translation Project: Hungarian translation updated.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoFix #148: ARM: sadc crashes because of unaligned memory accesses
Sebastien GODARD [Mon, 8 May 2017 08:10:22 +0000 (10:10 +0200)]
Fix #148: ARM: sadc crashes because of unaligned memory accesses

Use posix_memalign() with 16 bytes alignment request instead of
realloc() to guarantee 16 byte alignment requested by several
sysstat's structures.

Note: 16 byte alignment is no longer needed by sysstat's
structures. Yet removing the corresponding attributes
(__attribute__ ((aligned (16)))) for example in rd_stats.h
would imply a format change for sar/sadc binary data files.
These attributes will be removed when work is done to make sa binary
datafiles portable (see #135).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoFix #145: Tests failures on big endian archs
Sebastien GODARD [Sun, 30 Apr 2017 14:39:43 +0000 (16:39 +0200)]
Fix #145: Tests failures on big endian archs

This is really a nasty point here. The fix should be to make sar and sadf
able to read both big and little-endian binary data files.
For now we just remove the problematic test cases.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadf: Fix typo in manual page
Sebastien GODARD [Sun, 30 Apr 2017 13:55:56 +0000 (15:55 +0200)]
sadf: Fix typo in manual page

Debian patch: 14-spelling-typo.patch

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agorndr_stats.c: Cosmetic fix
Sebastien GODARD [Sun, 30 Apr 2017 13:43:56 +0000 (15:43 +0200)]
rndr_stats.c: Cosmetic fix

Simplify fix for the warning given by gcc -Werror=format-security.

Debian patch: 09-format-warning.patch

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoRename isag.in to isag and include a few cosmetic fixes.
Sebastien GODARD [Sun, 30 Apr 2017 13:18:45 +0000 (15:18 +0200)]
Rename isag.in to isag and include a few cosmetic fixes.

NOTE: isag is no longer maintained. This patch has been provided by
Debian team (see #146).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoisag: Support xz compression format
Sebastien GODARD [Sat, 29 Apr 2017 07:29:27 +0000 (09:29 +0200)]
isag: Support xz compression format

Add support for the .xz files.

NOTE: isag is no longer maintained. This patch has been provided by
Debian team (see #146).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoisag: Add support for saYYYYMMDD log files format
Sebastien GODARD [Sat, 29 Apr 2017 07:25:06 +0000 (09:25 +0200)]
isag: Add support for saYYYYMMDD log files format

The fill_file_menu() function was rewritten and tries to handle
all three possible formats (`saYYYYMMDD, `saDD', `YYYYMM/saDD')
by collecting existing log files into a temporary list of strings,
which is then used after being sorted to generate the menu.

NOTE: isag is no longer maintained. This patch has been provided by
Debian team (see #146).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agoisag: Add Refresh button
Sebastien GODARD [Sat, 29 Apr 2017 07:13:31 +0000 (09:13 +0200)]
isag: Add Refresh button

Add Refresh button to file menu to make it possible to re-read contents
of sysstat directory in case isag is running over midnight, and new
file is created (LP: #924197).

NOTE: isag is no longer maintained. This patch has been provided by
Debian team (see #146).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
7 years agosadf: Update manual page
Sebastien GODARD [Sun, 26 Mar 2017 09:52:59 +0000 (11:52 +0200)]
sadf: Update manual page

Explain new option "showinfo".

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>