]> granicus.if.org Git - sysstat/log
sysstat
3 years agoMakefile: Rename object files used by sadc
Sebastien GODARD [Thu, 5 Nov 2020 17:37:09 +0000 (18:37 +0100)]
Makefile: Rename object files used by sadc

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
3 years agoFix #253: Make sure setbuf() is the first operation on stream
Sebastien GODARD [Sat, 31 Oct 2020 13:58:51 +0000 (14:58 +0100)]
Fix #253: Make sure setbuf() is the first operation on stream

Required by musl-c.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
3 years agoFix #277: Typo in the PHYS_PACK_ID (mpstat.h)
Sebastien GODARD [Sat, 31 Oct 2020 13:35:03 +0000 (14:35 +0100)]
Fix #277: Typo in the PHYS_PACK_ID (mpstat.h)

Reported-by: Michal Berger
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
3 years agoiostat: Explain options -f/+f in manual page
Sebastien GODARD [Sat, 10 Oct 2020 08:16:14 +0000 (10:16 +0200)]
iostat: Explain options -f/+f in manual page

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
3 years agoSimplify/merge non regression tests
Sebastien GODARD [Sat, 10 Oct 2020 07:00:01 +0000 (09:00 +0200)]
Simplify/merge non regression tests

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
3 years agosimtest: Add more tests for CPU going offline
Sebastien GODARD [Sun, 4 Oct 2020 06:40:41 +0000 (08:40 +0200)]
simtest: Add more tests for CPU going offline

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
3 years agosadc: Rework softnet stats reading procedure
Sebastien GODARD [Sat, 26 Sep 2020 14:07:02 +0000 (16:07 +0200)]
sadc: Rework softnet stats reading procedure

Make sure that all lines from /proc/net/softnet_stat are read.
If not enough slots have been allocated then allocate more of them.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
3 years agosadc: Don't reallocate structures if buffers are large enough
Sebastien GODARD [Sat, 26 Sep 2020 07:24:28 +0000 (09:24 +0200)]
sadc: Don't reallocate structures if buffers are large enough

When appending data to an existing file, don't reallocate buffers if
they are already large enough.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
3 years agosystest: Small fix for array index values
Sebastien GODARD [Sat, 26 Sep 2020 07:01:48 +0000 (09:01 +0200)]
systest: Small fix for array index values

Array index was varying only from 0 to 1 (instead of 0 to 3).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoMerge branch 'petrpavlu-iowait-decrement'
Sebastien GODARD [Thu, 3 Sep 2020 15:38:45 +0000 (17:38 +0200)]
Merge branch 'petrpavlu-iowait-decrement'

4 years agoMerge branch 'iowait-decrement' of https://github.com/petrpavlu/sysstat into petrpavl...
Sebastien GODARD [Thu, 3 Sep 2020 15:38:19 +0000 (17:38 +0200)]
Merge branch 'iowait-decrement' of https://github.com/petrpavlu/sysstat into petrpavlu-iowait-decrement

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate non regression tests
Sebastien GODARD [Thu, 3 Sep 2020 15:25:36 +0000 (17:25 +0200)]
Update non regression tests

Take into account fix for iowait being decremented.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoWorkaround for iowait being decremented
Sebastien GODARD [Wed, 2 Sep 2020 17:04:04 +0000 (19:04 +0200)]
Workaround for iowait being decremented

The iowait value reported by the kernel on NO_HZ systems can decrement
as a result of inaccurate iowait tracking. Waiting on IO can be first
accounted as iowait but then instead as idle.

Function get_per_cpu_interval() considers iowait going backwards between
two readings as a CPU coming back online and resets the iowait value of
the first reading to 0. If iowait is decremented only because of
inaccurate tracking, this causes that almost all time between the two
readings is incorrectly recognized by sar as being spent in iowait.

The patch updates the code in get_per_cpu_interval() to recognize this
situation. If the iowait value between two readings decremented but the
idle value did not then the code now considers it as a problem with the
iowait reporting and corrects the first value according to the second
reading. Otherwise, the code remains treating decremented iowait as a
CPU coming back online.

Fixes #14.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoAdd non regression test based on iowait being decremented
Sebastien GODARD [Wed, 2 Sep 2020 16:26:39 +0000 (18:26 +0200)]
Add non regression test based on iowait being decremented

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoWorkaround for iowait being decremented
Petr Pavlu [Wed, 2 Sep 2020 08:24:43 +0000 (10:24 +0200)]
Workaround for iowait being decremented

The iowait value reported by the kernel on NO_HZ systems can decrement
as a result of inaccurate iowait tracking. Waiting on IO can be first
accounted as iowait but then instead as idle.

Function get_per_cpu_interval() considers iowait going backwards between
two readings as a CPU coming back online and resets the iowait value of
the first reading to 0. If iowait is decremented only because of
inaccurate tracking, this causes that almost all time between the two
readings is incorrectly recognized by sar as being spent in iowait.

The patch updates the code in get_per_cpu_interval() to recognize this
situation. If the iowait value between two readings decremented but the
idle value did not then the code now considers it as a problem with the
iowait reporting and corrects the first value according to the second
reading. Otherwise, the code remains treating decremented iowait as a
CPU coming back online.

Fixes #14.

4 years agoiostat: Update manual page
Sebastien GODARD [Tue, 25 Aug 2020 13:12:49 +0000 (15:12 +0200)]
iostat: Update manual page

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoCheck for both --disable and --enable-compress-manpg
Sebastien GODARD [Mon, 24 Aug 2020 09:06:05 +0000 (11:06 +0200)]
Check for both --disable and --enable-compress-manpg

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoFix #272: --disable-compress-manpg option does not work
Sebastien GODARD [Mon, 24 Aug 2020 08:53:24 +0000 (10:53 +0200)]
Fix #272: --disable-compress-manpg option does not work

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosar manual page: Update definition for runq-sz metric
Sebastien GODARD [Fri, 21 Aug 2020 08:36:47 +0000 (10:36 +0200)]
sar manual page: Update definition for runq-sz metric

The runq-sz metric was defined as the number of tasks waiting for run
time, and calculated as (number of tasks running+waiting for run time)
minus 1 (to not count current running process).
This was OK on UP machines, but is no longer true on SMP/multi-cores
machines. So update the metric's definition: runq-sz is the number of
tasks running or waiting for run time (we still don't count current
running process).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoMerge pull request #271 from NanXiao/patch-2
GODARD Sebastien [Thu, 20 Aug 2020 11:51:05 +0000 (13:51 +0200)]
Merge pull request #271 from NanXiao/patch-2

mpstat: Fix typo in man page

4 years agoMerge branch 'NanXiao-patch-1'
Sebastien GODARD [Thu, 20 Aug 2020 11:48:48 +0000 (13:48 +0200)]
Merge branch 'NanXiao-patch-1'

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agompstat: Fix typo in man page
Nan Xiao [Thu, 20 Aug 2020 07:57:36 +0000 (15:57 +0800)]
mpstat: Fix typo in man page

4 years agompstat: Add -T option in help message
Nan Xiao [Thu, 20 Aug 2020 07:54:39 +0000 (15:54 +0800)]
mpstat: Add -T option in help message

4 years agoAdd a sponsor button to GitHub page
Sebastien GODARD [Sat, 1 Aug 2020 13:06:17 +0000 (15:06 +0200)]
Add a sponsor button to GitHub page

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoStarting sysstat-12.5.1
Sebastien GODARD [Fri, 31 Jul 2020 06:03:14 +0000 (08:03 +0200)]
Starting sysstat-12.5.1

Configure script updated.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosysstat-12.4.0 v12.4.0
Sebastien GODARD [Fri, 31 Jul 2020 05:55:19 +0000 (07:55 +0200)]
sysstat-12.4.0

sysstat version 12.4.0 final packaging.
Changelog added.

No breaking new features here but numerous small improvements over
the last previous version. Among them:

* All the sysstat commands now display their statistics in color
  by default when the output is connected to a terminal,
* sar "pretty-prints" the device names by default, which means
  you won't need to use option -p with option -d to display the
  device names as they appear in /dev,
* You can tell the sa2 script to wait for a random delay before executing
  in order to prevent a massive I/O burst on some systems,
* You can also tell the sa1 script to insert a comment in current daily
  datafile saDD on system suspend and resume,

... and more ! See the CHANGES file for more details.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate NLS translations
Sebastien GODARD [Fri, 31 Jul 2020 05:52:41 +0000 (07:52 +0200)]
Update NLS translations

Sync with The Translation Project

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoMerge branch 'NanXiao-patch-1'
Sebastien GODARD [Fri, 31 Jul 2020 05:24:19 +0000 (07:24 +0200)]
Merge branch 'NanXiao-patch-1'

4 years agoMerge branch 'patch-1' of https://github.com/NanXiao/sysstat into NanXiao-patch-1
Sebastien GODARD [Fri, 31 Jul 2020 05:22:19 +0000 (07:22 +0200)]
Merge branch 'patch-1' of https://github.com/NanXiao/sysstat into NanXiao-patch-1

4 years agoiostat: Remove unused variable
Nan Xiao [Fri, 31 Jul 2020 02:29:38 +0000 (10:29 +0800)]
iostat: Remove unused variable

4 years agoUpdate sar manual page
Sebastien GODARD [Thu, 30 Jul 2020 06:29:37 +0000 (08:29 +0200)]
Update sar manual page

Restore a reference to sysstat.ioconf file in sar manual page.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate lsm and spec files
Sebastien GODARD [Thu, 30 Jul 2020 06:28:48 +0000 (08:28 +0200)]
Update lsm and spec files

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoChange version number to 12.4.0
Sebastien GODARD [Wed, 29 Jul 2020 06:58:17 +0000 (08:58 +0200)]
Change version number to 12.4.0

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoCosmetic fixes
Sebastien GODARD [Wed, 29 Jul 2020 06:57:41 +0000 (08:57 +0200)]
Cosmetic fixes

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate sar, iostat and cifsiostat usage message
Sebastien GODARD [Wed, 29 Jul 2020 06:56:35 +0000 (08:56 +0200)]
Update sar, iostat and cifsiostat usage message

Add option --pretty to usage message.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoFix style typo in cifsiostat manual page
Sebastien GODARD [Tue, 28 Jul 2020 16:10:15 +0000 (18:10 +0200)]
Fix style typo in cifsiostat manual page

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate style for manual pages
Sebastien GODARD [Tue, 28 Jul 2020 16:01:43 +0000 (18:01 +0200)]
Update style for manual pages

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate non regression environment
Sebastien GODARD [Mon, 27 Jul 2020 09:52:21 +0000 (11:52 +0200)]
Update non regression environment

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate non regression tests
Sebastien GODARD [Mon, 27 Jul 2020 07:30:30 +0000 (09:30 +0200)]
Update non regression tests

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoMake device name consistent between sar and iostat
Sebastien GODARD [Mon, 27 Jul 2020 07:27:32 +0000 (09:27 +0200)]
Make device name consistent between sar and iostat

Use a common function to determine the name of the device to be
displayed by sar (sar -d) and iostat.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate sar, iostat and cifsiostat manual pages
Sebastien GODARD [Sat, 25 Jul 2020 16:19:49 +0000 (18:19 +0200)]
Update sar, iostat and cifsiostat manual pages

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate non regression tests
Sebastien GODARD [Sat, 25 Jul 2020 13:23:48 +0000 (15:23 +0200)]
Update non regression tests

Update non regression tests results as device names are now
pretty-printed by default with sar.
Also test new option --pretty.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agocifsiostat,iostat,sar: Add --pretty option
Sebastien GODARD [Sat, 25 Jul 2020 13:15:53 +0000 (15:15 +0200)]
cifsiostat,iostat,sar: Add --pretty option

This option makes the report easier to read by a human.
Please note that for sar, option -p is now equivalent to this one.
Use this option to display device names or network interface names
on the right of the report instead of the left (which can be
particularly useful for long names).

Also option -h is now equivalent to "--pretty --human".

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosar: Device names are now pretty-printed by default
Sebastien GODARD [Sat, 25 Jul 2020 07:20:14 +0000 (09:20 +0200)]
sar: Device names are now pretty-printed by default

sar now pretty-prints device names by default. It means that they will
be displayed as they appear in /dev (e.g. sda, sdb...) instead of
"devM-m", and you don't need to use option -p for that.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate non regression tests
Sebastien GODARD [Fri, 24 Jul 2020 14:59:33 +0000 (16:59 +0200)]
Update non regression tests

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoFix #263: Incorrect device name from iostat
Sebastien GODARD [Fri, 24 Jul 2020 14:52:18 +0000 (16:52 +0200)]
Fix #263: Incorrect device name from iostat

Using sysstat.ioconf configure file to determine the device name based
on its major and minor numbers gives a wrong name for xvd* devices with
big minor numbers.
Don't use it any more as there are other ways to find the name (e.g. we
can read the symlink in /sys/dev/block/).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate non regression code to handle big minor numbers
Sebastien GODARD [Fri, 24 Jul 2020 14:15:29 +0000 (16:15 +0200)]
Update non regression code to handle big minor numbers

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoAdd new non regression tests on big minor numbers
Sebastien GODARD [Fri, 24 Jul 2020 14:12:40 +0000 (16:12 +0200)]
Add new non regression tests on big minor numbers

Add new xvd* devices in sysstat environment tests.
One of them (xvdq) has a minor number value of 4096.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoAdd non regression test for sa1 --sleep option
Sebastien GODARD [Tue, 21 Jul 2020 16:45:28 +0000 (18:45 +0200)]
Add non regression test for sa1 --sleep option

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoCosmetic changes in code
Sebastien GODARD [Tue, 21 Jul 2020 16:42:29 +0000 (18:42 +0200)]
Cosmetic changes in code

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoFix gcc V10 warnings in sysstat 12.0.1 code used for test
Sebastien GODARD [Tue, 21 Jul 2020 16:36:11 +0000 (18:36 +0200)]
Fix gcc V10 warnings in sysstat 12.0.1 code used for test

The tests/ directory contains an old version of sysstat code (v 12.0.1)
used for non regression tests.
Compiling this version produces warnings with recent gcc v9/v10. Fix
them, even if we alter a bit the original 12.0.1 code.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoFix various comments in code and other files
Sebastien GODARD [Fri, 17 Jul 2020 15:49:33 +0000 (17:49 +0200)]
Fix various comments in code and other files

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoioconf.c: Remove some dead code
Sebastien GODARD [Wed, 1 Jul 2020 06:01:51 +0000 (08:01 +0200)]
ioconf.c: Remove some dead code

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoconfigure: Substitute WITH_DEBUG variable
Sebastien GODARD [Fri, 26 Jun 2020 15:49:05 +0000 (17:49 +0200)]
configure: Substitute WITH_DEBUG variable

Calling AC_SUBST(WITH_DEBUG) is needed for manual pages.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoTravis script line now calls do_test script
Sebastien GODARD [Sat, 20 Jun 2020 16:42:35 +0000 (18:42 +0200)]
Travis script line now calls do_test script

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUse --enable-debuginfo in do_test script
Sebastien GODARD [Sat, 20 Jun 2020 16:33:35 +0000 (18:33 +0200)]
Use --enable-debuginfo in do_test script

Use proper configure's option instead of using -D DEBUG.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoconfigure: Fix --enable-debuginfo option
Sebastien GODARD [Sat, 20 Jun 2020 16:24:12 +0000 (18:24 +0200)]
configure: Fix --enable-debuginfo option

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate help files used by iconfig script
Sebastien GODARD [Sat, 20 Jun 2020 08:55:08 +0000 (10:55 +0200)]
Update help files used by iconfig script

Add pcp file which was missing.
Fix a typo in another one.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoMakefile: Remove all reports and data files if requested
Sebastien GODARD [Sat, 20 Jun 2020 08:36:26 +0000 (10:36 +0200)]
Makefile: Remove all reports and data files if requested

When option --enable-clean-sa-dir, sysstat used to remove compressed
reports and data files in /var/log/sa directory only when they had
been compressed using gzip.
Update Makefile to look for other compression programs. Also remove
files using the format saYYYYMMDD or sarYYYYMMDD.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoCompress manual pages by default when installed
Sebastien GODARD [Sat, 20 Jun 2020 07:40:32 +0000 (09:40 +0200)]
Compress manual pages by default when installed

Compress manual pages (using xz, bzip2 or gzip) by default when they are
installed.
Replace option --enable-compress-manpg with --disable-compress-manpg in
configure script.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoconfigure: Remove obsolete autoconf macros
Sebastien GODARD [Sat, 20 Jun 2020 07:22:59 +0000 (09:22 +0200)]
configure: Remove obsolete autoconf macros

Don't use AC_HEADER_STDC and AC_HEADER_DIRENT macros in configure.in
script.
GNU autoconf manual says that these macros are obsolete and that new
code should no longer use them.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate manual pages again
Sebastien GODARD [Sun, 14 Jun 2020 07:15:25 +0000 (09:15 +0200)]
Update manual pages again

Explain that sysstat commands use kibibytes and mebibytes, but not
kilobytes and megabytes.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate manual pages
Sebastien GODARD [Sat, 13 Jun 2020 09:58:26 +0000 (11:58 +0200)]
Update manual pages

Tell that statistics are now displayed by default in color on a
terminal.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoDisplay statistics in color by default
Sebastien GODARD [Sat, 13 Jun 2020 09:55:28 +0000 (11:55 +0200)]
Display statistics in color by default

Display statistics in colors by default when the output is connected to
a terminal. It is no longer necessary to set the S_COLORS environment
variable.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosadf: Output format without option FO_LOCAL_TIME rejects option -T only
Sebastien GODARD [Sun, 7 Jun 2020 12:54:17 +0000 (14:54 +0200)]
sadf: Output format without option FO_LOCAL_TIME rejects option -T only

Output format wit option FO_LOCAL_TIME not set should only rejects
option -T, not option -t (use FO_NO_TRUE_TIME for that).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUse NULL as an argument for time() system call
Sebastien GODARD [Fri, 5 Jun 2020 15:45:22 +0000 (17:45 +0200)]
Use NULL as an argument for time() system call

According to the time(2) manual page, the argument passed to time()
system call is obsolescent and should always be NULL in new code.
When this argument is NULL, the call cannot fail.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoMerge pull request #261 from tchebb/fix-index-usage
GODARD Sebastien [Fri, 5 Jun 2020 15:27:05 +0000 (17:27 +0200)]
Merge pull request #261 from tchebb/fix-index-usage

Replace index() call with strchr() call

4 years agoReplace index() call with strchr() call
Tom Hebb [Wed, 3 Jun 2020 18:57:21 +0000 (11:57 -0700)]
Replace index() call with strchr() call

According to glibc documentation[1], "index is another name for strchr;
they are exactly the same. New code should always use strchr." The use
of index() breaks compilation for Android targets, which use Bionic
instead of glibc and don't have index().

[1] https://www.gnu.org/software/libc/manual/html_node/Search-Functions.html#index-index

4 years agosa_common.c: Fix comment in code
Sebastien GODARD [Thu, 21 May 2020 08:40:27 +0000 (10:40 +0200)]
sa_common.c: Fix comment in code

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate non regression tests
Sebastien GODARD [Thu, 21 May 2020 08:40:03 +0000 (10:40 +0200)]
Update non regression tests

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosadf_misc.c: Remove some dead code
Sebastien GODARD [Thu, 21 May 2020 07:27:10 +0000 (09:27 +0200)]
sadf_misc.c: Remove some dead code

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosa1: Update manual page
Sebastien GODARD [Mon, 11 May 2020 13:48:55 +0000 (15:48 +0200)]
sa1: Update manual page

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosa1: Insert a comment in daily datafile on system suspend/resume
Sebastien GODARD [Mon, 11 May 2020 13:43:15 +0000 (15:43 +0200)]
sa1: Insert a comment in daily datafile on system suspend/resume

Add a new option ("--sleep") to sa1 so that a comment can be inserted in
current daily datafile on system suspend/resume.
This comment can then be displayed using sar's option -C.
E.g.:

$ sar -C
Linux 5.6.10-300.fc32.x86_64 (localhost.localdomain)  05/11/2020  _x86_64_ (8 CPU)
02:53:05 PM  LINUX RESTART (8 CPU)

02:55:01 PM     CPU     %user     %nice   %system   %iowait    %steal     %idle
03:00:01 PM     all      1.66      0.00      1.27      0.17      0.00     96.89
03:10:01 PM     all      1.30      0.00      1.38      0.20      0.00     97.12
03:12:22 PM  COM LINUX SLEEP MODE (pre suspend)
03:14:55 PM  COM LINUX SLEEP MODE (post suspend)
03:15:31 PM     all      2.79      0.00      3.46      4.35      0.00     89.40
03:20:01 PM     all      0.66      0.00      0.82      0.13      0.00     98.39
Average:        all      3.50      0.00      3.53      0.78      0.00     92.19

"sa1 --sleep" will be called by sysstat.sleep script installed in
$systemdsleepdir directory if systemd is available.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosa2: Wait for a random delay before running
Sebastien GODARD [Mon, 11 May 2020 08:04:17 +0000 (10:04 +0200)]
sa2: Wait for a random delay before running

Add a new option ("delay_range=") to configure script to tell sa2 script
to wait for a random delay in the indicated range before running.
This delay (expressed in seconds) is aimed at preventing a massive I/O
burst at the same time on VM sharing the same storage area.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoconfigure: Use AC_COMPILE_IFELSE instead of old AC_TRY_COMPILE macro
Sebastien GODARD [Sun, 10 May 2020 10:07:23 +0000 (12:07 +0200)]
configure: Use AC_COMPILE_IFELSE instead of old AC_TRY_COMPILE macro

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoconfigure: Add new option "--enable-use-crond"
Sebastien GODARD [Sun, 10 May 2020 08:57:53 +0000 (10:57 +0200)]
configure: Add new option "--enable-use-crond"

Add a new option to configuration script to tell it to use the standard
cron daemon (and the SysV standard files in /etc/rc.d/) even if systemd
is installed.
I have added this option because systemd seems currently broken on my
F32 distro.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoFix typos in sar manual page
Sebastien GODARD [Fri, 8 May 2020 09:49:01 +0000 (11:49 +0200)]
Fix typos in sar manual page

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoStarting sysstat-12.3.4
Sebastien GODARD [Fri, 8 May 2020 08:17:29 +0000 (10:17 +0200)]
Starting sysstat-12.3.4

Configure script updated.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosysstat-12.3.3 v12.3.3
Sebastien GODARD [Fri, 8 May 2020 08:02:41 +0000 (10:02 +0200)]
sysstat-12.3.3

sysstat version 12.3.3 final packaging.
lsm and spec files updated.
Changelog added.
Year of (C) message updated.

Exciting new features in this version include:

* sar/sadc collect and display Pressure-Stall Information statistics.
  These metrics have been added during the 4.20 development cycle of the
  Linux kernel. They can be displayed with "sar -q {CPU | LOAD | MEM}".

* iostat has gained support devices managed by drivers in userspace like
  spdk (see #257). New flags (-f / +f) have been added so that the user
  can specify an alternate location for statistics files.

This version also includes various bug fixes.
Enjoy!

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate NLS translations
Sebastien GODARD [Fri, 8 May 2020 07:25:05 +0000 (09:25 +0200)]
Update NLS translations

Sync with The Translation Project.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoFix GCC v10 warnings
Sebastien GODARD [Sun, 3 May 2020 07:05:58 +0000 (09:05 +0200)]
Fix GCC v10 warnings

GCC versions 9 and later complain more agressively, e.g.:

common.c: In function ‘get_wwnid_from_pretty’:
common.c:396:4: warning: ‘strncpy’ offset [275, 4095] from the object at ‘drd’ is out of the bounds of referenced subobject ‘d_name’ with type ‘char[256]’ at offset 19 [-Warray-bounds]
  396 |    strncpy(wwn_name, drd->d_name, sizeof(wwn_name));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/dirent.h:61,
                 from common.c:32:
/usr/include/bits/dirent.h:33:10: note: subobject ‘d_name’ declared here
   33 |     char d_name[256];  /* We must not include limits.h! */
      |          ^~~~~~

or:

common.c: In function ‘get_persistent_name_path’:
common.c:876:37: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
  876 |  snprintf(path, sizeof(path), "%s/%s",
      |                                     ^
common.c:876:2: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
  876 |  snprintf(path, sizeof(path), "%s/%s",
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  877 |    get_persistent_type_dir(persistent_name_type), name);
      |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This patch quiets GCC.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoCosmetic fixes
Sebastien GODARD [Sun, 3 May 2020 06:55:12 +0000 (08:55 +0200)]
Cosmetic fixes

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoMerge branch 'Sdrkun-master'
Sebastien GODARD [Fri, 1 May 2020 07:24:03 +0000 (09:24 +0200)]
Merge branch 'Sdrkun-master'

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosa1: fix sar error when the directory var/log/sa was removed.
Sdrkun [Tue, 28 Apr 2020 14:31:54 +0000 (10:31 -0400)]
sa1: fix sar error when the directory var/log/sa was removed.

Signed-off-by: Sdrkun <shanzhikun@gmail.com>
4 years agocommon.c: Remove unused get_dev_part_nr() function
Sebastien GODARD [Mon, 27 Apr 2020 13:55:50 +0000 (15:55 +0200)]
common.c: Remove unused get_dev_part_nr() function

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosimtest: Add new non regression tests for iostat
Sebastien GODARD [Mon, 27 Apr 2020 13:38:40 +0000 (15:38 +0200)]
simtest: Add new non regression tests for iostat

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoAdd new flag to iostat that can be used to specify an alternate
Sebastien GODARD [Mon, 27 Apr 2020 13:17:28 +0000 (15:17 +0200)]
Add new flag to iostat that can be used to specify an alternate
directory for devices statistics.

Example:

iostat -f /altdir [...]
-> Use <altdir> directory to read devices statistics.

iostat +f /altdir [...]
-> Use standard kernel files *and* <altdir> to read devices statistics.

<altdir> is a directory containing files with statistics for devices
managed in userspace.

<altdir> may contain:
- a diskstats file whose format is compliant with that located in /proc.
- statistics for individual devices contained in files whose format is
compliant with that of files located in /sys.

In particular, the following files located in <altdir> may be used by
iostat:
<altdir>/block/<device>/stat
<altdir>/block/<device>/<partition>/stat

<partition> files must have an entry in <altdir>/dev/block/ directory,
e.g.:
<altdir>/dev/block/[major]:[minor] --> ../../block/<device>/<partition>

Notes:
1) iostat uses the /proc/diskstats file to read statistics only when
"-p all" has been entered on the command line (read statistics for all
the devices and their partitions).
2) iostat uses the /sys/block/<device>/stat files to read the statistics
for a device (e.g. "iostat sda") and possibly all its partitions
(e.g. "iostat -p sda").
3) iostat uses the link in /sys/dev/block/[major]:[minor] to know where
the stat file is located for a partition that has been entered on the
command line (e.g. "iostat sda3"). The partition must exist in /dev to
get its major and minor numbers.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoFix #256: sar: Don't display duplicate entries in /etc/mtab
Sebastien GODARD [Sat, 25 Apr 2020 09:08:40 +0000 (11:08 +0200)]
Fix #256: sar: Don't display duplicate entries in /etc/mtab

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosimtest: Add overlay and duplicate filesystem entries to etc/mtab
Sebastien GODARD [Sat, 25 Apr 2020 08:57:01 +0000 (10:57 +0200)]
simtest: Add overlay and duplicate filesystem entries to etc/mtab

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosimtest: Add tests for sadf "hz=" option
Sebastien GODARD [Sat, 25 Apr 2020 07:36:46 +0000 (09:36 +0200)]
simtest: Add tests for sadf "hz=" option

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosar: Don't check if we are close enough to selected interval when
Sebastien GODARD [Sat, 25 Apr 2020 07:35:38 +0000 (09:35 +0200)]
sar: Don't check if we are close enough to selected interval when
interval=1

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosadf: Update manual page
Sebastien GODARD [Sat, 25 Apr 2020 07:34:57 +0000 (09:34 +0200)]
sadf: Update manual page

Explain new option "hz=" for sadf -c.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosadf: Add option "hz=" for datafile conversion
Sebastien GODARD [Sat, 25 Apr 2020 07:31:56 +0000 (09:31 +0200)]
sadf: Add option "hz=" for datafile conversion

Add a new option to be used with "sadf -c" (datafile conversion).
This option enables the user to specify the number of ticks per second
for the machine where the datafile to be converted was created.
E.g.:
sadf -c old_datafile -O hz=250 > new_datafile

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate non regression tests
Sebastien GODARD [Sun, 19 Apr 2020 07:28:22 +0000 (09:28 +0200)]
Update non regression tests

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosadf: Use actual number of items, not its pointer address
Sebastien GODARD [Sun, 19 Apr 2020 07:13:58 +0000 (09:13 +0200)]
sadf: Use actual number of items, not its pointer address

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate non regression tests
Sebastien GODARD [Sun, 19 Apr 2020 06:47:37 +0000 (08:47 +0200)]
Update non regression tests

"per" attribute is no longer required for XML output memory activity.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate DTD and XSD documents
Sebastien GODARD [Sun, 19 Apr 2020 06:46:58 +0000 (08:46 +0200)]
Update DTD and XSD documents

Remove the "per" attribute for memory activity.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosadf: XML: Remove "per" attribute for memory activity
Sebastien GODARD [Sun, 19 Apr 2020 06:45:19 +0000 (08:45 +0200)]
sadf: XML: Remove "per" attribute for memory activity

All memory statistics are not "per second" values.
So remove this attribute from the XML output.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agoUpdate non regression tests
Sebastien GODARD [Sun, 19 Apr 2020 06:38:34 +0000 (08:38 +0200)]
Update non regression tests

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
4 years agosar: Don't display "Inconsistent input data" when no activities are
Sebastien GODARD [Sun, 19 Apr 2020 06:36:04 +0000 (08:36 +0200)]
sar: Don't display "Inconsistent input data" when no activities are
collected by sadc

When no activities are collected by sadc, sadc writes an error message
("Requested activities not available").
sar used to display a second error message in addition to the previous
one ("Inconsistent input data"). Remove this one.

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