/* 
* Copyright (c) 2001 by Sun Microsystems, Inc.
# All rights reserved.
#
*/ 

TEST NAME 

      fs_stress - UNIX file system stress utility 

SYNOPSIS 

      fs_stress [options] 

DESCRIPTION 

      fs_stress performs stress tests against a user-configurable range of file
      system types and devices, or, in the default case, against all available
      file systems and all devices. The default case reads the mount table and
      selects all file systems currently mounted that meet the criteria.

      All I/O is sequential, although the -r option can be used to specify the
      use of random file and transfer sizes. Any selected file system (or
      device) will be skipped if it is marked read-only, if fs_stress has
      insufficient access privileges, or if the size is less than the maximum
      file size required by fs_stress.

      You can optionally specify that raw disk I/O is to be performed instead
      of file I/O.

      During a test run, fs_stress: 

           * Steps through each selected file system 
           * Makes a test directory 
           * Increments through file sizes 
           * Performs write operations 
           * Performs read operations 
           * Performs write operations with record locking 
           * Performs read operations with record locking 
           * Performs aiowrite operations 
           * Performs aioread operations 

OPTIONS 

       -F fstype      Use only these file system types; default is all.

       -d device      Use only these devices; default is all.

       -r             Use random file size and transfer sizes; default is to
                      step between the minimum and maximum file size in
                      fixed steps.

       -n num_tests   Number of tests per file system to run; default is 2.

       -f min:max     Minimum and maximum file sizes to step through;
                      default is 1m:4m.

       -t min:max     Minimum and maximum transfer sizes to use; default
                      is 1k:64k.

      Valid suffixes for min:max values used above: 

      b   Bytes

      k   Kilobytes

      m   Megabytes

      g   Gigabytes

      Min:max file transfer increments start at 1 Kbyte and double each time
      until either the default maximum of 64 Kbytes or the user-specifed
      maximum is reached.

      Options that restrict or modify the type of I/O tests: 

      -R   Use regular I/O only.

      -L   Use record lock only.

      -A   Perform async I/O only.

      -m   Memory map the file under test.

      -D   Use raw disk I/O instead of file I/O.

      Options ordinarily used in benchmarking: 

      -s   Silent mode (do not display transfers).

      -N   No byte comparisons.

      -1   Select only one partition per file system.


OUTPUT 

      The test sends output to stdout describing the test command executed.

      The test exits and documents the failure to stdout if there are any
      critical failures.

DURATION 

      About 2 hours 

POSSIBLE CONCURRENT TESTS 

      This test can be run with cd3, dd, CON5, and tape. 

EXAMPLES 

      Example 1: 

      This example runs a basic set of tests on all file systems that are
      mounted, subject to the constraints noted above.

      fs_stress

      Example 2: 

      This example runs only on UFS file systems, performs 20 tests per file
      system instead of the default of 2, and uses a broader range of file
      sizes and transfer sizes.

      fs_stress -F ufs -r -n 20 -f 128k:16m -t 1k:256k
