# If you want to uninstall sysstat or just clean up files from an old
# version, skip down to the bottom.
# Prerequisites:
# gettext (optional; I don't build it in below)
cd
test -f installed/sysstat-9.0.6.1.tar.bz2 &&
mv installed/sysstat-9.0.6.1.tar.bz2 .
test ! -f sysstat-9.0.6.1.tar.bz2 &&
wget http://perso.orange.fr/sebastien.godard/sysstat-9.0.6.1.tar.bz2
# Verify tarball w/ sha1sum:
# (this sha1sum is from me, not the developers, I couldn't find one)
echo "1d2c47d1c236e9d33519015bc12b0bf816300ae3 sysstat-9.0.6.1.tar.bz2" | \
sha1sum -c
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "sysstat-*" -exec rm -r {} \;
tar xjvf ~/sysstat-9.0.6.1.tar.bz2
cd sysstat-9.0.6.1
test $UID = 0 && chown -R root:root .
# Older versions used a 'config', now a typical autoconf 'configure'.
# An alternative to configure, you can also run 'iconfig' for interactive
# yes/no questions.
#
# If you're upgrading and don't want it to clear out your /var/log/sa
# directory because of possible file format changes (check CHANGES), leave
# off --enable-clean-sa-dir
#
# Add --enable-install-cron if you want it to automatically modify a
# crontab to run sar, use the 'cron_owner' environment variable to specify
# the user's crontab to use (usually root or adm).
#
# If you have Tcl/Tk and gnuplot and want to try isag (see
# contrib/isag/README-isag), pass --enable-install-isag to configure
./configure --sysconfdir=/etc --prefix=/usr \
--docdir=/usr/doc/sysstat-9.0.6.1 \
--enable-clean-sa-dir --disable-nls
make
# Become root to install it
su
# Remove the old Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg sysstat
# Install the new version
make install
# If you want to set up the system data activity collector (sadc) to run
# on boot-up:
#
# If you have a modern version of Slackware that supports SystemV style
# init scripts:
test -x /etc/rc.d/rc.sysvinit &&
( ( cd /etc/rc.d
mkdir -p init.d rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d )
install -m 755 sysstat /etc/rc.d/init.d/
cd /etc/rc.d/rc1.d && ln -sf ../init.d/sysstat S01sysstat
cd /etc/rc.d/rc2.d && ln -sf ../init.d/sysstat S01sysstat
cd /etc/rc.d/rc3.d && ln -sf ../init.d/sysstat S01sysstat
cd /etc/rc.d/rc4.d && ln -sf ../init.d/sysstat S01sysstat
cd /etc/rc.d/rc5.d && ln -sf ../init.d/sysstat S01sysstat
cd /etc/rc.d/rc0.d && ln -sf ../init.d/sysstat K99sysstat
cd /etc/rc.d/rc6.d && ln -sf ../init.d/sysstat K99sysstat )
#
## and if not, or if you'd just rather set it up the 'normal' way, run this:
# install -m 755 sysstat /etc/rc.d/rc.sysstat
## and add something like this to /etc/rc.d/rc.local:
# if [ -x /etc/rc.d/rc.sysstat ]; then
# /etc/rc.d/rc.sysstat start
# fi
# Now if you run the startup script with 'start', that will note that the
# system was restarted. If you then run 'sar' you should see "LINUX
# RESTART".
# If you did not pass --enable-install-cron to configure (I don't), there's
# a sample crontab named crontab in the source directory. Either add the
# appropriate entries to root's crontab, or if you want to run it as another
# user, create/update the crontab for that user and make /var/log/sa
# writable by that user.
#
# ...or, if you have a /etc/cron.d you can do this:
# cp sysstat.crond /etc/cron.d/sysstat
#
# ...or, if you have /etc/cron.daily and /etc/cron.hourly (Slackware does)
# you can do this:
install -o root -g root -m 700 sysstat.cron.hourly /etc/cron.hourly/sysstat
install -o root -g root -m 700 sysstat.cron.daily /etc/cron.daily/sysstat
# For more information about using sysstat, read README and FAQ if you
# haven't already, and the following man pages:
# iostat, mpstat, pidstat, sa1, sa2, sadc, sadf, sar (and isag if installed)