summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorDave Woodfall <dave@tty1.uk>2018-12-08 00:06:10 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-12-08 00:06:10 +0700
commitcd3ca39d79f81cea375e9cf0daea9917e5496455 (patch)
tree07833b8ed89828f780da89ffefccb2dde87193e8 /system
parent34d7a2720a4a252a572c6cfbc76568683bd42003 (diff)
downloadslackbuilds-cd3ca39d79f81cea375e9cf0daea9917e5496455.tar.gz
system/stress-ng: Added (Stress Testing Tool).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/stress-ng/README43
-rw-r--r--system/stress-ng/slack-desc19
-rw-r--r--system/stress-ng/stress-ng.SlackBuild91
-rw-r--r--system/stress-ng/stress-ng.info10
4 files changed, 163 insertions, 0 deletions
diff --git a/system/stress-ng/README b/system/stress-ng/README
new file mode 100644
index 0000000000..609ec11806
--- /dev/null
+++ b/system/stress-ng/README
@@ -0,0 +1,43 @@
+stress-ng will stress test a computer system in various
+selectable ways. It was designed to exercise various
+physical subsystems of a computer as well as the various
+operating system kernel interfaces. Stress-ng features:
+
+* Over 200 stress tests
+* 70 CPU specific stress tests that exercise floating point,
+ integer, bit manipulation and control flow
+* Over 20 virtual memory stress tests
+
+stress-ng was originally intended to make a machine work
+hard and trip hardware issues such as thermal overruns as
+well as operating system bugs that only occur when a system
+is being thrashed hard. Use stress-ng with caution as some
+of the tests can make a system run hot on poorly designed
+hardware and also can cause excessive system thrashing which
+may be difficult to stop.
+
+stress-ng can also measure test throughput rates; this can
+be useful to observe performance changes across different
+operating system releases or types of hardware. However, it
+has never been intended to be used as a precise benchmark
+test suite, so do NOT use it in this manner.
+
+Running stress-ng with root privileges will adjust out of
+memory settings on Linux systems to make the stressors
+unkillable in low memory situations, so use this
+judiciously. With the apropriate privilege, stress-ng can
+allow the ionice class and ionice levels to be adjusted,
+again, this should be used with care.
+
+One can specify the number of processes to invoke per type
+of stress test; specifying a negative or zero value will
+select the number of online processors as defined by
+sysconf(_SC_NPROCESSORS_ONLN).
+
+NOTE ON VM TESTS
+
+Since the memory being exercised is virtually mapped then
+there is no guarantee of touching page addresses in any
+particular physical order. These workers should not be
+used to test that all the system's memory is working cor‐
+rectly either, use tools such as memtest86 instead.
diff --git a/system/stress-ng/slack-desc b/system/stress-ng/slack-desc
new file mode 100644
index 0000000000..5203fd62f9
--- /dev/null
+++ b/system/stress-ng/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------------------------------------------------------|
+stress-ng: stress-ng (a tool to load and stress a computer system)
+stress-ng:
+stress-ng: stress-ng will stress test a computer system in various selectable
+stress-ng: ways. It was designed to exercise various physical subsystems of a
+stress-ng: computer as well as the various operating system kernel interfaces.
+stress-ng:
+stress-ng: http://kernel.ubuntu.com/~cking/stress-ng
+stress-ng:
+stress-ng:
+stress-ng:
+stress-ng:
diff --git a/system/stress-ng/stress-ng.SlackBuild b/system/stress-ng/stress-ng.SlackBuild
new file mode 100644
index 0000000000..4ecf19207b
--- /dev/null
+++ b/system/stress-ng/stress-ng.SlackBuild
@@ -0,0 +1,91 @@
+#!/bin/sh
+
+# Slackware build script for stress-ng
+# Copyright 2018 David Woodfall <dave@dawoodfall.net>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=stress-ng
+VERSION=${VERSION:-0.09.48}
+BUILD=${BUILD:-1}
+TAG=${TAG:-daw}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/daw}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+make
+make install DESTDIR=$PKG
+
+mv $PKG/usr/share/man $PKG/usr
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING README.Android README TODO *.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/stress-ng/stress-ng.info b/system/stress-ng/stress-ng.info
new file mode 100644
index 0000000000..65cf8489c2
--- /dev/null
+++ b/system/stress-ng/stress-ng.info
@@ -0,0 +1,10 @@
+PRGNAM="stress-ng"
+VERSION="0.09.48"
+HOMEPAGE="http://kernel.ubuntu.com/~cking/stress-ng"
+DOWNLOAD="http://kernel.ubuntu.com/~cking/tarballs/stress-ng/stress-ng-0.09.48.tar.xz"
+MD5SUM="2a4b2c3ec8c740d90e7bcb51e2cc089d"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Dave Woodfall"
+EMAIL="dave@tty1.uk"