summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/pcp/README9
-rw-r--r--system/pcp/README.SLACKWARE52
-rw-r--r--system/pcp/doinst.sh37
-rw-r--r--system/pcp/pcp.SlackBuild98
-rw-r--r--system/pcp/pcp.info10
-rw-r--r--system/pcp/slack-desc19
6 files changed, 225 insertions, 0 deletions
diff --git a/system/pcp/README b/system/pcp/README
new file mode 100644
index 0000000000..bbb76d97e4
--- /dev/null
+++ b/system/pcp/README
@@ -0,0 +1,9 @@
+Performance Co-Pilot (PCP) provides a framework and services to support
+system-level performance monitoring and management. It presents a unifying
+abstraction for all of the performance data in a system, and many tools for
+interrogating, retrieving and processing that data PCP is a feature-rich,
+mature, extensible, cross-platform toolkit supporting both live and
+retrospective analysis. The distributed PCP architecture makes it especially
+useful for those seeking centralized monitoring of distributed processing.
+
+See README.SLACKWARE for post-install setup information.
diff --git a/system/pcp/README.SLACKWARE b/system/pcp/README.SLACKWARE
new file mode 100644
index 0000000000..03f064c482
--- /dev/null
+++ b/system/pcp/README.SLACKWARE
@@ -0,0 +1,52 @@
+The init scripts are not prefixed with "rc." (e.g. rc.pcp) due to the fact
+that several documentation files and other supporting files used by pcp
+expect them without that prefix, and the process of fixing those files is
+a bit too maintenance-intensive and error-prone to bother.
+
+/etc/rc.d/pcp:
+ starts all the agents and daemons for collecting the info from
+ various host monitoring
+
+/etc/rc.d/pmie:
+ starts all daemons for evaluating the rules based on the exported
+ PCP metrics (usually for triggering particular events)
+
+/etc/rc.d/pmproxy:
+ starts proxy daemon for PCP
+
+You will need to add the following bits to /etc/rc.d/rc.local and make sure
+the relevant init scripts have executable permissions:
+
+ # Start pcp:
+ if [ -x /etc/rc.d/pcp ]; then
+ /etc/rc.d/pcp start
+ fi
+
+ # Start pmie
+ if [ -x /etc/rc.d/pmie ]; then
+ /etc/rc.d/pmie start
+ fi
+
+ # Start pmproxy
+ if [ -x /etc/rc.d/pmproxy ]; then
+ /etc/rc.d/pmproxy start
+ fi
+
+You will also need to add the following to /etc/rc.d/rc.local_shutdown:
+
+ # Stop pcp:
+ if [ -x /etc/rc.d/pcp ]; then
+ /etc/rc.d/pcp stop
+ fi
+
+ # Stop pmie
+ if [ -x /etc/rc.d/pmie ]; then
+ /etc/rc.d/pmie stop
+ fi
+
+ # Stop pmproxy
+ if [ -x /etc/rc.d/pmproxy ]; then
+ /etc/rc.d/pmproxy stop
+ fi
+
+
diff --git a/system/pcp/doinst.sh b/system/pcp/doinst.sh
new file mode 100644
index 0000000000..9eada9da81
--- /dev/null
+++ b/system/pcp/doinst.sh
@@ -0,0 +1,37 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on pcp.new:
+if [ -e etc/rc.d/pcp ]; then
+ cp -a etc/rc.d/pcp etc/rc.d/pcp.new.incoming
+ cat etc/rc.d/pcp.new > etc/rc.d/pcp.new.incoming
+ mv etc/rc.d/pcp.new.incoming etc/rc.d/pcp.new
+fi
+# Keep same perms on pmie.new:
+if [ -e etc/rc.d/pmie ]; then
+ cp -a etc/rc.d/pmie etc/rc.d/pmie.new.incoming
+ cat etc/rc.d/pmie.new > etc/rc.d/pmie.new.incoming
+ mv etc/rc.d/pmie.new.incoming etc/rc.d/pmie.new
+fi
+# Keep same perms on pmproxy.new:
+if [ -e etc/rc.d/pmproxy ]; then
+ cp -a etc/rc.d/pmproxy etc/rc.d/rc.pmproxy.new.incoming
+ cat etc/rc.d/pmproxy.new > etc/rc.d/pmproxy.new.incoming
+ mv etc/rc.d/pmproxy.new.incoming etc/rc.d/pmproxy.new
+fi
+
+config etc/rc.d/pcp.new
+config etc/rc.d/pmie.new
+config etc/rc.d/pmproxy.new
+config etc/pcp.conf.new
+
diff --git a/system/pcp/pcp.SlackBuild b/system/pcp/pcp.SlackBuild
new file mode 100644
index 0000000000..941f80a9d7
--- /dev/null
+++ b/system/pcp/pcp.SlackBuild
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+# Slackware build script for pcp
+
+# Roman Revyakin <rrevyakin@aconex.com>
+# ver 1.1 2009-10-06
+# Much modification by Robby Workman <rworkman@slackbuilds.org>
+
+PRGNAM=pcp
+VERSION=2.9.2
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+SRC_VERSION=${VERSION}-1
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$SRC_VERSION.src.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R a-s,u+w,go+r-w .
+
+autoconf
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --datadir=/usr/share/$PRGNAM \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --includedir=/usr/include/$PRGNAM \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var/lib/pcp \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+
+# This should make the docs and init scripts go to the correct place
+sed -i "s%=/usr/doc%=/usr/doc/$PRGNAM-$VERSION%g" src/include/pcp.conf
+sed -i "s%=/etc/rc.d/init.d%=/etc/rc.d%g" src/include/pcp.conf
+
+make
+make install DIST_ROOT=$PKG
+
+# Don't clobber the config file and init scripts on upgrades
+# We'll leave them without the "rc." naming prefix since lots of docs and
+# other support files depend on them named without it
+mv $PKG/etc/pcp.conf $PKG/etc/pcp.conf.new
+mv $PKG/etc/rc.d/pcp $PKG/etc/rc.d/pcp.new
+mv $PKG/etc/rc.d/pmie $PKG/etc/rc.d/pmie.new
+mv $PKG/etc/rc.d/pmproxy $PKG/etc/rc.d/pmproxy.new
+
+# Install the init scripts non-executable by default
+chmod 0644 $PKG/etc/rc.d/*
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+# Add the build script and postinstall setup doc to the package docs
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/pcp/pcp.info b/system/pcp/pcp.info
new file mode 100644
index 0000000000..cbcbfabc38
--- /dev/null
+++ b/system/pcp/pcp.info
@@ -0,0 +1,10 @@
+PRGNAM="pcp"
+VERSION="2.9.2"
+HOMEPAGE="http://oss.sgi.com/projects/pcp/index.html"
+DOWNLOAD="ftp://oss.sgi.com/www/projects/pcp/download/pcp-2.9.2-1.src.tar.gz"
+MD5SUM="06c9882c7805ec4c61173edb55d06e9a"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Roman Revyakin"
+EMAIL="rrevyakin@aconex.com"
+APPROVED="rworkman"
diff --git a/system/pcp/slack-desc b/system/pcp/slack-desc
new file mode 100644
index 0000000000..06b39de021
--- /dev/null
+++ b/system/pcp/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+pcp: PCP (Performance Co-Pilot)
+pcp:
+pcp: Performance Co-Pilot (PCP) provides a framework and services to
+pcp: support system-level performance monitoring and management.
+pcp: It presents a unifying abstraction for all of the performance data
+pcp: in a system, and many tools for interrogating, retrieving and
+pcp: processing that data.
+pcp: PCP is a feature-rich, mature, extensible, cross-platform toolkit
+pcp: supporting both live and retrospective analysis.
+pcp: The distributed PCP architecture makes it especially useful for those
+pcp: seeking centralized monitoring of distributed processing.