Sisyphus repository
Last update: 23 september 2022 | SRPMs: 17652 | Visits: 25026145
en ru br
ALT Linux repos
5.0: 8.1.6-alt1
4.1: 8.1.2-alt1
4.0: 7.1.4-alt1
3.0: 6.0.0-alt1

Group :: Monitoring
RPM: sysstat

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define _unpackaged_files_terminate_build 1
Name: sysstat
Version: 12.5.1
Release: alt2

Summary: The sar and iostat system monitoring commands
License: GPLv2+
Group: System/Base

Source: %name-%version.tar
Source1: sysstat.init


Patch1: %name-%version-alt-32bit-fix.patch

# Automatically added by buildreq on Wed Aug 04 2010

BuildRequires: libsensors3-devel

This package provides the sar and iostat commands for the Linux operating
system, similar to their traditional UNIX counterparts. They enable system
monitoring of disk, network, and other IO activity.

%package isag
Summary: Interactive System Activity Graph
License: GPLv2+
Group: System/Base
Requires: gnuplot, sysstat = %version

BuildArch: noarch

%description isag
isag is a command that enables you to plot data stored in a daily data file
by a previous sar run.

%patch1 -p1

export CFLAGS="%optflags"
export sa_lib_dir=%_libdir/sa
# we build script for daily summary that takes yesterday's data and will
# run it by cron after midnight
%configure \
--enable-yesterday \
--enable-sensors \
--disable-file-attr \

sed -i 's/SADC_OPTIONS=""/SADC_OPTIONS="-S DISK"/' sysstat.sysconfig

%make_build SA_LIB_DIR="%_libdir/sa" LFLAGS="-lsensors"

%makeinstall_std IGNORE_MAN_GROUP=y

install -p -m644 -D sysstat.ioconf %buildroot%_sysconfdir/sysconfig/
install -p -m644 -D sysstat.sysconfig %buildroot/etc/sysconfig/sysstat
install ./contrib/isag/isag %buildroot%_bindir
install ./contrib/isag/isag.1  %buildroot%_man1dir

install -d %buildroot%_sysconfdir/cron.d/
# Create cronjob file inline. We can easily use here rpm macros for libdir and
# thus allows for multiarch build.
cat > %buildroot%_sysconfdir/cron.d/%name <<EOF
# run system activity accounting tool every 10 minutes
*/10 * * * * root %_libdir/sa/sa1 -S DISK 1 1
# generate a daily summary of process accounting
0 2 * * * root %_libdir/sa/sa2 -A

install -pD -m755 %_sourcedir/sysstat.init %buildroot%_initrddir/sysstat
subst 's at LIBDIR at %_libdir at ' %buildroot%_initrddir/sysstat

# Install service file

mkdir -p %buildroot%_unitdir
install -m 0644 sysstat.service %buildroot%_unitdir/

# Install timer units

install -m 0644 cron/sysstat-{collect,summary}.{service,timer} %buildroot%_unitdir/

# sysstat makefiles install the docs, blow them away

rm -rf %buildroot/usr/doc

%find_lang %name

%post_service sysstat

%preun_service sysstat
if [[ $1 -eq 0 ]]; then
 # Remove sa logs if removing sysstat completely
 rm -f %_logdir/sa/*

%files -f %name.lang
%config(noreplace) %attr(644,root,root) %_sysconfdir/cron.d/%name
%config(noreplace) %_sysconfdir/sysconfig/%name
%config %_sysconfdir/sysconfig/sysstat.ioconf
%exclude %_bindir/isag
%exclude %_man1dir/isag.*
%attr(750,root,adm) %_logdir/sa

%files isag


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin