diff --git a/bugfix-sysstat-10.1.5-read-ttyAMA-first-for-arm64.patch b/bugfix-sysstat-10.1.5-read-ttyAMA-first-for-arm64.patch deleted file mode 100644 index 17b5d5f2bb1f84a016d5799c516841d3f59fbf1c..0000000000000000000000000000000000000000 --- a/bugfix-sysstat-10.1.5-read-ttyAMA-first-for-arm64.patch +++ /dev/null @@ -1,64 +0,0 @@ -From cfddf05021b151fdd16830cef764bf180b273ec8 Mon Sep 17 00:00:00 2001 -From: Zhikun Shan -Date: Wed, 7 Aug 2019 02:23:19 -0400 -Subject: [PATCH] sysstat: bugfix sysstat 10.1.5 read ttyAMA first for arm64 - -reason:read ttyAMA first for arm64. -Signed-off-by: Zhikun Shan ---- - count.c | 7 +++++-- - rd_stats.c | 7 +++++-- - rd_stats.h | 1 + - 3 files changed, 11 insertions(+), 4 deletions(-) - -diff --git a/count.c b/count.c -index d84ae7a..56864d3 100644 ---- a/count.c -+++ b/count.c -@@ -317,8 +317,11 @@ __nr_t get_serial_nr(void) - char line[256]; - __nr_t sl = 0; - -- if ((fp = fopen(SERIAL, "r")) == NULL) -- return 0; /* No SERIAL file */ -+ if ((fp = fopen(TTYAMA, "r")) == NULL) { -+ if ((fp = fopen(SERIAL, "r")) == NULL) { -+ return 0; /* No SERIAL file */ -+ } -+ } - - while (fgets(line, sizeof(line), fp) != NULL) { - /* -diff --git a/rd_stats.c b/rd_stats.c -index 68e2799..8ccfec4 100644 ---- a/rd_stats.c -+++ b/rd_stats.c -@@ -871,8 +871,11 @@ __nr_t read_tty_driver_serial(struct stats_serial *st_serial, __nr_t nr_alloc) - char *p; - __nr_t sl_read = 0; - -- if ((fp = fopen(SERIAL, "r")) == NULL) -- return 0; -+ if ((fp = fopen(TTYAMA, "r")) == NULL) { -+ if ((fp = fopen(SERIAL, "r")) == NULL) { -+ return; -+ } -+ } - - while (fgets(line, sizeof(line), fp) != NULL ) { - -diff --git a/rd_stats.h b/rd_stats.h -index bc99127..599fbea 100644 ---- a/rd_stats.h -+++ b/rd_stats.h -@@ -54,6 +54,7 @@ - - /* Files */ - #define SERIAL PRE "/proc/tty/driver/serial" -+#define TTYAMA PRE "/proc/tty/driver/ttyAMA" - #define FDENTRY_STATE PRE "/proc/sys/fs/dentry-state" - #define FFILE_NR PRE "/proc/sys/fs/file-nr" - #define FINODE_STATE PRE "/proc/sys/fs/inode-state" --- -2.19.1 - diff --git a/sysstat-12.5.4.tar.gz b/sysstat-12.5.4.tar.gz deleted file mode 100644 index 4151cf3e6960dbb74d5d5b484a4c883544a664b3..0000000000000000000000000000000000000000 Binary files a/sysstat-12.5.4.tar.gz and /dev/null differ diff --git a/sysstat.spec b/sysstat.spec index a5f67fadf6bd445a2dee3f0e047847bbc36c272a..14b237e7ee408ca7ebf290eeda753c057f7463c2 100644 --- a/sysstat.spec +++ b/sysstat.spec @@ -1,73 +1,69 @@ -Name: sysstat -Version: 12.5.4 -Release: 3 -Summary: System performance tools for the Linux operating system +Summary: Collection of performance monitoring tools for Linux +Name: sysstat +Version: 12.7.1 +Release: 1%{?dist} License: GPLv2+ -URL: http://sebastien.godard.pagesperso-orange.fr/ -Source0: http://sebastien.godard.pagesperso-orange.fr/%{name}-%{version}.tar.gz - -BuildRequires: gcc, gettext, lm_sensors-devel, systemd - -Requires: findutils, xz -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd - -Patch9000: bugfix-sysstat-10.1.5-read-ttyAMA-first-for-arm64.patch +URL: http://sebastien.godard.pagesperso-orange.fr/ +Source: https://github.com/sysstat/sysstat/archive/v%{version}.tar.gz + +BuildRequires: gcc +BuildRequires: gettext +BuildRequires: git +BuildRequires: lm_sensors-devel +BuildRequires: make +BuildRequires: pcp-libs-devel +Requires: findutils +Requires: xz %description -The sysstat package contains various utilities, common to many commercial -Unixes, to monitor system performance and usage activity: -iostat: reports CPU statistics and input/output statistics for block devices -and partitions. -mpstat: reports individual or combined processor related statistics. -pidstat: reports statistics for Linux tasks (processes) : I/O, CPU, memory, etc. -tapestat: reports statistics for tape drives connected to the system. -cifsiostat: reports CIFS statistics. -Sysstat also contains tools you can schedule via cron or systemd to collect and -historize performance and activity data: -sar: collects, reports and saves system activity information (see below a list -of metrics collected by sar). -sadc: is the system activity data collector, used as a backend for sar. -sa1: collects and stores binary data in the system activity daily data file. - It is a front end to sadc designed to be run from cron or systemd. -sa2: writes a summarized daily activity report. It is a front end to sar -designed to be run from cron or systemd. -sadf: displays data collected by sar in multiple formats (CSV, XML, JSON, etc.) - and can be used for data exchange with other programs. This command can also -be used to draw graphs for the various activities collected by sar using SVG ( -Scalable Vector Graphics) format. +The sysstat package contains the sar, sadf, mpstat, iostat, tapestat, +pidstat, cifsiostat and sa tools for Linux. +The sar command collects and reports system activity information. +The information collected by sar can be saved in a file in a binary +format for future inspection. The statistics reported by sar concern +I/O transfer rates, paging activity, process-related activities, +interrupts, network activity, memory and swap space utilization, CPU +utilization, kernel activities and TTY statistics, among others. Both +UP and SMP machines are fully supported. +The sadf command may be used to display data collected by sar in +various formats (CSV, PCP, XML, etc.). +The iostat command reports CPU utilization and I/O statistics for disks. +The tapestat command reports statistics for tapes connected to the system. +The mpstat command reports global and per-processor statistics. +The pidstat command reports statistics for Linux tasks (processes). +The cifsiostat command reports I/O statistics for CIFS file systems. %prep -%autosetup -n %{name}-%{version} -p1 +%autosetup -S git_am %build -export sadc_options="-S DISK" -export history="28" -export compressafter="31" +%set_build_flags %configure \ - --docdir=%{_pkgdocdir} \ --enable-install-cron \ --enable-copy-only \ --disable-file-attr \ - --disable-stripping -%make_build + --disable-stripping \ + --docdir='%{_pkgdocdir}' \ + --with-systemdsystemunitdir='%{_unitdir}' \ + --with-systemdsleepdir='%{_unitdir}-sleep' \ + sadc_options='-S DISK' \ + history=28 \ + compressafter=31 +make %{?_smp_mflags} %install %make_install %find_lang %{name} -%check -./do_test - -%pre +%post +%systemd_post sysstat.service sysstat-collect.timer sysstat-summary.timer %preun %systemd_preun sysstat.service sysstat-collect.timer sysstat-summary.timer -[ "$1" -gt 0 ] || rm -rf %{_localstatedir}/log/sa/* - -%post -%systemd_post sysstat.service sysstat-collect.timer sysstat-summary.timer +if [[ $1 -eq 0 ]]; then + # Remove sa logs if removing sysstat completely + rm -rf %{_localstatedir}/log/sa/* +fi %postun %systemd_postun sysstat.service sysstat-collect.timer sysstat-summary.timer @@ -78,11 +74,15 @@ export compressafter="31" %config(noreplace) %{_sysconfdir}/sysconfig/sysstat.ioconf %{_bindir}/* %{_libdir}/sa -%{_unitdir}/../* -%{_localstatedir}/log/sa +%{_unitdir}/sysstat* +%{_systemd_util_dir}/system-sleep/sysstat* %{_mandir}/man*/* +%{_localstatedir}/log/sa %changelog +* Mon Nov 14 2022 hkgy - 12.7.1-1 +- Upgrade to v12.7.1 + * Mon Jun 13 2022 wuchaochao - 12.5.4-3 - add check diff --git a/v12.7.1.tar.gz b/v12.7.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..15521dcb8cfa79d13853fed9f4ea4455808dae8b Binary files /dev/null and b/v12.7.1.tar.gz differ