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.
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.
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.
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.
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.
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.
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).
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():
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.
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.
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.
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=").
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.
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=
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.
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.
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.
Sebastien GODARD [Mon, 10 Jan 2022 16:57:25 +0000 (17:57 +0100)]
Fix index value used in online_cpu_bitmap array
The online_cpu_bitmap[] array size is based on the number of CPU
allocated (see sa_wrap.c:wrap_read_softnet()). The size is calculated as
BITMAP_SIZE(a->nr_allocated).
So the index used in read_softnet() function (rd_stats.c) shall not
exceed the size of the array, and so cannot reach NR_CPUS.
Sebastien GODARD [Wed, 29 Dec 2021 09:12:42 +0000 (10:12 +0100)]
A_IRQ: Count number of interrupts using /proc/interrupts
sar/sadc will no longer use /proc/stat file to calculate interrupts
statistics. They will use /proc/interrupts and will display per-CPU
statistics.
This first patch updates the function used to count the number of
interrupts.