]> granicus.if.org Git - sysstat/log
sysstat
2 years agoAdd support for option -t with sadf's SVG output (#331)
Sebastien GODARD [Wed, 17 Aug 2022 07:55:20 +0000 (09:55 +0200)]
Add support for option -t with sadf's SVG output (#331)

When sadf was used to display SVG graphs, it was not possible to display
the timestamps (on the X axis) in the same locale as that of the file
creator. This was because option -t was not supported by sadf in SVG
output format. This patch fixes that.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosa_conv.c: Use sizeof() instead of a constant
Sebastien GODARD [Sun, 10 Jul 2022 13:32:25 +0000 (15:32 +0200)]
sa_conv.c: Use sizeof() instead of a constant

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosadf: Make structures' size from older versions immutable
Sebastien GODARD [Sun, 10 Jul 2022 13:22:38 +0000 (15:22 +0200)]
sadf: Make structures' size from older versions immutable

The size of structures used by older sysstat versions should not depend
on the size of current sysstat version.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoMerge branch 'bmwiedemann-master'
Sebastien GODARD [Fri, 8 Jul 2022 13:14:47 +0000 (15:14 +0200)]
Merge branch 'bmwiedemann-master'

2 years agoDeclare sadc dependency on libsyscom.a
Bernhard M. Wiedemann [Wed, 6 Jul 2022 12:24:03 +0000 (14:24 +0200)]
Declare sadc dependency on libsyscom.a

Without this patch, make -j1 would try to link sadc
and fail to find libsyscom.a

Fixes #329

Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
2 years agoMerge branch 'Rtoax-patch-1'
Sebastien GODARD [Wed, 22 Jun 2022 13:37:11 +0000 (15:37 +0200)]
Merge branch 'Rtoax-patch-1'

2 years agoRemove whitespace characters at the end of a line
Rong Tao [Mon, 20 Jun 2022 01:34:05 +0000 (09:34 +0800)]
Remove whitespace characters at the end of a line

2 years agoMerge branch 'stevekay-tidy3'
Sebastien GODARD [Thu, 16 Jun 2022 16:11:12 +0000 (18:11 +0200)]
Merge branch 'stevekay-tidy3'

2 years agocode style, blank line after while
Steve Kay [Thu, 16 Jun 2022 13:52:07 +0000 (14:52 +0100)]
code style, blank line after while

2 years agocode style, space after while
Steve Kay [Thu, 16 Jun 2022 13:40:02 +0000 (14:40 +0100)]
code style, space after while

2 years agocode style fix, space after if
Steve Kay [Thu, 16 Jun 2022 13:27:07 +0000 (14:27 +0100)]
code style fix, space after if

2 years agofix typo, mid-night -> midnight
Steve Kay [Thu, 16 Jun 2022 13:25:36 +0000 (14:25 +0100)]
fix typo, mid-night -> midnight

2 years agofix rrd links in FAQ, as existing links gave a 404
Steve Kay [Thu, 16 Jun 2022 13:24:33 +0000 (14:24 +0100)]
fix rrd links in FAQ, as existing links gave a 404

2 years agoMerge branch 'stevekay-feature_A'
Sebastien GODARD [Wed, 1 Jun 2022 08:24:43 +0000 (10:24 +0200)]
Merge branch 'stevekay-feature_A'

2 years agoMerge branch 'feature_A' of https://github.com/stevekay/sysstat into stevekay-feature_A
Sebastien GODARD [Wed, 1 Jun 2022 08:24:04 +0000 (10:24 +0200)]
Merge branch 'feature_A' of https://github.com/stevekay/sysstat into stevekay-feature_A

2 years agopacify gcc checks
Steve Kay [Sun, 29 May 2022 08:18:54 +0000 (09:18 +0100)]
pacify gcc checks

Limit irq_name to size within its bounds

2 years agoStarting sysstat 12.7.1
Sebastien GODARD [Sun, 29 May 2022 07:00:00 +0000 (09:00 +0200)]
Starting sysstat 12.7.1

configure script updated.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosysstat-12.6.0 v12.6.0
Sebastien GODARD [Sun, 29 May 2022 06:46:19 +0000 (08:46 +0200)]
sysstat-12.6.0

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

This version adds a new metric (softnet backlog) to the software-based
network processing activity.
It also fixes several bugs concerning the recent interrupts statistics
rewritten code, and to metrics names used by sadf in the PCP output
format.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoUpdate NLS translations
Sebastien GODARD [Sun, 29 May 2022 06:38:36 +0000 (08:38 +0200)]
Update NLS translations

Sync with the Translation Project.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoMerge branch 'cbagwell-32bit-time-be'
Sebastien GODARD [Mon, 18 Apr 2022 13:14:39 +0000 (15:14 +0200)]
Merge branch 'cbagwell-32bit-time-be'

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoConvert 64-bit time value to time_t as needed
Chris Bagwell [Tue, 12 Apr 2022 19:51:48 +0000 (14:51 -0500)]
Convert 64-bit time value to time_t as needed

On platforms with 32-bit time_t, code up converts it to a 64-bit data
type.  The pointer to this 64-bit value is incorrectly passed to
a few functions that accept a pointer to a 32-bit time_t.

On little endian platforms the original 32-bit time_t value will be visible
this way but on big endian platforms only zeros will be seen and time
will be show as wrong values.

Update code to convert to time_t to be compatible with 32-bit be
platforms.

2 years agosadc: Add new non regression tests
Sebastien GODARD [Fri, 8 Apr 2022 07:20:01 +0000 (09:20 +0200)]
sadc: Add new non regression tests

Test ill-formed datafiles.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoMerge branch 'lzaoral-ldflags'
Sebastien GODARD [Sun, 3 Apr 2022 08:21:04 +0000 (10:21 +0200)]
Merge branch 'lzaoral-ldflags'

2 years agoUpdate non regression tests
Sebastien GODARD [Sun, 3 Apr 2022 08:18:20 +0000 (10:18 +0200)]
Update non regression tests

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoMerge branch 'ldflags' of https://github.com/lzaoral/sysstat into lzaoral-ldflags
Sebastien GODARD [Sun, 3 Apr 2022 08:06:09 +0000 (10:06 +0200)]
Merge branch 'ldflags' of https://github.com/lzaoral/sysstat into lzaoral-ldflags

2 years agoPCP: Fix multiple metrics name problems
Sebastien GODARD [Sun, 3 Apr 2022 07:42:27 +0000 (09:42 +0200)]
PCP: Fix multiple metrics name problems

Replace metric name "kernel.percpu.cpu.wait.total" (which was defined
but not used) with "kernel.percpu.cpu.iowait".

"kernel.percpu.cpu.int" was used but not defined. Replace it with
"kernel.percpu.cpu.irq.total" and define it.

Fix metric name "mem.util.buffers" -> Replace it with "mem.util.bufmem".

Fix metric name "mem.util.stack" -> Replace it with
"mem.util.kernelStack".

Fix metric name "mem.util.vmused" -> Replace it with
"mem.util.vmallocUsed".

Define metric name "disk.dev.total_bytes".

Fix metric name "network.ip.ipoutrequests" -> Replace it with
"network.ip.outrequests".

Fix metric name "network.ip.ipreasmreqds" -> Replace it with
"network.ip.reasmreqds".

Fix metric name "network.ip.ipreasmoks" -> Replace it with
"network.ip.reasmoks".

Fix metric name "network.tcp.tcpestabresets" -> Replace it with
"network.tcp.estabresets".

FIx metric name "network.tcp.tcpretranssegs" -> Replace it with
"network.tcp.retranssegs".

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoconfigure: print LDFLAGS in final summary
Lukáš Zaoral [Thu, 31 Mar 2022 12:36:59 +0000 (14:36 +0200)]
configure: print LDFLAGS in final summary

2 years agoconfigure: do not overwrite LDFLAGS in test for 32-bit libsensors
Lukáš Zaoral [Thu, 31 Mar 2022 12:33:08 +0000 (14:33 +0200)]
configure: do not overwrite LDFLAGS in test for 32-bit libsensors

2 years agoMakefile: honour LDFLAGS passed to ./configure
Lukáš Zaoral [Thu, 31 Mar 2022 12:06:03 +0000 (14:06 +0200)]
Makefile: honour LDFLAGS passed to ./configure

The configure script help says that the LDFLAGS environment variable can be
used to pass additional flags to linker during build.

However, Makefile.in did not mention this variable at all so the additional
flags were silently skipped.

2 years agopr_stats.c: Cosmetic changes
Sebastien GODARD [Sun, 27 Mar 2022 13:48:02 +0000 (15:48 +0200)]
pr_stats.c: Cosmetic changes

One printf("\n") is enough...

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoUpdate non regression tests
Sebastien GODARD [Sun, 27 Mar 2022 13:39:50 +0000 (15:39 +0200)]
Update non regression tests

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosar: A_NET_SOFT: Fix how average backlog length is calculated
Sebastien GODARD [Sun, 27 Mar 2022 13:38:10 +0000 (15:38 +0200)]
sar: A_NET_SOFT: Fix how average backlog length is calculated

Backlog length is an instantaneous value, not a value calculated over
the time interval. Its average value should be calculated in a specific
way.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosar: A_NET_SOFT: Make sure backlog length variable is set to zero
Sebastien GODARD [Sun, 27 Mar 2022 13:35:51 +0000 (15:35 +0200)]
sar: A_NET_SOFT: Make sure backlog length variable is set to zero

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosar: A_NET_SOFT: Fix JSON/XML output
Sebastien GODARD [Sun, 27 Mar 2022 13:34:14 +0000 (15:34 +0200)]
sar: A_NET_SOFT: Fix JSON/XML output

Remove extra comma.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoUpdate sar manual page
Sebastien GODARD [Sat, 26 Mar 2022 14:45:59 +0000 (15:45 +0100)]
Update sar manual page

Explain new softnet metric: backlog length.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosadf: A_NET_SOFT: Add new metric softnet network backlog (#315)
Sebastien GODARD [Sat, 26 Mar 2022 14:43:57 +0000 (15:43 +0100)]
sadf: A_NET_SOFT: Add new metric softnet network backlog (#315)

New metric added in kernel 5.10
https://github.com/torvalds/linux/commit/7d58e6555870d01d85b181ba2a16b217a1ea8bdd

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosar: A_NET_SOFT: Add new metric: softnet backlog length
Sebastien GODARD [Sat, 26 Mar 2022 14:42:09 +0000 (15:42 +0100)]
sar: A_NET_SOFT: Add new metric: softnet backlog length

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoPCP: A_NET_SOFT: Fix name for flow_limit metric
Sebastien GODARD [Sat, 26 Mar 2022 14:36:31 +0000 (15:36 +0100)]
PCP: A_NET_SOFT: Fix name for flow_limit metric

Metric name was flow_limit_count in pcp_def_metrics.c but used as
flow_limit in pcp_stats.c
This name mismatch resulted in no value being displayed.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoSoftnet backlog: Update DTD and XSD documents
Sebastien GODARD [Sat, 26 Mar 2022 14:33:08 +0000 (15:33 +0100)]
Softnet backlog: Update DTD and XSD documents

Update DTD and XSD documents to take into account new softnet backlog
length metric (A_NET_SOFT).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoUpdate FAQ (#313)
Sebastien GODARD [Fri, 25 Mar 2022 14:12:25 +0000 (15:12 +0100)]
Update FAQ (#313)

Make it clear that we actually use kibibytes, mebibytes, etc.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoUpdate non regression tests
Sebastien GODARD [Fri, 25 Mar 2022 13:31:00 +0000 (14:31 +0100)]
Update non regression tests

Add new columns to some of the /proc/net/softnet_stat files.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_NET_SOFT: Use CPU id from /proc/net/softnet_stat
Sebastien GODARD [Fri, 25 Mar 2022 13:28:38 +0000 (14:28 +0100)]
A_NET_SOFT: Use CPU id from /proc/net/softnet_stat

CPU id has been added as a new column in /proc/net/softnet_stat in
kernel 5.10. Use it to map data to their corresponding CPU.
See #315.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoget_global_int_statistics(): Cast to size_t before operation is done
Sebastien GODARD [Sun, 13 Mar 2022 10:46:24 +0000 (11:46 +0100)]
get_global_int_statistics(): Cast to size_t before operation is done

Use a cast to ensure that the multiplication is done using size_t.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoFix maximum value for A_IRQ activity
Sebastien GODARD [Wed, 9 Mar 2022 16:02:43 +0000 (17:02 +0100)]
Fix maximum value for A_IRQ activity

@nr_max is the upper bound associated with the number of CPU, not the
number of interrupts.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoIncrease NR2_MAX value
Sebastien GODARD [Wed, 9 Mar 2022 15:57:36 +0000 (16:57 +0100)]
Increase NR2_MAX value

This value is the upper bound for @nr2 value. Increase it to 4096
since it is now used for A_IRQ activity as the highest possible value
for the number of interrupts.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoAdd sanity checks on values read from file
Sebastien GODARD [Wed, 9 Mar 2022 15:53:27 +0000 (16:53 +0100)]
Add sanity checks on values read from file

Check upper bounds for @nr and @nr2 read from file to convert.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoRemove unneeded variable assignment
Sebastien GODARD [Sun, 6 Mar 2022 17:07:55 +0000 (18:07 +0100)]
Remove unneeded variable assignment

nr_types_nr[] array contents are constant. Don't need to set
nr_types_nr[2].

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosadf: Add basic colorization to sadf's output
Sebastien GODARD [Tue, 1 Mar 2022 12:36:01 +0000 (13:36 +0100)]
sadf: Add basic colorization to sadf's output

Colorization concerns only comments displayed in CSV and RAW formats.
It also concerns some hints displayed in RAW format in debug mode.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoStarting sysstat-12.6.0
Sebastien GODARD [Mon, 28 Feb 2022 08:32:35 +0000 (09:32 +0100)]
Starting sysstat-12.6.0

configure script updated.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosysstat-12.5.6 v12.5.6
Sebastien GODARD [Mon, 28 Feb 2022 08:20:23 +0000 (09:20 +0100)]
sysstat-12.5.6

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

This version includes a complete rewriting of the code used to collect
and display interrupts statistics. These are now collected from the
/proc/interrupts file instead of the /proc/stat one, and are displayed
for each CPU.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoUpdate NLS translations
Sebastien GODARD [Mon, 28 Feb 2022 07:53:23 +0000 (08:53 +0100)]
Update NLS translations

Sync with The Translation Project.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoCopyright year: Switch to 2022
Sebastien GODARD [Mon, 28 Feb 2022 07:19:15 +0000 (08:19 +0100)]
Copyright year: Switch to 2022

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoUpdate non regression tests
Sebastien GODARD [Thu, 24 Feb 2022 08:54:28 +0000 (09:54 +0100)]
Update non regression tests

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosar: Make sure that all the buffers are copied in copy_structures()
Sebastien GODARD [Thu, 24 Feb 2022 08:51:38 +0000 (09:51 +0100)]
sar: Make sure that all the buffers are copied in copy_structures()

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Also optimize get_global_int_statistics() function
Sebastien GODARD [Thu, 24 Feb 2022 08:38:26 +0000 (09:38 +0100)]
A_IRQ: Also optimize get_global_int_statistics() function

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Fix pretty printing
Sebastien GODARD [Sun, 20 Feb 2022 16:33:02 +0000 (17:33 +0100)]
A_IRQ: Fix pretty printing

Make sure interrupt name is printed after all per-CPU interrupt values
in pretty mode.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_NET_SOFT: Slight optimization in get_global_soft_statistics() function
Sebastien GODARD [Sun, 20 Feb 2022 08:02:10 +0000 (09:02 +0100)]
A_NET_SOFT: Slight optimization in get_global_soft_statistics() function

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosadf: JSON: Don't display interrupt nr when all selected CPU are offline
Sebastien GODARD [Sat, 19 Feb 2022 15:53:01 +0000 (16:53 +0100)]
sadf: JSON: Don't display interrupt nr when all selected CPU are offline

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoAdd new non regression tests
Sebastien GODARD [Sat, 19 Feb 2022 15:52:28 +0000 (16:52 +0100)]
Add new non regression tests

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoXML: Update DTD and XSD documents
Sebastien GODARD [Sat, 19 Feb 2022 11:44:44 +0000 (12:44 +0100)]
XML: Update DTD and XSD documents

If the user selects only a CPU which happens to be offline then the XML
output generated by sadf -x will contain no cpu element.
Update DTD and XSD documents so that the XML output won't be considered
as invalid.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoPCP: A_NET_NFS(D): Fix instance names for getattr call
Sebastien GODARD [Sun, 13 Feb 2022 07:57:04 +0000 (08:57 +0100)]
PCP: A_NET_NFS(D): Fix instance names for getattr call

RPC call is getattr and not lookup.
The instance definition in pcp_stats.c was wrong for getattr call for
NFS and NFSD activities. Yet pcp_stats.c used the expected name getattr,
resulting in a name mismatch and no values being displayed.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoPCP: A_NET_SOFT: Fix flow_limit_count metric's unit
Sebastien GODARD [Sun, 13 Feb 2022 07:47:38 +0000 (08:47 +0100)]
PCP: A_NET_SOFT: Fix flow_limit_count metric's unit

Unit for flow_limit_count metric is that of a counter.
Problem exists only for CPU "all". Unit is correct for per-CPU metric.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoUse strings definition whenever possible
Sebastien GODARD [Sat, 12 Feb 2022 17:07:10 +0000 (18:07 +0100)]
Use strings definition whenever possible

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoFix typos in comments
Sebastien GODARD [Sat, 12 Feb 2022 16:49:56 +0000 (17:49 +0100)]
Fix typos in comments

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoUse sizeof() instead of hard-coded values with snprintf() function
Sebastien GODARD [Sat, 12 Feb 2022 16:40:57 +0000 (17:40 +0100)]
Use sizeof() instead of hard-coded values with snprintf() function

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agorndr_stats.c: Use NOVAL instead of NULL as last arg for cons() function
Sebastien GODARD [Sat, 12 Feb 2022 16:30:00 +0000 (17:30 +0100)]
rndr_stats.c: Use NOVAL instead of NULL as last arg for cons() function

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosa_common.c: Move search_list_item() and add_list_item() upwards
Sebastien GODARD [Sat, 12 Feb 2022 16:20:02 +0000 (17:20 +0100)]
sa_common.c: Move search_list_item() and add_list_item() upwards

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Update non regression tests results
Sebastien GODARD [Sat, 12 Feb 2022 14:59:46 +0000 (15:59 +0100)]
A_IRQ: Update non regression tests results

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoPCP: Make sure instances for per-CPU interrupts are created for all CPU
Sebastien GODARD [Sat, 12 Feb 2022 14:55:36 +0000 (15:55 +0100)]
PCP: Make sure instances for per-CPU interrupts are created for all CPU

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: sadf: Update conversion function
Sebastien GODARD [Fri, 11 Feb 2022 14:40:15 +0000 (15:40 +0100)]
A_IRQ: sadf: Update conversion function

Update sadf so that it can convert datafiles using old A_IRQ activity
structure to current up-to-date format.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: sadf: Display 0.00 when number of interrupts decreases
Sebastien GODARD [Fri, 11 Feb 2022 10:21:30 +0000 (11:21 +0100)]
A_IRQ: sadf: Display 0.00 when number of interrupts decreases

See commit 5c15058.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoMerge branch 'natoscott-pcp-percpu-intr'
Sebastien GODARD [Wed, 9 Feb 2022 15:56:06 +0000 (16:56 +0100)]
Merge branch 'natoscott-pcp-percpu-intr'

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoMerge branch 'pcp-percpu-intr' of https://github.com/natoscott/sysstat into natoscott...
Sebastien GODARD [Wed, 9 Feb 2022 15:30:05 +0000 (16:30 +0100)]
Merge branch 'pcp-percpu-intr' of https://github.com/natoscott/sysstat into natoscott-pcp-percpu-intr

2 years agoA_IRQ: sadf: Update PCP interface for per-CPU interrupts statistics
Nathan Scott [Wed, 9 Feb 2022 00:36:32 +0000 (11:36 +1100)]
A_IRQ: sadf: Update PCP interface for per-CPU interrupts statistics

Use the PCP instance domain convention with kernel.percpu.interrupts
where the interrupt line and cpu ID are combined.  This provides the
same metric as PCP and also a single stable metric identifier (pmID).

Signed-off-by: Nathan Scott <nathans@redhat.com>
2 years agoA_IRQ: Update DTD and XSD documents
Sebastien GODARD [Tue, 8 Feb 2022 13:53:12 +0000 (14:53 +0100)]
A_IRQ: Update DTD and XSD documents

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Update cpu attribute in XML output
Sebastien GODARD [Tue, 8 Feb 2022 13:50:31 +0000 (14:50 +0100)]
A_IRQ: Update cpu attribute in XML output

cpu attribute's possible values are "all" or a value like "0", "1", etc.
to be consistent with other activities XML output.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosadf: DB/PPC: Make sure value associated with pt_newlin flag is printed
Sebastien GODARD [Tue, 8 Feb 2022 13:46:23 +0000 (14:46 +0100)]
sadf: DB/PPC: Make sure value associated with pt_newlin flag is printed

PT_NOFLAG must now be explicitly specified for the value to be printed.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoFix commit 3ab10c8
Sebastien GODARD [Sun, 6 Feb 2022 17:01:12 +0000 (18:01 +0100)]
Fix commit 3ab10c8

I shouldn't have deleted this line :-(

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agosar/sadf: Don't reallocate buffers for activities not present in file
Sebastien GODARD [Sun, 6 Feb 2022 16:51:30 +0000 (17:51 +0100)]
sar/sadf: Don't reallocate buffers for activities not present in file

Buffer reallocation would fail for activities which are not in the file
being read. This is because @nr2 = -1 and @nr2 is used to compute the
memory to allocate in reallocate_all_buffers():

SREALLOC(a->buf[j], void,
 (size_t) a->msize * nr_realloc * (size_t) a->nr2);

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: sar: Display 0.00 when number of interrupts decreases
Sebastien GODARD [Sun, 6 Feb 2022 16:47:58 +0000 (17:47 +0100)]
A_IRQ: sar: Display 0.00 when number of interrupts decreases

When a CPU goes offline, the number of interrupts among all CPU can
decrease. In this case, display a value of 0.00 instead of the huge
number that would appear otherwise.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: sar: Always display a header line for each sample
Sebastien GODARD [Sun, 6 Feb 2022 16:41:46 +0000 (17:41 +0100)]
A_IRQ: sar: Always display a header line for each sample

Make sure that the header line gets printed with each sample.
This is because CPU can go offline or come back online, and so the
header line needs to be updated accordingly.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: sadf: Update PCP interface for interrupts statistics
Sebastien GODARD [Sun, 6 Feb 2022 07:09:42 +0000 (08:09 +0100)]
A_IRQ: sadf: Update PCP interface for interrupts statistics

Update/create new PCP metrics for interrupts statistics:

kernel.all.intr: This is the total number of all interrupts among
all processors

kernel.all.interrupts.total: This is the total number of each interrupt
among all processors. A domain instance is created for each interrupt
("0", "1", "LOC", "CAL", etc.)

kernel.percpu.interrupts.XXX: This is the number of interrupts XXX for a
given processor. A domain instance is created for each processor (cpu0,
cpu1, etc.)
E.g.:
kernel.percpu.interrupts.sum is the total number of all interrupts for a
given processor.
kernel.percpu.interrupts.LOC is the number of LOC interrupts for a given
processor.
Metric names cannot contain digits. As a consequence,
kernel.percpu.interrupts.0 is replaced with kernel.percpu.interrupts.a
kernel.percpu.interrupts.1 is replaced with kernel.percpu.interrupts.b
kernel.percpu.interrupts.30 is replaced with kernel.percpu.interrupts.da
etc.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Add new method to create the list of interrupts names
Sebastien GODARD [Sun, 6 Feb 2022 07:02:43 +0000 (08:02 +0100)]
A_IRQ: Add new method to create the list of interrupts names

Add count_new_int() method to A_IRQ activity structure.
This method will be used to create the list of all the interrupts names
present in file (unless a list has been explicitly entered by the user
on the command line with option "--int=").

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Update sadf RAW output report
Sebastien GODARD [Sun, 30 Jan 2022 14:27:41 +0000 (15:27 +0100)]
A_IRQ: Update sadf RAW output report

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Check if CPU "all" should be displayed
Sebastien GODARD [Sun, 30 Jan 2022 14:16:51 +0000 (15:16 +0100)]
A_IRQ: Check if CPU "all" should be displayed

Don't forget CPU "all" when checking which CPU have been selected and
should be displayed.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Update sadf XML output report
Sebastien GODARD [Sat, 29 Jan 2022 15:20:43 +0000 (16:20 +0100)]
A_IRQ: Update sadf XML output report

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Update sadf JSON output report
Sebastien GODARD [Sat, 29 Jan 2022 15:03:31 +0000 (16:03 +0100)]
A_IRQ: Update sadf JSON output report

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Don't set name for "sum" interrupt
Sebastien GODARD [Sat, 29 Jan 2022 14:32:16 +0000 (15:32 +0100)]
A_IRQ: Don't set name for "sum" interrupt

The name "sum" is already saved as the interrupt name for the total
number of interrupts. So use that name.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Update sadf PPC/DB output report
Sebastien GODARD [Sat, 29 Jan 2022 14:26:50 +0000 (15:26 +0100)]
A_IRQ: Update sadf PPC/DB output report

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Update sar and sadf manual pages
Sebastien GODARD [Sat, 29 Jan 2022 08:49:18 +0000 (09:49 +0100)]
A_IRQ: Update sar and sadf manual pages

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: sar: Update report output
Sebastien GODARD [Sat, 29 Jan 2022 08:45:30 +0000 (09:45 +0100)]
A_IRQ: sar: Update report output

sar now displays interrupts for each CPU, and the global value among all
CPU.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Read interrupts stats from /proc/interrupts
Sebastien GODARD [Sat, 29 Jan 2022 08:20:59 +0000 (09:20 +0100)]
A_IRQ: Read interrupts stats from /proc/interrupts

Update function used to read interrupts statistics.
They are no longer read from /proc/stat but from /proc/interrupts.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Add new "--int=" option to sar and sadf
Sebastien GODARD [Fri, 28 Jan 2022 16:04:31 +0000 (17:04 +0100)]
A_IRQ: Add new "--int=" option to sar and sadf

The option "--int=" can be used with sar and sadf to enter a list of
comma-separated interrupts values, ranges of interrupts values, or even
interrupts names.
These interrupts will then be displayed using option -I.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Change syntax for option -I
Sebastien GODARD [Sun, 23 Jan 2022 14:54:07 +0000 (15:54 +0100)]
A_IRQ: Change syntax for option -I

Option -I was followed by a list of interrupts or the SUM/ALL keywords.
Now option -I doesn't need to be followed par additional parameters.
Keywords SUM and ALL may still be used (but the ALL keyword will be
ignored).
The list of interrupts will be entered using a new option: --int=

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoA_IRQ: Move to new structure
Sebastien GODARD [Sun, 23 Jan 2022 14:48:52 +0000 (15:48 +0100)]
A_IRQ: Move to new structure

Interrupts activity structure is modified.
The interrupt name will now be saved together with the number of
interrupts.
The number of interrupts is saved as an unsigned int to be consistent
with the type used by the kernel.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoMerge branch 'sar_interrupts_stats'
Sebastien GODARD [Sun, 23 Jan 2022 14:14:19 +0000 (15:14 +0100)]
Merge branch 'sar_interrupts_stats'

2 years agoUpdate non regression tests
Sebastien GODARD [Sun, 23 Jan 2022 13:45:45 +0000 (14:45 +0100)]
Update non regression tests

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agoMake sure that datafiles with unknown activities can be read by sar
Sebastien GODARD [Sun, 23 Jan 2022 09:57:16 +0000 (10:57 +0100)]
Make sure that datafiles with unknown activities can be read by sar

When the structure containing statistics for an activity is modified
(with the number of fields of type A increased and of type B decreased),
sar and sadf might not be able to read the corresponding datafile.
Make sure that they can read the other activities in file, even if the
unknown activity is ignored.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agompstat: Don't use read_stat_irq() function
Sebastien GODARD [Wed, 12 Jan 2022 16:48:44 +0000 (17:48 +0100)]
mpstat: Don't use read_stat_irq() function

mpstat used read_stat_irq() function from rd_stats.c to get the total
number of interrupts among all processors.
This function is to be heavily modified to deal with sar's new
interrupts statistics report. So create a new function which will be
used only by mpstat and include it in its code.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
2 years agompstat.h: Remove unneeded 'aligned' attribute
Sebastien GODARD [Mon, 10 Jan 2022 17:40:47 +0000 (18:40 +0100)]
mpstat.h: Remove unneeded 'aligned' attribute

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