diff --git a/colorsysstat.csh b/colorsysstat.csh new file mode 100644 index 0000000000000000000000000000000000000000..725e15a6b0b18492722bc10609fba9f1fdcea85b --- /dev/null +++ b/colorsysstat.csh @@ -0,0 +1,2 @@ +# Color sysstat output +if ( "$?S_COLORS" == 0 ) setenv S_COLORS auto diff --git a/colorsysstat.sh b/colorsysstat.sh new file mode 100644 index 0000000000000000000000000000000000000000..2a4dfc79898ce16233d7fccdf6bd0146b2fb8dd1 --- /dev/null +++ b/colorsysstat.sh @@ -0,0 +1,2 @@ +# Color sysstat output +export S_COLORS=${S_COLORS-auto} diff --git a/sysstat.spec b/sysstat.spec new file mode 100644 index 0000000000000000000000000000000000000000..a63c10135eec7211e8ae757a73e94e4e2ddd7648 --- /dev/null +++ b/sysstat.spec @@ -0,0 +1,90 @@ +%define anolis_release 1 +Summary: Collection of performance monitoring tools for Linux +Name: sysstat +Version: 12.5.5 +Release: %{anolis_release}%{?dist} +License: GPLv2+ +URL: http://sebastien.godard.pagesperso-orange.fr/ +Source: https://github.com/sysstat/sysstat/archive/v%{version}.tar.xz + +# Use colors in sysstat output +Source1: colorsysstat.csh +Source2: colorsysstat.sh + +BuildRequires: make +BuildRequires: gcc, gettext, lm_sensors-devel, pcp-libs-devel, systemd, git + +Requires: findutils, xz + +%{?systemd_requires} + +%description +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 -S git_am + +%build +%configure \ + --enable-install-cron \ + --enable-copy-only \ + --disable-file-attr \ + --disable-stripping \ + --docdir=%{_pkgdocdir} \ + sadc_options='-S DISK' \ + history=28 \ + compressafter=31 +make %{?_smp_mflags} + +%install +%make_install +%find_lang %{name} + +# Colored sysstat output +mkdir -p %{buildroot}%{_sysconfdir}/profile.d +install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d +install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d + +%post +%systemd_post sysstat.service sysstat-collect.timer sysstat-summary.timer + +%preun +%systemd_preun 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 + +%files -f %{name}.lang +%doc CHANGES COPYING CREDITS FAQ.md README.md %{name}-%{version}.lsm +%config(noreplace) %{_sysconfdir}/sysconfig/sysstat +%config(noreplace) %{_sysconfdir}/sysconfig/sysstat.ioconf +%config(noreplace) %{_sysconfdir}/profile.d/* +%{_bindir}/* +%{_libdir}/sa +%{_unitdir}/sysstat* +%{_systemd_util_dir}/system-sleep/sysstat* +%{_mandir}/man*/* +%{_localstatedir}/log/sa + +%changelog +* Tue Mar 08 2022 Yuanhong Peng - 12.5.5-1 +- Init from upstream v12.5.5 diff --git a/v12.5.5.tar.xz b/v12.5.5.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..e08264d0235365e12e4e8aded38c80d7e4f513f9 Binary files /dev/null and b/v12.5.5.tar.xz differ