You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.4 KiB
73 lines
2.4 KiB
USAGE
|
|
|
|
See the program's usage statement by invoking with --help.
|
|
|
|
NOTES
|
|
|
|
This program works really well for me, but it might not have some of the
|
|
features that you want. If you would like, please extend the code and send
|
|
me the patch[1]. Enjoy the program :-)
|
|
|
|
Please use the context diff format. That is: save the original program
|
|
as stress.c.orig, then make and test your desired changes to stress.c, then
|
|
run 'diff -u stress.c.orig stress.c' to produce a context patch. Thanks.
|
|
|
|
Amos Waterland <apw@rossby.metr.ou.edu>
|
|
Norman, Oklahoma
|
|
27 Nov 2001
|
|
|
|
EXAMPLES
|
|
[examples]
|
|
|
|
The simple case is that you just want to bring the system load average up to
|
|
an arbitrary value. The following forks 13 processes, each of which spins
|
|
in a tight loop calculating the sqrt() of a random number acquired with
|
|
rand().
|
|
|
|
% stress -c 13
|
|
|
|
Long options are supported, as well as is making the output less verbose.
|
|
The following forks 1024 processes, and only reports error messages if any.
|
|
|
|
% stress --quiet --hogcpu 1k
|
|
|
|
To see how your system performs when it is I/O bound, use the -i switch.
|
|
The following forks 4 processes, each of which spins in a tight loop calling
|
|
sync(), which is a system call that flushes memory buffers to disk.
|
|
|
|
% stress -i 4
|
|
|
|
Multiple hogs may be combined on the same command line. The following does
|
|
everything the preceding examples did in one command, but also turns up the
|
|
verbosity level as well as showing how to cause the command to
|
|
self-terminate after 1 minute.
|
|
|
|
% stress -c 13 -i 4 --verbose --timeout 1m
|
|
|
|
An value of 0 normally denotes infinity. The following is how to do a fork
|
|
bomb (be careful with this).
|
|
|
|
% stress -c 0
|
|
|
|
For the -m and -d options, a value of 0 means to redo their operation an
|
|
infinite number of times. To allocate and free 128MB in a redo loop use the
|
|
following command. This can be useful for "bouncing" against the system RAM
|
|
ceiling.
|
|
|
|
% stress -m 0 --hogvm-bytes 128M
|
|
|
|
For the -m and -d options, a negative value of n means to redo the operation
|
|
abs(n) times. Here is now to allocate and free 5MB three times in a row.
|
|
|
|
% stress -m -3 --hogvm-bytes 5m
|
|
|
|
You can write a file of arbitrary length to disk. The file is created with
|
|
mkstemp() in the current directory, the default is to unlink it, but
|
|
unlinking can be overridden with the --hoghdd-noclean flag.
|
|
|
|
% stress -d 1 --hoghdd-noclean --hoghdd-bytes 13
|
|
|
|
Large file support is enabled.
|
|
|
|
% stress -d 1 --hoghdd-noclean --hoghdd-bytes 3G
|