From d752b75c8ad9cf151fcc71842ff6286cf4ed51c8 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Dec 13 2022 10:59:08 +0000 Subject: import sysstat-10.1.5-20.el7_9 --- diff --git a/SOURCES/sysstat-10.1.5-pids-prealloc.patch b/SOURCES/sysstat-10.1.5-pids-prealloc.patch index 23d9a59..e713244 100644 --- a/SOURCES/sysstat-10.1.5-pids-prealloc.patch +++ b/SOURCES/sysstat-10.1.5-pids-prealloc.patch @@ -1,19 +1,3 @@ -diff -upr sysstat-10.1.5.orig/common.h sysstat-10.1.5/common.h ---- sysstat-10.1.5.orig/common.h 2013-03-23 17:31:46.000000000 +0100 -+++ sysstat-10.1.5/common.h 2016-04-29 12:47:09.285214132 +0200 -@@ -106,9 +106,12 @@ - * - * NB: Define SP_VALUE() to normalize to %; - * HZ is 1024 on IA64 and % should be normalized to 100. -+ * SP_VALUE_100() will not output value bigger than 100; this is needed for some -+ * corner cases, should be used with care. - */ - #define S_VALUE(m,n,p) (((double) ((n) - (m))) / (p) * HZ) - #define SP_VALUE(m,n,p) (((double) ((n) - (m))) / (p) * 100) -+#define SP_VALUE_100(m,n,p) MINIMUM((((double) ((n) - (m))) / (p) * 100),100) - - /* - * Under very special circumstances, STDOUT may become unavailable. diff -upr sysstat-10.1.5.orig/pidstat.c sysstat-10.1.5/pidstat.c --- sysstat-10.1.5.orig/pidstat.c 2013-03-23 17:31:46.000000000 +0100 +++ sysstat-10.1.5/pidstat.c 2016-04-29 13:04:02.672402150 +0200 @@ -153,48 +137,6 @@ diff -upr sysstat-10.1.5.orig/pidstat.c sysstat-10.1.5/pidstat.c /* Close /proc directory */ closedir(dir); } -@@ -1174,15 +1191,15 @@ int write_pid_task_all_stats(int prev, i - printf(" %7.2f %7.2f %7.2f %7.2f", - (pstc->utime - pstc->gtime) < (pstp->utime - pstp->gtime) ? - 0.0 : -- SP_VALUE(pstp->utime - pstp->gtime, -+ SP_VALUE_100(pstp->utime - pstp->gtime, - pstc->utime - pstc->gtime, itv), -- SP_VALUE(pstp->stime, pstc->stime, itv), -- SP_VALUE(pstp->gtime, pstc->gtime, itv), -+ SP_VALUE_100(pstp->stime, pstc->stime, itv), -+ SP_VALUE_100(pstp->gtime, pstc->gtime, itv), - /* User time already includes guest time */ - IRIX_MODE_OFF(pidflag) ? -- SP_VALUE(pstp->utime + pstp->stime, -+ SP_VALUE_100(pstp->utime + pstp->stime, - pstc->utime + pstc->stime, g_itv) : -- SP_VALUE(pstp->utime + pstp->stime, -+ SP_VALUE_100(pstp->utime + pstp->stime, - pstc->utime + pstc->stime, itv)); - - printf(" %3d", pstc->processor); -@@ -1351,15 +1368,15 @@ int write_pid_task_cpu_stats(int prev, i - printf(" %7.2f %7.2f %7.2f %7.2f", - (pstc->utime - pstc->gtime) < (pstp->utime - pstp->gtime) ? - 0.0 : -- SP_VALUE(pstp->utime - pstp->gtime, -+ SP_VALUE_100(pstp->utime - pstp->gtime, - pstc->utime - pstc->gtime, itv), -- SP_VALUE(pstp->stime, pstc->stime, itv), -- SP_VALUE(pstp->gtime, pstc->gtime, itv), -+ SP_VALUE_100(pstp->stime, pstc->stime, itv), -+ SP_VALUE_100(pstp->gtime, pstc->gtime, itv), - /* User time already includes guest time */ - IRIX_MODE_OFF(pidflag) ? -- SP_VALUE(pstp->utime + pstp->stime, -+ SP_VALUE_100(pstp->utime + pstp->stime, - pstc->utime + pstc->stime, g_itv) : -- SP_VALUE(pstp->utime + pstp->stime, -+ SP_VALUE_100(pstp->utime + pstp->stime, - pstc->utime + pstc->stime, itv)); - - if (!disp_avg) { diff -upr sysstat-10.1.5.orig/pidstat.h sysstat-10.1.5/pidstat.h --- sysstat-10.1.5.orig/pidstat.h 2013-03-23 17:31:46.000000000 +0100 +++ sysstat-10.1.5/pidstat.h 2016-04-28 18:24:37.700124018 +0200 diff --git a/SPECS/sysstat.spec b/SPECS/sysstat.spec index df0c8df..4ac21c6 100644 --- a/SPECS/sysstat.spec +++ b/SPECS/sysstat.spec @@ -1,7 +1,7 @@ Summary: Collection of performance monitoring tools for Linux Name: sysstat Version: 10.1.5 -Release: 19%{?dist} +Release: 20%{?dist} License: GPLv2+ Group: Applications/System URL: http://sebastien.godard.pagesperso-orange.fr/ @@ -208,6 +208,9 @@ fi %{_localstatedir}/log/sa %changelog +* Fri Nov 11 2022 Lukáš Zaoral - 10.1.5-20 +- do not cap %usr to 100% in `pidstat -I` for multithreaded programs (#1763579) + * Mon Jan 20 2020 Michal Sekletár - 10.1.5-19 - fix possible segfault when appending to data file (#1774590)