]> granicus.if.org Git - sysstat/log
sysstat
5 years agosadf: PCP: Define domain constants
Sebastien GODARD [Sat, 23 Mar 2019 11:13:08 +0000 (12:13 +0100)]
sadf: PCP: Define domain constants

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: PCP: Simplify pcp_def_cpu_metrics() function
Sebastien GODARD [Sat, 23 Mar 2019 11:03:24 +0000 (12:03 +0100)]
sadf: PCP: Simplify pcp_def_cpu_metrics() function

Variable "first" not needed.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: PCP: Add support for A_NET_DEV and A_NET_EDEV activities
Sebastien GODARD [Sat, 23 Mar 2019 10:58:25 +0000 (11:58 +0100)]
sadf: PCP: Add support for A_NET_DEV and A_NET_EDEV activities

Add metrics displayed by "sar -n DEV" and "sar -n EDEV" (network
interfaces statistics) to PCP archive.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: PCP: Add support for A_KTABLES activity
Sebastien GODARD [Wed, 20 Mar 2019 16:29:20 +0000 (17:29 +0100)]
sadf: PCP: Add support for A_KTABLES activity

Add metrics displayed by "sar -v" (kernel tables statistics) to PCP
archive.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: PCP: Add support for A_PAGE activity
Sebastien GODARD [Wed, 20 Mar 2019 16:07:33 +0000 (17:07 +0100)]
sadf: PCP: Add support for A_PAGE activity

Add metrics displayed by "sar -B" (paging statistics) to PCP archive.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: PCP: Add support for A_IO activity
Sebastien GODARD [Wed, 20 Mar 2019 11:00:19 +0000 (12:00 +0100)]
sadf: PCP: Add support for A_IO activity

Add metrics displayed by "sar -b" (I/O and transfer rate statistics) to
PCP archive.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: PCP: Add support for A_SWAP activity
Sebastien GODARD [Wed, 20 Mar 2019 10:28:10 +0000 (11:28 +0100)]
sadf: PCP: Add support for A_SWAP activity

Add metrics displayed by "sar -W" (swapping statistics) to PCP archive.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: PCP: Add support for A_IRQ activity
Sebastien GODARD [Wed, 20 Mar 2019 10:15:16 +0000 (11:15 +0100)]
sadf: PCP: Add support for A_IRQ activity

Add metric displayed by "sar -I SUM" (total number of interrupts per
second) to PCP archive.
Individual interrupts are not taken into account.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: PCP: Add support for A_MEMORY activity
Sebastien GODARD [Wed, 20 Mar 2019 09:47:23 +0000 (10:47 +0100)]
sadf: PCP: Add support for A_MEMORY activity

Add metrics displayed by "sar -r [ALL]" (memory statistics) to PCP
archive.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agopcp_def_metrics.c: Fix comment
Sebastien GODARD [Wed, 20 Mar 2019 09:44:57 +0000 (10:44 +0100)]
pcp_def_metrics.c: Fix comment

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosar/sadc: Change variable name dis -> dish
Sebastien GODARD [Sun, 17 Mar 2019 14:56:24 +0000 (15:56 +0100)]
sar/sadc: Change variable name dis -> dish

Make it a bit longer to quiet LGTM.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf.c: Fix local variable hiding global one
Sebastien GODARD [Sun, 17 Mar 2019 14:54:49 +0000 (15:54 +0100)]
sadf.c: Fix local variable hiding global one

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadc.c: Remove unused global variable
Sebastien GODARD [Sun, 17 Mar 2019 14:54:10 +0000 (15:54 +0100)]
sadc.c: Remove unused global variable

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosar/sadf: Fix local variables hiding global ones.
Sebastien GODARD [Sat, 16 Mar 2019 13:51:07 +0000 (14:51 +0100)]
sar/sadf: Fix local variables hiding global ones.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agopidstat: Make pid_array_nr variable local
Sebastien GODARD [Sat, 16 Mar 2019 13:49:07 +0000 (14:49 +0100)]
pidstat: Make pid_array_nr variable local

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agompstat: Fix local variable hiding global one
Sebastien GODARD [Sat, 16 Mar 2019 13:47:06 +0000 (14:47 +0100)]
mpstat: Fix local variable hiding global one

cpu_nr and node_nr are global variable names. Don't use the same name
for local variables.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoiostat: Change some variables scope
Sebastien GODARD [Sat, 16 Mar 2019 10:36:15 +0000 (11:36 +0100)]
iostat: Change some variables scope

Make iodev_nr and dlist_idx local variables (based on an LGTM alert).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoMerge branch 'odubaj-autofs-not-counting'
Sebastien GODARD [Sat, 16 Mar 2019 09:43:18 +0000 (10:43 +0100)]
Merge branch 'odubaj-autofs-not-counting'

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoMerge branch 'autofs-not-counting' of https://github.com/odubaj/sysstat into odubaj...
Sebastien GODARD [Sat, 16 Mar 2019 09:14:57 +0000 (10:14 +0100)]
Merge branch 'autofs-not-counting' of https://github.com/odubaj/sysstat into odubaj-autofs-not-counting

5 years agoUpdate rd_stats.c
odubaj [Mon, 11 Mar 2019 09:17:24 +0000 (10:17 +0100)]
Update rd_stats.c

5 years agoUpdate count.c
odubaj [Mon, 11 Mar 2019 09:16:50 +0000 (10:16 +0100)]
Update count.c

removed memset() before sscanf() - not needed

5 years agosadc: Make sure nr of items are always counted for certain activities
Sebastien GODARD [Sat, 9 Mar 2019 07:47:04 +0000 (08:47 +0100)]
sadc: Make sure nr of items are always counted for certain activities

Commit f81fc24 modified sadc so that the number of items are counted
only for activities which are collected by sadc.
In fact certain activities need to be counted even if they are not
collected. This is the case for A_CPU: We need to know the number of CPU
for various reasons (from displaying the report header to saving it in
the header of a new saXX datafile).
So add a new flag (AO_ALWAYS_COUNTED) to indicate which activities
should always be counted, be they collected or not.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoMerge branch 'avoid-triggering-automounts' of https://github.com/odubaj/sysstat
Sebastien GODARD [Sat, 9 Mar 2019 07:25:45 +0000 (08:25 +0100)]
Merge branch 'avoid-triggering-automounts' of https://github.com/odubaj/sysstat

5 years agoFix #214: mpstat: JSON output should display "all" for global CPU use
Sebastien GODARD [Wed, 6 Mar 2019 17:55:52 +0000 (18:55 +0100)]
Fix #214: mpstat: JSON output should display "all" for global CPU use

Displaying "-1" for CPU number in mpstat's JSON output format is not
consistent with what mpstat uses for other options.
So display "all" instead.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoiostat, mpstat: Fix JSON output when stopped by SIGINT
Sebastien GODARD [Sun, 3 Mar 2019 16:04:26 +0000 (17:04 +0100)]
iostat, mpstat: Fix JSON output when stopped by SIGINT

Remove extra comma in JSON output displayed by iostat and mpstat when
stopped by SIGINT.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoiostat: Fix missing "}" and "]" in JSON output when stopped by SIGINT
Sebastien GODARD [Sun, 3 Mar 2019 09:21:24 +0000 (10:21 +0100)]
iostat: Fix missing "}" and "]" in JSON output when stopped by SIGINT

Add a SIGINT handler to iostat so that JSON output can be ended properly
when the user presses Ctrl/C.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoMerge pull request #212 from hying-caritas/fix_mpstat_json_int
GODARD Sebastien [Sun, 3 Mar 2019 08:49:48 +0000 (09:49 +0100)]
Merge pull request #212 from hying-caritas/fix_mpstat_json_int

Fix missing "}" and "]" in JSON output when stopped by SIGINT

5 years agoFix missing "}" and "]" in JSON output when stopped by SIGINT
Huang Ying [Sun, 3 Mar 2019 06:11:29 +0000 (14:11 +0800)]
Fix missing "}" and "]" in JSON output when stopped by SIGINT

When mpstat is stopped by SIGINT, the JSON output will miss the
trailing "}" and "]" because SIGINT handler isn't called.  Fixed this
via setup SIGINT handler for JSON output too.

5 years agoignoring autofs as real filesystem by counting number of valid filesystems and gettin...
Ondrej Dubaj [Thu, 28 Feb 2019 14:29:08 +0000 (15:29 +0100)]
ignoring autofs as real filesystem by counting number of valid filesystems and getting all valid filesystems

5 years agosadf: PCP: Create a separate file for metrics definition
Sebastien GODARD [Wed, 27 Feb 2019 11:10:23 +0000 (12:10 +0100)]
sadf: PCP: Create a separate file for metrics definition

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: PCP: Add support for A_CPU activity
Sebastien GODARD [Wed, 27 Feb 2019 10:37:59 +0000 (11:37 +0100)]
sadf: PCP: Add support for A_CPU activity

Add metrics displayed by "sar -u [ALL]" (CPU statistics) to PCP archive.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoavoiding triggering automounts, bug #1670060
Ondrej Dubaj [Tue, 26 Feb 2019 07:36:14 +0000 (08:36 +0100)]
avoiding triggering automounts, bug #1670060

5 years agosadf: PCP: Add missing #ifdef statement
Sebastien GODARD [Sat, 23 Feb 2019 17:45:05 +0000 (18:45 +0100)]
sadf: PCP: Add missing #ifdef statement

pmiWrite() function only exists if PCP library exists.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: PCP: Add support for A_PCSW activity
Sebastien GODARD [Sat, 23 Feb 2019 17:38:34 +0000 (18:38 +0100)]
sadf: PCP: Add support for A_PCSW activity

Add metrics displayed by "sar -w" (task creation and context switch
statistics) to PCP archive.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: Don't test for activities available in file if only the header
Sebastien GODARD [Sat, 23 Feb 2019 16:13:23 +0000 (17:13 +0100)]
sadf: Don't test for activities available in file if only the header
needs to be displayed

When only the header needs to be displayed with an output format like
e.g. XML then don't test for activities available in file.
E.g.:
sadc -S A_NULL,A_QUEUE datafile 1 2
Then "sadf -Hx datafile" should not display error message "Requested
activities not available in file".

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: PCP: Initial support for A_QUEUE activity
Sebastien GODARD [Sat, 23 Feb 2019 10:15:25 +0000 (11:15 +0100)]
sadf: PCP: Initial support for A_QUEUE activity

This is the initial (and experimental) support for creating PCP archives
by sadf.
I used the work made by Steve Kay (@stevekay) to create this patch: See
issue #136.
At the present time, only A_QUEUE activity is supported (i.e. the
metrics displayed by "sar -q").

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoPCP: Update Makefile
Sebastien GODARD [Sat, 23 Feb 2019 10:06:23 +0000 (11:06 +0100)]
PCP: Update Makefile

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: PCP: Add new options "-l" and "pcparchive="
Sebastien GODARD [Sat, 23 Feb 2019 09:41:54 +0000 (10:41 +0100)]
sadf: PCP: Add new options "-l" and "pcparchive="

PCP (Performance CoPilot) will be a new output format for sadf.
Add new option "-l" to select this format. The keyword "pcparchive="
used with option -O will indicate the name of the PCP archive file to
create, e.g.:

$ sadf -l -O pcparchive=foo /var/log/sa/saXX (...)

If no archive file is specified then sadf will use the same name
as the sar data file.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoPCP: Add option --disable-pcp to configuration scripts
Sebastien GODARD [Sat, 23 Feb 2019 09:15:55 +0000 (10:15 +0100)]
PCP: Add option --disable-pcp to configuration scripts

PCP (Performance CoPilot) will be suported by default by sysstat if PCP
development libraries are available.
Add a new option (--disable-pcp) to 'configure' script to allow user to
disable PCP support even if PCP libraries are installed.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoconfigure: Don't check for sensors library if --disable-sensors used
Sebastien GODARD [Sat, 23 Feb 2019 09:01:34 +0000 (10:01 +0100)]
configure: Don't check for sensors library if --disable-sensors used

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agojson_stats.h: Replace XML -> JSON
Sebastien GODARD [Sat, 23 Feb 2019 08:59:54 +0000 (09:59 +0100)]
json_stats.h: Replace XML -> JSON

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: Cosmetic fix in manual page
Sebastien GODARD [Sat, 23 Feb 2019 08:57:58 +0000 (09:57 +0100)]
sadf: Cosmetic fix in manual page

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoSmall update to sadc and sadf manual pages
Sebastien GODARD [Fri, 15 Feb 2019 10:36:37 +0000 (11:36 +0100)]
Small update to sadc and sadf manual pages

sadc manual page had been updated to take into account new flag -f, but
its date hadn't been modified.

Fix typo in sadf manual page.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoStarting sysstat-12.1.4
Sebastien GODARD [Fri, 15 Feb 2019 09:54:29 +0000 (10:54 +0100)]
Starting sysstat-12.1.4

Update sysstat version number in configure script.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosysstat-12.1.3 v12.1.3
Sebastien GODARD [Fri, 15 Feb 2019 09:43:39 +0000 (10:43 +0100)]
sysstat-12.1.3

sysstat version 12.1.3 final packaging.
lsm and spec files updated.
Changelog added.
Copyright year updated (2018 > 2019)

With this version, the user will be able to select different color
palettes to draw the SVG graphs with sadf. One of those palettes can be
fully customized using an environment variable (S_COLORS_PALETTE).
This version also adds a new flag (-f) to sadc to force fdatasync() use
when data are written (this feature has been contributed by Kyle
Walker).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoUpdate NLS translations
Sebastien GODARD [Fri, 15 Feb 2019 09:11:25 +0000 (10:11 +0100)]
Update NLS translations

Sync with the Translation Project.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoMerge pull request #209 from Joungkyun/master
GODARD Sebastien [Sat, 9 Feb 2019 10:51:52 +0000 (11:51 +0100)]
Merge pull request #209 from Joungkyun/master

update korean translate (ko.po)

5 years agoupdated Korean translation file with pot file from 2018-12-14
JoungKyun Kim [Wed, 6 Feb 2019 16:34:32 +0000 (01:34 +0900)]
updated Korean translation file with pot file from 2018-12-14

5 years agoMerge branch 'kyle-walker-fdatasync'
Sebastien GODARD [Sat, 2 Feb 2019 09:01:38 +0000 (10:01 +0100)]
Merge branch 'kyle-walker-fdatasync'

5 years agosadc: Add a -f flag to force fdatasync() use
Kyle Walker [Wed, 30 Jan 2019 12:50:55 +0000 (07:50 -0500)]
sadc: Add a -f flag to force fdatasync() use

For quite some time, the sadc utility has not used fdatasync() when writing
stat information to disk. This resulted in instances where data files could
be corrupted or entries lost if a system encountered a sudden reset
condition. This change adds a "-f" flag which can be used to bring back the
previous behaviour if end users require it.

Note, the fdatasync() lowers the likelihood of lost data, but does so at
the expense of performance within the write operation.

5 years agosadf: Update manual page
Sebastien GODARD [Sun, 20 Jan 2019 13:31:41 +0000 (14:31 +0100)]
sadf: Update manual page

Explain how the color palette can be customized by the user
using the S_COLORS_PALETTE environment variable.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: SVG: Allow user to customize color palette
Sebastien GODARD [Sun, 20 Jan 2019 09:05:04 +0000 (10:05 +0100)]
sadf: SVG: Allow user to customize color palette

Add a new environment variable (S_COLORS_PALETTE) that can be used to
customize the color palette used by sadf to draw its graphs.
This variable is taken into account when the custom color palette has
been selected ("sadf -g -O customcol (...)").
The contents of this variable is a colon-separated list of six-digit,
three-byte hexadecimal numbers (hex triplets) that represent colors.
Detailed explanations will be given in sadf manual page.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: Update manual page
Sebastien GODARD [Sun, 13 Jan 2019 09:46:51 +0000 (10:46 +0100)]
sadf: Update manual page

Explain new bwcol option.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: SVG: Update custom color palette
Sebastien GODARD [Sun, 13 Jan 2019 09:42:26 +0000 (10:42 +0100)]
sadf: SVG: Update custom color palette

Change default colors used for custom color palette.
Those colors should be better for black and white printers.
See #205.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: SVG: Add new "bwcol" option
Sebastien GODARD [Sun, 13 Jan 2019 09:29:40 +0000 (10:29 +0100)]
sadf: SVG: Add new "bwcol" option

Add a new option to sadf SVG output.
This option tells sadf to use a black & white palette to draw its
graphs.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: SVG: Fix wrong variable used to draw discard IO graph
Sebastien GODARD [Sun, 13 Jan 2019 09:16:42 +0000 (10:16 +0100)]
sadf: SVG: Fix wrong variable used to draw discard IO graph

Fix silly error in svg_stats.c, where values used to draw graph for
discard IO were those for writes.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: Update manual page
Sebastien GODARD [Fri, 11 Jan 2019 15:44:33 +0000 (16:44 +0100)]
sadf: Update manual page

Explain new option "customcol".

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: SVG: Add new "customcol" option
Sebastien GODARD [Fri, 11 Jan 2019 15:31:30 +0000 (16:31 +0100)]
sadf: SVG: Add new "customcol" option

Add a new option to sadf SVG output.
Entering something like "sadf -g -O customcol (...)" enables the user to
select a second distinct color palette that will be used to draw the
graphs.

This second palette is intended to be fully customizable by the user.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoStarting sysstat-12.1.3
Sebastien GODARD [Fri, 14 Dec 2018 14:44:20 +0000 (15:44 +0100)]
Starting sysstat-12.1.3

Update sysstat version number in configure script.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosysstat-12.1.2 v12.1.2
Sebastien GODARD [Fri, 14 Dec 2018 14:36:19 +0000 (15:36 +0100)]
sysstat-12.1.2

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

This version adds support for discard I/O statistics to iostat and sar
commands. Discard I/Os have been separated from writes in Linux kernel
4.19.
This version also fixes several important bugs.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoUpdate NLS translations
Sebastien GODARD [Fri, 14 Dec 2018 14:18:12 +0000 (15:18 +0100)]
Update NLS translations

Sync with the Translation Project.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoUpdate sar manual page
Sebastien GODARD [Sun, 9 Dec 2018 10:01:30 +0000 (11:01 +0100)]
Update sar manual page

Explain new discard I/O fields added to "sar -b" output.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoUpdate DTD and XSD documents
Sebastien GODARD [Sun, 9 Dec 2018 09:55:56 +0000 (10:55 +0100)]
Update DTD and XSD documents

Update DTD and XSD documents to take into account new discard I/O
metrics added to "sar -b" output.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: Add discard I/O metric to all "sar -b" output formats
Sebastien GODARD [Sun, 9 Dec 2018 09:36:28 +0000 (10:36 +0100)]
sadf: Add discard I/O metric to all "sar -b" output formats

In addition to "sar -d" statistics, new discard I/O metrics should also be
available for "sar -b" statistics. Add these metrics to sadf output
formats.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosar: Add discard I/O metrics to "sar -b" output
Sebastien GODARD [Sun, 9 Dec 2018 08:52:57 +0000 (09:52 +0100)]
sar: Add discard I/O metrics to "sar -b" output

"sar -b" statistics are calculated as the sum of individual
statistics for each whole device in the system. Since discard I/Os are
now separated from writes in the kernel, take them into account when
calculating "sar -b" statistics.
New fields are added to "sar -b" output: dtps and bdscd/s.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoFix #202: Infinite loop in sadf
Sebastien GODARD [Sun, 2 Dec 2018 16:45:58 +0000 (17:45 +0100)]
Fix #202: Infinite loop in sadf

Check that structure's size is greater than 0 even for
unknown activities.
Else trying to skip this unknown activity in read_file_stat_bunch()
function will decrease offset pointer in file and result in an
infinite loop:

offset = (off_t) fal->size * (off_t) nr_value * (off_t) fal->nr2;

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoAdd a return code to remap_struct() function
Sebastien GODARD [Sun, 2 Dec 2018 16:44:36 +0000 (17:44 +0100)]
Add a return code to remap_struct() function

Add a return code to remap_struct() function so that we know if an error
has been encountered or not.
Test it after calling remap_struct() function.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoRemove remap_struct() prototype from sa.h
Sebastien GODARD [Sun, 2 Dec 2018 16:41:26 +0000 (17:41 +0100)]
Remove remap_struct() prototype from sa.h

This function is not used outside sa_common.c where it is defined.
So remove it from sa.h.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoUpdate DTD and XSD documents
Sebastien GODARD [Sat, 1 Dec 2018 10:15:38 +0000 (11:15 +0100)]
Update DTD and XSD documents

Update DTD and XSD documents to take into account new discard I/O
metrics.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: Add discard I/O metric to all output formats
Sebastien GODARD [Sat, 1 Dec 2018 10:02:12 +0000 (11:02 +0100)]
sadf: Add discard I/O metric to all output formats

Add new discard I/O metric to each of sadf's output formats (JSON, XML,
SVG, etc.)

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoUpdate sar manual page
Sebastien GODARD [Sat, 1 Dec 2018 09:14:28 +0000 (10:14 +0100)]
Update sar manual page

Explain new discard I/O metric (sar -d).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosadf: RAW: Display rd_ticks and wr_ticks fields
Sebastien GODARD [Sat, 1 Dec 2018 08:36:24 +0000 (09:36 +0100)]
sadf: RAW: Display rd_ticks and wr_ticks fields

Display rd_ticks and wr_ticks fields from structure stats_disk in sadf's
raw mode (sadf -r).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agosar: Add discard I/O metrics to "sar -d" output
Sebastien GODARD [Sat, 1 Dec 2018 08:21:54 +0000 (09:21 +0100)]
sar: Add discard I/O metrics to "sar -d" output

Separate discard I/Os from writes in the statistics displayed by sar.
A new field (dkB/s) is added to the output of "sar -d".

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoMerge branch 'master' of https://github.com/sysstat/sysstat
Sebastien GODARD [Sat, 1 Dec 2018 08:08:51 +0000 (09:08 +0100)]
Merge branch 'master' of https://github.com/sysstat/sysstat

5 years agord_stats.h: Reorder fields in stats_disk structure
Sebastien GODARD [Sat, 1 Dec 2018 08:05:17 +0000 (09:05 +0100)]
rd_stats.h: Reorder fields in stats_disk structure

New field dc_ticks must be added *after* all other fields of same type
("unsigned int" here). This is compulsory to make older versions of
sar/sadf able to read this structure.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoMerge pull request #203 from lousyd/master
GODARD Sebastien [Wed, 28 Nov 2018 06:22:33 +0000 (07:22 +0100)]
Merge pull request #203 from lousyd/master

Clarify sadc(8) on using multiple -S keywords

5 years agoClarify sadc(8) on using multiple -S keywords
Todd Walton [Tue, 27 Nov 2018 19:24:40 +0000 (14:24 -0500)]
Clarify sadc(8) on using multiple -S keywords

I modified man/sadc.in to show the -S option being followed by
"keyword", and then listed the keywords. This allows the syntax to more
clearly show that multiple keywords can be specified by comma-separating
them. It also reflects the language used in sar(1) for the -n option.

Also, I modified the FAQ to call out that one can specify multiple
keywords for -S by comma-separating them.

5 years agoFix #196 and #199: Out of bound reads security issues
Sebastien GODARD [Mon, 26 Nov 2018 13:32:05 +0000 (14:32 +0100)]
Fix #196 and #199: Out of bound reads security issues

Check args before calling memmove() and memset() in remap_struct()
function to avoid out of bound reads which would possibly lead to
unknown code execution and/or sadf command crash.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agord_stats.h: Fix stats_disk structure composition
Sebastien GODARD [Mon, 26 Nov 2018 13:27:32 +0000 (14:27 +0100)]
rd_stats.h: Fix stats_disk structure composition

Structure stats_disk's composition has been modified with the addition
of discard I/O fields. So update its description.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoiostat: Update manual page
Sebastien GODARD [Mon, 26 Nov 2018 08:37:56 +0000 (09:37 +0100)]
iostat: Update manual page

Explain new discard I/O metrics.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoiostat: Add discard I/O metrics to JSON output
Sebastien GODARD [Mon, 26 Nov 2018 08:17:42 +0000 (09:17 +0100)]
iostat: Add discard I/O metrics to JSON output

Add discard I/O metrics to JSON output displayed by iostat in basic and
extended modes.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoMerge pull request #201 from stevekay/typos
GODARD Sebastien [Mon, 26 Nov 2018 07:36:35 +0000 (08:36 +0100)]
Merge pull request #201 from stevekay/typos

Typos

5 years agofix tabs
steve kay [Sun, 25 Nov 2018 19:46:54 +0000 (19:46 +0000)]
fix tabs

5 years agofix configure typo : --enablle-copy-only -> --enable-copy-only
steve kay [Sun, 25 Nov 2018 19:38:35 +0000 (19:38 +0000)]
fix configure typo : --enablle-copy-only -> --enable-copy-only

5 years agoMerge pull request #198 from stevekay/master
GODARD Sebastien [Sun, 25 Nov 2018 17:16:13 +0000 (18:16 +0100)]
Merge pull request #198 from stevekay/master

Use memcpy rather than strncpy, in order to avoid truncation warning

5 years agoMerge pull request #200 from mator/master
GODARD Sebastien [Sun, 25 Nov 2018 17:02:51 +0000 (18:02 +0100)]
Merge pull request #200 from mator/master

sar: fix a small inconsistency in header of print_sar_restart function

5 years agosar: fix a small inconsistency in header of print_sar_restart function
Anatoly Pugachev [Fri, 23 Nov 2018 14:29:27 +0000 (17:29 +0300)]
sar: fix a small inconsistency in header of print_sar_restart function

file_hdr is used to report number of CPUs

Signed-off-by: Anatoly Pugachev <matorola@gmail.com>
5 years agoUse memcpy rather than strncpy, in order to avoid truncation warning
stevekay [Thu, 22 Nov 2018 22:38:45 +0000 (17:38 -0500)]
Use memcpy rather than strncpy, in order to avoid truncation warning

5 years agoiostat: Remove extra line between two samples
Sebastien GODARD [Sun, 18 Nov 2018 10:38:41 +0000 (11:38 +0100)]
iostat: Remove extra line between two samples

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
5 years agoiostat: Add initial support for discard I/O
Sebastien GODARD [Fri, 16 Nov 2018 16:15:11 +0000 (17:15 +0100)]
iostat: Add initial support for discard I/O

Statistics for discard operations have been recently added to Linux
kernel 4.19. Previous kernels didn't separate discards from writes
in the block layer statistics.
This patch adds initial support for discard I/O tracking to iostat.
It adds several new metrics which are similar to those already existing
for reads and writes.
Reports are also modified so that the user can better choose how things
will be displayed, using switches like -s (to get a narrow output
fitting on a 80-characters wide screen) or -h (to get a human-friendly
output): See below.
This patch still needs to be tested (I don't have a 4.19 kernel yet!),
completed (e.g. JSON output) and documented (manual pages will be
updated in a coming patch).

Sample outputs:
$ iostat -d
Linux 4.18.17-200.fc28.x86_64 (linux-1.home)  11/16/2018  _x86_64_ (8 CPU)

Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
sda              18.96       176.95       335.75         0.00    1767999    3354672          0

$ iostat -ds
Linux 4.18.17-200.fc28.x86_64 (linux-1.home)  11/16/2018  _x86_64_ (8 CPU)

Device             tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d
sda              18.80       175.46       332.95    1767999    3354896

$ iostat -dx
Linux 4.18.17-200.fc28.x86_64 (linux-1.home)  11/16/2018  _x86_64_ (8 CPU)

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sda              9.98    174.99     1.87  15.76    6.44    17.53    8.77    332.06    12.17  58.12   61.77    37.87    0.00      0.00     0.00   0.00    0.00     0.00    0.61   3.93

$ iostat -dxs
Linux 4.18.17-200.fc28.x86_64 (linux-1.home)  11/16/2018  _x86_64_ (8 CPU)

Device             tps      kB/s    rqm/s   await  areq-sz  aqu-sz  %util
sda              18.71    505.90    14.01   32.31    27.04    0.61   3.92

$ iostat -dxh
Linux 4.18.17-200.fc28.x86_64 (linux-1.home)  11/16/2018  _x86_64_ (8 CPU)

     r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz Device
    9.94    174.3k     1.86  15.8%    6.44    17.5k sda

     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz Device
    8.74    330.7k    12.12  58.1%   61.71    37.8k sda

     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz Device
    0.00      0.0k     0.00   0.0%    0.00     0.0k sda

  aqu-sz  %util Device
    0.61   3.9% sda

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agosvctm: Update sar and iostat manual pages
Sebastien GODARD [Sun, 4 Nov 2018 09:14:56 +0000 (10:14 +0100)]
svctm: Update sar and iostat manual pages

Remove explanations for svctm metric from sar and iostat manual pages.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agosvctm: Update DTD and XSD documents
Sebastien GODARD [Sun, 4 Nov 2018 09:11:02 +0000 (10:11 +0100)]
svctm: Update DTD and XSD documents

Make svctm field optional in DTD and XSD documents.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agoiostat/sar: Remove service time (svctm) metric
Sebastien GODARD [Sun, 4 Nov 2018 09:04:00 +0000 (10:04 +0100)]
iostat/sar: Remove service time (svctm) metric

Service time value (displayed as svctm by sar and iostat) could no
longer be trusted and has been made obsolete for several years. So
remove it now from sar (sar -d) and iostat output.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agoAdd new non regression tests
Sebastien GODARD [Thu, 1 Nov 2018 09:01:58 +0000 (10:01 +0100)]
Add new non regression tests

This patch adds new non regression tests for:
* sadf JSON and XML outputs: The output for sar -u is a bit different
than that for sar -u ALL and thus also needs to be tested,
* mpstat JSON output,
* iostat JSON output.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agoMerge pull request #193 from stevekay/crontabfix
GODARD Sebastien [Sun, 28 Oct 2018 16:50:14 +0000 (17:50 +0100)]
Merge pull request #193 from stevekay/crontabfix

remove superfluous '&' within crontabs

6 years agoremove superfluous '&' within crontabs
Steve Kay [Sat, 27 Oct 2018 20:06:01 +0000 (21:06 +0100)]
remove superfluous '&' within crontabs

6 years agoAdd new non regression tests for XML output
Sebastien GODARD [Sun, 14 Oct 2018 15:02:28 +0000 (17:02 +0200)]
Add new non regression tests for XML output

Add two new non regression tests that check the XML output of
sadf -x against DTD and XSD documents.
The tests are run only if the xmllint command exists.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agoMerge branch 'acdimalev-acdimalev-json-parse-test'
Sebastien GODARD [Sun, 14 Oct 2018 08:33:07 +0000 (10:33 +0200)]
Merge branch 'acdimalev-acdimalev-json-parse-test'

6 years agoImprove non regression test for JSON output
Sebastien GODARD [Sun, 14 Oct 2018 08:30:19 +0000 (10:30 +0200)]
Improve non regression test for JSON output

Look for two possible commands to test JSON output: json_verify and
json_pp.
Also make sure that one of them exists to run the non regression test.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
6 years agoMerge branch 'acdimalev-json-parse-test' of https://github.com/acdimalev/sysstat...
Sebastien GODARD [Sun, 14 Oct 2018 07:40:39 +0000 (09:40 +0200)]
Merge branch 'acdimalev-json-parse-test' of https://github.com/acdimalev/sysstat into acdimalev-acdimalev-json-parse-test