Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37392285
en ru br
ALT Linux repos
S:12.7.4-alt1
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 :: System/Base
RPM: sysstat

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: sysstat
Version: 8.1.6
Release: alt1

Packager: Victor Forsyuk <force at altlinux.org>

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

URL: http://pagesperso-orange.fr/sebastien.godard
Source: %url/sysstat-%version.tar.bz2
Source1: sysstat.init

%description
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

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

%prep
%setup

%build
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 --prefix=/usr \
--enable-yesterday \
--mandir=%_mandir \
--disable-compress-manpg \
--enable-install-isag

%make_build SA_LIB_DIR="%_libdir/sa"

%install
%make_install DESTDIR=%buildroot install IGNORE_MAN_GROUP=y

install -p -m644 -D sysstat.ioconf %buildroot%_sysconfdir/sysconfig/
install -p -m644 -D sysstat.sysconfig %buildroot/etc/sysconfig/sysstat

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
EOF

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

# sysstat makefiles install the docs, blow them away

rm -rf %buildroot/usr/doc

%find_lang %name

%preun
%preun_service sysstat

if [ "$1" = 0 ]; then
# Remove sa logs if removing %name completely.
rm -f %_logdir/sa/*
fi

%post -p "%post_service sysstat"

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

%files isag
%_bindir/isag
%_man1dir/isag.*

%changelog

Full changelog you can see here

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