• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

.gitignoreD23-Nov-202315 32

MakefileD23-Nov-20231 KiB325

READMED23-Nov-20232.4 KiB7348

genload.cD23-Nov-202321.5 KiB894717

stress.cD23-Nov-202321.5 KiB894717

README

1USAGE
2
3See the program's usage statement by invoking with --help.
4
5NOTES
6
7This program works really well for me, but it might not have some of the
8features that you want.  If you would like, please extend the code and send
9me the patch[1].  Enjoy the program :-)
10
11Please use the context diff format.  That is: save the original program
12as stress.c.orig, then make and test your desired changes to stress.c, then
13run 'diff -u stress.c.orig stress.c' to produce a context patch.  Thanks.
14
15Amos Waterland <apw@rossby.metr.ou.edu>
16Norman, Oklahoma
1727 Nov 2001
18
19EXAMPLES
20[examples]
21
22The simple case is that you just want to bring the system load average up to
23an arbitrary value.  The following forks 13 processes, each of which spins
24in a tight loop calculating the sqrt() of a random number acquired with
25rand().
26
27  % stress -c 13
28
29Long options are supported, as well as is making the output less verbose.
30The following forks 1024 processes, and only reports error messages if any.
31
32  % stress --quiet --hogcpu 1k
33
34To see how your system performs when it is I/O bound, use the -i switch.
35The following forks 4 processes, each of which spins in a tight loop calling
36sync(), which is a system call that flushes memory buffers to disk.
37
38  % stress -i 4
39
40Multiple hogs may be combined on the same command line.  The following does
41everything the preceding examples did in one command, but also turns up the
42verbosity level as well as showing how to cause the command to
43self-terminate after 1 minute.
44
45  % stress -c 13 -i 4 --verbose --timeout 1m
46
47An value of 0 normally denotes infinity.  The following is how to do a fork
48bomb (be careful with this).
49
50  % stress -c 0
51
52For the -m and -d options, a value of 0 means to redo their operation an
53infinite number of times.  To allocate and free 128MB in a redo loop use the
54following command.  This can be useful for "bouncing" against the system RAM
55ceiling.
56
57  % stress -m 0 --hogvm-bytes 128M
58
59For the -m and -d options, a negative value of n means to redo the operation
60abs(n) times.  Here is now to allocate and free 5MB three times in a row.
61
62  % stress -m -3 --hogvm-bytes 5m
63
64You can write a file of arbitrary length to disk.  The file is created with
65mkstemp() in the current directory, the default is to unlink it, but
66unlinking can be overridden with the --hoghdd-noclean flag.
67
68  % stress -d 1 --hoghdd-noclean --hoghdd-bytes 13
69
70Large file support is enabled.
71
72  % stress -d 1 --hoghdd-noclean --hoghdd-bytes 3G
73