Imported Upstream version 1.0.4

parent af19a8db
This diff is collapsed.
2010-03-19 Amos Waterland <apw@rossby.metr.ou.edu>
* configure.in, doc/version.texi: Up to version 1.0.4.
* src/stress.c: Fix unlink error reported by Farkas Levente.
2010-03-17 Amos Waterland <apw@rossby.metr.ou.edu>
* src/stress.c: Make the error message on unlink fail more clear.
2010-02-18 Amos Waterland <apw@rossby.metr.ou.edu>
* NEWS, doc/version.texi: Fix NEWS.
* configure.in, src/stress.c: Up to version 1.0.3. Remove no-clean
option.
2009-12-03 Amos Waterland <apw@rossby.metr.ou.edu>
* NEWS, configure.in, doc/version.texi: Up to version 1.0.2.
* src/Makefile.am: Remove Wall and Werror flags so we can build
on AIX with xlc.
* src/stress.c: Apply patch from Wilken Gottwalt to make tee
behave properly.
2009-08-12 Amos Waterland <apw@rossby.metr.ou.edu>
* NEWS: Update the NEWS file.
* etc/deb/Makefile, etc/deb/debian/changelog, etc/deb/debian/control,
etc/deb/debian/rules: More changes for packaging.
* etc/deb/Makefile, etc/deb/debian/changelog, etc/deb/debian/control,
etc/deb/debian/rules: Changes for the purpose of packagin.
* doc/version.texi: Increase version.
* NEWS, configure.in: Up to version 1.0.1
......
......@@ -103,7 +103,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
......
`stress' NEWS -- history of user-visible changes.
Copyright (C) 2001-2008 Amos Waterland.
Copyright (C) 2001-2010 Amos Waterland.
See the end for copying conditions.
Please send `stress' bug reports, questions, and suggestions to
<apw@rossby.metr.ou.edu>.
2010-02-17 Version 1.0.3
* Fix manpage problem reported by Mark Lumsden. Remove --no-clean
option.
2009-12-02 Version 1.0.2
* Fix AIX compile. Apply patch from Wilken Gottwalt to make tee
behave properly.
2009-08-11 Version 1.0.1
* Minor automake cleanups.
* Minor automake cleanups. Apply patch from Dileepa Prabhakar to
randomize slow writing.
2007-12-16 Version 1.0.0
......@@ -90,7 +101,7 @@ Please send `stress' bug reports, questions, and suggestions to
----------------------------------------------------------------------
Copyright information:
Copyright (C) 2001-2008 Amos Waterland
Copyright (C) 2001-2010 Amos Waterland
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
......
......@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
[m4_warning([this file was generated for autoconf 2.64.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
[m4_warning([this file was generated for autoconf 2.63.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
......@@ -310,59 +310,61 @@ _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#serial 4
#serial 5
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[# Autoconf 2.62 quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
*\'*) eval set x "$CONFIG_FILES" ;;
*) set x $CONFIG_FILES ;;
esac
shift
for mf
do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
[{
# Autoconf 2.62 quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
*\'*) eval set x "$CONFIG_FILES" ;;
*) set x $CONFIG_FILES ;;
esac
shift
for mf
do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
done
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
......
This diff is collapsed.
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/stress.c)
AM_INIT_AUTOMAKE(stress, 1.0.1)
AM_INIT_AUTOMAKE(stress, 1.0.4)
dnl Checks for programs.
AC_PROG_CC
......
......@@ -101,7 +101,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
......
@set UPDATED 9 March 2005
@set UPDATED-MONTH March 2005
@set EDITION 1.0.1
@set VERSION 1.0.1
@set EDITION 1.0.4
@set VERSION 1.0.4
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
.TH STRESS "1" "August 2009" "stress 1.0.1" "User Commands"
.TH STRESS "1" "March 2010" "stress 1.0.4" "User Commands"
.SH NAME
stress \- tool to impose load on and stress test systems
.SH SYNOPSIS
......@@ -45,7 +45,7 @@ malloc B bytes per vm worker (default is 256MB)
touch a byte every B bytes (default is 4096)
.TP
\fB\-\-vm\-hang\fR N
sleep N secs before free (default is none, 0 is inf)
sleep N secs before free (default none, 0 is inf)
.TP
\fB\-\-vm\-keep\fR
redirty memory instead of freeing and reallocating
......@@ -55,9 +55,6 @@ spawn N workers spinning on write()/unlink()
.TP
\fB\-\-hdd\-bytes\fR B
write B bytes per hdd worker (default is 1GB)
.TP
\fB\-\-hdd\-noclean\fR
do not unlink files created by hdd workers
.PP
Example: stress \fB\-\-cpu\fR 8 \fB\-\-io\fR 4 \fB\-\-vm\fR 2 \fB\-\-vm\-bytes\fR 128M \fB\-\-timeout\fR 10s
.PP
......
<html lang="en">
<head>
<title>Stress 1.0.1</title>
<title>Stress 1.0.4</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Stress 1.0.1">
<meta name="generator" content="makeinfo 4.13">
<meta name="description" content="Stress 1.0.4">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
......@@ -20,7 +20,7 @@
--></style>
</head>
<body>
<h1 class="settitle">Stress 1.0.1</h1>
<h1 class="settitle">Stress 1.0.4</h1>
<div class="contents">
<h2>Table of Contents</h2>
<ul>
......@@ -36,8 +36,8 @@
<div class="node">
<a name="Top"></a>
<p><hr>
<a name="Top"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="#Overview">Overview</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
......@@ -54,8 +54,8 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
</ul>
<div class="node">
<a name="Overview"></a>
<p><hr>
<a name="Overview"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="#Invoking-stress">Invoking stress</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
......@@ -71,8 +71,8 @@ activities, a kernel or libc programmer wishes to evaluate denial of service
possibilities, etc.
<div class="node">
<a name="Invoking-stress"></a>
<p><hr>
<a name="Invoking-stress"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="#Examples">Examples</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Overview">Overview</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
......@@ -130,8 +130,8 @@ RAM and holds it until killed.
<p>Note: Suffixes may be s,m,h,d,y (time) or k,m,g (size).
<div class="node">
<a name="Examples"></a>
<p><hr>
<a name="Examples"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="#Copying-This-Manual">Copying This Manual</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Invoking-stress">Invoking stress</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
......@@ -176,8 +176,8 @@ unlinking can be overridden with the &ndash;hdd-noclean flag.
<p>% &lsquo;<samp><span class="samp">stress -d 1 --hdd-noclean --hdd-bytes 3G</span></samp>&rsquo;
<div class="node">
<a name="Copying-This-Manual"></a>
<p><hr>
<a name="Copying-This-Manual"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="#Index">Index</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Examples">Examples</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
......@@ -189,8 +189,8 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<p>You may copy this manual under the terms of the GNU General Public License.
<div class="node">
<a name="Index"></a>
<p><hr>
<a name="Index"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Copying-This-Manual">Copying This Manual</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
......
No preview for this file type
@set UPDATED 9 March 2005
@set UPDATED-MONTH March 2005
@set EDITION 1.0.1
@set VERSION 1.0.1
@set EDITION 1.0.4
@set VERSION 1.0.4
MAINTAINERCLEANFILES = Makefile.in
AM_CFLAGS = -Wall -Werror -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
bin_PROGRAMS = stress
stress_SOURCES = stress.c
......
......@@ -94,7 +94,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
......@@ -144,7 +143,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
MAINTAINERCLEANFILES = Makefile.in
AM_CFLAGS = -Wall -Werror -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
stress_SOURCES = stress.c
stress_MANS = stress.1
all: all-am
......
/* A program to put stress on a POSIX system (stress).
*
* Copyright (C) 2001,2002,2003,2004,2005,2006,2007
* Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010
* Amos Waterland <apw@rossby.metr.ou.edu>
*
* This program is free software; you can redistribute it and/or modify it
......@@ -37,18 +37,22 @@ static int global_debug = 2;
static char *global_progname = PACKAGE;
/* Implemention of runtime-selectable severity message printing. */
#define dbg if (global_debug >= 3) \
fprintf (stdout, "%s: dbug: [%lli] ", \
global_progname, (long long)getpid()), fprintf
#define out if (global_debug >= 2) \
fprintf (stdout, "%s: info: [%lli] ", \
global_progname, (long long)getpid()), fprintf
#define wrn if (global_debug >= 1) \
fprintf (stderr, "%s: WARN: [%lli] (%d) ", \
global_progname, (long long)getpid(), __LINE__), fprintf
#define err if (global_debug >= 0) \
fprintf (stderr, "%s: FAIL: [%lli] (%d) ", \
global_progname, (long long)getpid(), __LINE__), fprintf
#define dbg(OUT, STR, ARGS...) if (global_debug >= 3) \
fprintf (stdout, "%s: dbug: [%lli] ", \
global_progname, (long long)getpid()), \
fprintf(OUT, STR, ##ARGS), fflush(OUT)
#define out(OUT, STR, ARGS...) if (global_debug >= 2) \
fprintf (stdout, "%s: info: [%lli] ", \
global_progname, (long long)getpid()), \
fprintf(OUT, STR, ##ARGS), fflush(OUT)
#define wrn(OUT, STR, ARGS...) if (global_debug >= 1) \
fprintf (stderr, "%s: WARN: [%lli] (%d) ", \
global_progname, (long long)getpid(), __LINE__), \
fprintf(OUT, STR, ##ARGS), fflush(OUT)
#define err(OUT, STR, ARGS...) if (global_debug >= 0) \
fprintf (stderr, "%s: FAIL: [%lli] (%d) ", \
global_progname, (long long)getpid(), __LINE__), \
fprintf(OUT, STR, ##ARGS), fflush(OUT)
/* Implementation of check for option argument correctness. */
#define assert_arg(A) \
......@@ -69,7 +73,7 @@ long long atoll_b (const char *nptr);
int hogcpu (void);
int hogio (void);
int hogvm (long long bytes, long long stride, long long hang, int keep);
int hoghdd (long long bytes, int clean);
int hoghdd (long long bytes);
int
main (int argc, char **argv)
......@@ -89,7 +93,6 @@ main (int argc, char **argv)
long long do_vm_hang = -1;
int do_vm_keep = 0;
long long do_hdd = 0;
int do_hdd_clean = 2;
long long do_hdd_bytes = 1024 * 1024 * 1024;
/* Record our start time. */
......@@ -226,10 +229,6 @@ main (int argc, char **argv)
exit (1);
}
}
else if (strcmp (arg, "--hdd-noclean") == 0)
{
do_hdd_clean = 0;
}
else if (strcmp (arg, "--hdd-bytes") == 0)
{
assert_arg ("--hdd-bytes");
......@@ -362,7 +361,7 @@ main (int argc, char **argv)
usleep (backoff);
if (do_dryrun)
exit (0);
exit (hoghdd (do_hdd_bytes, do_hdd_clean));
exit (hoghdd (do_hdd_bytes));
case -1: /* error */
err (stderr, "fork failed: %s\n", strerror (errno));
break;
......@@ -516,14 +515,14 @@ hogvm (long long bytes, long long stride, long long hang, int keep)
}
for (i = 0; i < bytes; i += stride)
{
c = ptr[i];
if (c != 'Z')
{
c = ptr[i];
if (c != 'Z')
{
err (stderr, "memory corruption at: %p\n", ptr + i);
return 1;
}
}
}
if (do_malloc)
{
......@@ -536,7 +535,7 @@ hogvm (long long bytes, long long stride, long long hang, int keep)
}
int
hoghdd (long long bytes, int clean)
hoghdd (long long bytes)
{
long long i, j;
int fd;
......@@ -566,14 +565,12 @@ hoghdd (long long bytes, int clean)
}
dbg (stdout, "opened %s for writing %lli bytes\n", name, bytes);
if (clean == 2)
dbg (stdout, "unlinking %s\n", name);
if (unlink (name) == -1)
{
dbg (stdout, "unlinking %s\n", name);
if (unlink (name) == -1)
{
err (stderr, "unlink failed: %s\n", strerror (errno));
return 1;
}
err (stderr, "unlink of %s failed: %s\n", name, strerror (errno));
return 1;
}
dbg (stdout, "fast writing to %s\n", name);
......@@ -604,15 +601,6 @@ hoghdd (long long bytes, int clean)
dbg (stdout, "closing %s after %lli bytes\n", name, j);
close (fd);
if (clean == 1)
{
if (unlink (name))
{
err (stderr, "unlink failed: %s\n", strerror (errno));
return 1;
}
}
}
return 0;
......@@ -761,11 +749,10 @@ usage (int status)
" -m, --vm N spawn N workers spinning on malloc()/free()\n"
" --vm-bytes B malloc B bytes per vm worker (default is 256MB)\n"
" --vm-stride B touch a byte every B bytes (default is 4096)\n"
" --vm-hang N sleep N secs before free (default is none, 0 is inf)\n"
" --vm-hang N sleep N secs before free (default none, 0 is inf)\n"
" --vm-keep redirty memory instead of freeing and reallocating\n"
" -d, --hdd N spawn N workers spinning on write()/unlink()\n"
" --hdd-bytes B write B bytes per hdd worker (default is 1GB)\n"
" --hdd-noclean do not unlink files created by hdd workers\n\n"
" --hdd-bytes B write B bytes per hdd worker (default is 1GB)\n\n"
"Example: %s --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 10s\n\n"
"Note: Numbers may be suffixed with s,m,h,d,y (time) or B,K,M,G (size).\n";
......
......@@ -77,7 +77,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment