Home | History | Annotate | only in /external/ltp/tools/genload
Up to higher level directory
NameDateSize
genload.c22-Oct-202021.5K
Makefile22-Oct-20201K
README22-Oct-20202.4K
stress.c22-Oct-202021.5K

README

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