import sysstat-11.7.3-7.el8
This commit is contained in:
parent
640394b54d
commit
b9c08b25e0
@ -0,0 +1,88 @@
|
||||
From 5b5339d06c4f50730e5cc679e0854ce716f39117 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Dubaj <odubaj@redhat.com>
|
||||
Date: Thu, 28 Feb 2019 15:29:08 +0100
|
||||
Subject: [PATCH] ignoring autofs as real filesystem by counting number of
|
||||
valid filesystems and getting all valid filesystems
|
||||
|
||||
---
|
||||
count.c | 18 ++++++++++++++++--
|
||||
rd_stats.c | 18 ++++++++++++++++--
|
||||
2 files changed, 32 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/count.c b/count.c
|
||||
index 03469b0..6424baa 100644
|
||||
--- a/count.c
|
||||
+++ b/count.c
|
||||
@@ -463,8 +463,8 @@ __nr_t get_usb_nr(void)
|
||||
__nr_t get_filesystem_nr(void)
|
||||
{
|
||||
FILE *fp;
|
||||
- char line[512], fs_name[MAX_FS_LEN], mountp[256];
|
||||
- char *pos = 0;
|
||||
+ char line[512], fs_name[MAX_FS_LEN], mountp[256], type[128];
|
||||
+ char *pos = 0, *pos2 = 0;
|
||||
__nr_t fs = 0;
|
||||
int skip = 0, skip_next = 0;
|
||||
struct statvfs buf;
|
||||
@@ -491,6 +491,20 @@ __nr_t get_filesystem_nr(void)
|
||||
if (pos == NULL)
|
||||
continue;
|
||||
|
||||
+ /*
|
||||
+ * Find second field separator position,
|
||||
+ * read filesystem type,
|
||||
+ * if filesystem type is autofs, skip it
|
||||
+ */
|
||||
+ memset(type, 0, sizeof(type));
|
||||
+ pos2 = strchr(pos + 1, ' ');
|
||||
+ if (pos2 == NULL)
|
||||
+ continue;
|
||||
+
|
||||
+ sscanf(pos2 + 1, "%127s", type);
|
||||
+ if(strcmp(type, "autofs") == 0)
|
||||
+ continue;
|
||||
+
|
||||
/* Read filesystem name and mount point */
|
||||
sscanf(line, "%127s", fs_name);
|
||||
sscanf(pos + 1, "%255s", mountp);
|
||||
diff --git a/rd_stats.c b/rd_stats.c
|
||||
index 61dc958..43e082c 100644
|
||||
--- a/rd_stats.c
|
||||
+++ b/rd_stats.c
|
||||
@@ -2464,10 +2464,10 @@ __nr_t read_bus_usb_dev(struct stats_pwr_usb *st_pwr_usb, __nr_t nr_alloc)
|
||||
__nr_t read_filesystem(struct stats_filesystem *st_filesystem, __nr_t nr_alloc)
|
||||
{
|
||||
FILE *fp;
|
||||
- char line[512], fs_name[128], mountp[256];
|
||||
+ char line[512], fs_name[128], mountp[256], type[128];
|
||||
int skip = 0, skip_next = 0;
|
||||
char *pos = 0;
|
||||
- __nr_t fs_read = 0;
|
||||
+ __nr_t fs_read = 0, *pos2 = 0;
|
||||
struct stats_filesystem *st_filesystem_i;
|
||||
struct statvfs buf;
|
||||
|
||||
@@ -2491,6 +2491,20 @@ __nr_t read_filesystem(struct stats_filesystem *st_filesystem, __nr_t nr_alloc)
|
||||
if (pos == NULL)
|
||||
continue;
|
||||
|
||||
+ /*
|
||||
+ * Find second field separator position,
|
||||
+ * read filesystem type,
|
||||
+ * if filesystem type is autofs, skip it
|
||||
+ */
|
||||
+ memset(type, 0, sizeof(type));
|
||||
+ pos2 = strchr(pos + 1, ' ');
|
||||
+ if (pos2 == NULL)
|
||||
+ continue;
|
||||
+
|
||||
+ sscanf(pos2 + 1, "%127s", type);
|
||||
+ if(strcmp(type, "autofs") == 0)
|
||||
+ continue;
|
||||
+
|
||||
/* Read current filesystem name */
|
||||
sscanf(line, "%127s", fs_name);
|
||||
/*
|
||||
--
|
||||
2.30.1 (Apple Git-130)
|
||||
|
40
SOURCES/0001-sadf-Fix-seg-fault-on-empty-data-files.patch
Normal file
40
SOURCES/0001-sadf-Fix-seg-fault-on-empty-data-files.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From ce90f916fee2a39eb914f8b6b349adb76d100f75 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastien GODARD <sysstat@users.noreply.github.com>
|
||||
Date: Sat, 13 Apr 2019 18:44:29 +0200
|
||||
Subject: [PATCH] sadf: Fix seg fault on empty data files
|
||||
|
||||
Trying to display XML or JSON data (with sadf -x/-j) from a data file
|
||||
containing only RESTART records created a core dump.
|
||||
This patch fixes that.
|
||||
|
||||
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
|
||||
---
|
||||
sadf.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/sadf.c b/sadf.c
|
||||
index 2d2c39c..5d558d3 100644
|
||||
--- a/sadf.c
|
||||
+++ b/sadf.c
|
||||
@@ -963,14 +963,15 @@ void logic1_display_loop(int ifd, struct file_activity *file_actlst, char *file,
|
||||
(tm_start.use && (datecmp(loctime, &tm_start) < 0)) ||
|
||||
(tm_end.use && (datecmp(loctime, &tm_end) >= 0))));
|
||||
|
||||
- /* Save the first stats collected. Used for example in next_slice() function */
|
||||
- copy_structures(act, id_seq, record_hdr, 2, 0);
|
||||
-
|
||||
curr = 1;
|
||||
cnt = count;
|
||||
reset = TRUE;
|
||||
|
||||
if (!eosaf) {
|
||||
+
|
||||
+ /* Save the first stats collected. Used for example in next_slice() function */
|
||||
+ copy_structures(act, id_seq, record_hdr, 2, 0);
|
||||
+
|
||||
do {
|
||||
eosaf = read_next_sample(ifd, IGNORE_COMMENT | IGNORE_RESTART, curr,
|
||||
file, &rtype, tab, file_magic, file_actlst,
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,31 @@
|
||||
From c542c259ba9e71a5ade235dfbcde67ac8b510c4f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastien GODARD <sysstat@users.noreply.github.com>
|
||||
Date: Fri, 19 Apr 2019 15:20:45 +0200
|
||||
Subject: [PATCH] sar: Add missing %gnice CPU value for tickless CPU
|
||||
|
||||
A field (which should be displayed as 0.00) was missing in CPU
|
||||
statistics displayed by "sar -u ALL" for tickless CPUs.
|
||||
|
||||
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
|
||||
---
|
||||
pr_stats.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pr_stats.c b/pr_stats.c
|
||||
index 4fbd5d1..319630d 100644
|
||||
--- a/pr_stats.c
|
||||
+++ b/pr_stats.c
|
||||
@@ -218,8 +218,8 @@ __print_funct_t print_cpu_stats(struct activity *a, int prev, int curr,
|
||||
* %irq, %soft, %guest, %gnice.
|
||||
*/
|
||||
else if (DISPLAY_CPU_ALL(a->opt_flags)) {
|
||||
- cprintf_pc(DISPLAY_UNIT(flags), 4, 9, 2,
|
||||
- 0.0, 0.0, 0.0, 100.0);
|
||||
+ cprintf_pc(DISPLAY_UNIT(flags), 5, 9, 2,
|
||||
+ 0.0, 0.0, 0.0, 0.0, 100.0);
|
||||
printf("\n");
|
||||
}
|
||||
continue;
|
||||
--
|
||||
2.30.1 (Apple Git-130)
|
||||
|
26
SOURCES/0001-sar-Fix-typo-in-manual-page.patch
Normal file
26
SOURCES/0001-sar-Fix-typo-in-manual-page.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 83dac62520afe3fa92b53393f438c9fb9c492525 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastien GODARD <sysstat@users.noreply.github.com>
|
||||
Date: Sat, 6 Oct 2018 18:12:54 +0200
|
||||
Subject: [PATCH] sar: Fix typo in manual page
|
||||
|
||||
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
|
||||
---
|
||||
man/sar.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/man/sar.in b/man/sar.in
|
||||
index c45ee54..925c5f5 100644
|
||||
--- a/man/sar.in
|
||||
+++ b/man/sar.in
|
||||
@@ -373,7 +373,7 @@ The following values are displayed:
|
||||
.B MBfsfree
|
||||
.RS
|
||||
.RS
|
||||
-Total amount a free space in megabytes (including space available only to privileged user).
|
||||
+Total amount of free space in megabytes (including space available only to privileged user).
|
||||
.RE
|
||||
|
||||
.B MBfsused
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Collection of performance monitoring tools for Linux
|
||||
Name: sysstat
|
||||
Version: 11.7.3
|
||||
Release: 5%{?dist}
|
||||
Release: 7%{?dist}
|
||||
License: GPLv2+
|
||||
Group: Applications/System
|
||||
URL: http://sebastien.godard.pagesperso-orange.fr/
|
||||
@ -13,6 +13,10 @@ Source11: colorsysstat.sh
|
||||
|
||||
# Downstream patches
|
||||
Patch01: CVE-2019-16167_memory-corruption-due-to-an-integer-overflow.patch
|
||||
Patch02: 0001-ignoring-autofs-as-real-filesystem-by-counting-numbe.patch
|
||||
Patch03: 0001-sar-Add-missing-gnice-CPU-value-for-tickless-CPU.patch
|
||||
Patch04: 0001-sadf-Fix-seg-fault-on-empty-data-files.patch
|
||||
Patch05: 0001-sar-Fix-typo-in-manual-page.patch
|
||||
|
||||
BuildRequires: gettext, lm_sensors-devel, systemd
|
||||
|
||||
@ -42,6 +46,10 @@ The cifsiostat command reports I/O statistics for CIFS file systems.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch01 -p0
|
||||
%patch02 -p1
|
||||
%patch03 -p1
|
||||
%patch04 -p1
|
||||
%patch05 -p1
|
||||
|
||||
%build
|
||||
export CFLAGS="$RPM_OPT_FLAGS -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld"
|
||||
@ -90,6 +98,12 @@ fi
|
||||
%{_localstatedir}/log/sa
|
||||
|
||||
%changelog
|
||||
* Mon Nov 29 2021 <msekleta@redhat.com> - 11.7.3-7
|
||||
- Don't trigger autofs mounts when running sadc (#2000910)
|
||||
- sar: Add missing %gnice CPU value for tickless CPU (#2000916)
|
||||
- sadf: Fix seg fault on empty data files (#1910841)
|
||||
- sar: Fix typo in manual page (#1877836)
|
||||
|
||||
* Fri Jul 10 2020 Jan Macku <jamacku@redhat.com> - 11.7.3-5
|
||||
- Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user