Previous Topic: DNS TestsNext Topic: FTP Tests


File I/O Tests

The File I/O test monitors the amount of time required to perform one of the following operations on an NFS or SMB file system:

File I/O tests are turned off by default. Enable SRM to run File I/O tests by editing the svcrsp.cf file to uncomment the "allow_fileio" line by removing the preceding pound sign (#). For instructions on editing the svcrsp.cf file, refer to Edit the svcrsp.cf File Manually.

You can create File I/O tests and associate them with agents before you modify the svcrsp.cf file to enable them. However, the tests are created in the "Not Ready" state on the agent and cannot be changed to the active state (able to run) until you enable the File I/O tests as just described. This configuration file directive "allow_fileio" exists as a security measure. Because SRM runs as the root user, a File I/O test could write to the /etc/passwd or boot.ini file and cripple a system. Use caution when enabling and creating these tests.

The size of the file you are testing can affect the performance of the test. A sample test file exists in the drive:/sysedge/plugins/svcrsp directory.

Options and Arguments

File I/O tests require the following test-specific options and arguments:

Specify these options and arguments when you create or modify tests.

Examples

This section includes examples for the read, write, read/write, and compare operations. Each sample test runs every 30 seconds and times out after 10 seconds if the operation is not successful. Statistics for response and availability are calculated over 120-second intervals.

Example 1: Reading a File

This example creates a test that monitors the amount of time to read the file located at F:\Test\testfile.bin.

To create a new test in a policy

  1. Click + (New) on the Test Monitors toolbar.

    The New test pane appears.

  2. From the Test Type list, select File I/O.
  3. In the Description field, specify testfile.bin.
  4. In the Test Name field, specify Read Operation.
  5. In the Test Interval field, specify 30.
  6. In the Test Timeout field, specify 10.
  7. In the Samples Per Interval field, specify 1.
  8. In the Statistics Window field, specify 120.
  9. In the File Operation field, select Read.
  10. In the Destination Filename field, specify F:\Test\testfile.bin.
  11. Accept defaults for the other values.
  12. Click Save Test.

When you commit your changes, SRM adds an entry similar to the following to the svcrsp.cf file:

{ 
index=11 
type=fileio
desc="Performing a read operation for testfile.bin." 
destination=F:\Test\testFile.bin
args="op=r" 
interval=30 
samples=1 
timeout=10 
window=120 
tos=0 
limit=0 
status=active 
name="Read Operation"
class=""
context=""
flags="1"
loglevel=3
}

Example 2: Writing a File

This example reads the C:\sysedge\bin\saFileIOTest.bin file and then writes the contents to F:\Test\WTest.bin.

To create a new test in a policy

  1. Click + (New) on the Test Monitors toolbar.

    The New test pane appears.

  2. From the Test Type list, select File I/O.
  3. In the Description field, specify WTest.bin.
  4. In the Test Name field, specify Write Operation.
  5. In the Test Interval field, specify 30.
  6. In the Test Timeout field, specify 10.
  7. In the Samples Per Interval field, specify 1.
  8. In the Statistics Window field, specify 120.
  9. In the File Operation field, select Write.
  10. In the Destination Filename field, specify F:\Test\WTest.bin.
  11. In the Source Filename field, specify C:\sysedge\bin\saFileIOTest.bin.
  12. Accept defaults for the other values.
  13. Click Save Test.

When you commit your changes, SRM adds an entry similar to the following to the svcrsp.cf file:

{ 
index=22 
type=fileio
desc="Performing a write operation for WTest.bin." 
destination=F:\Test\WTest.bin
args="op=w&local=C:\sysedge\bin\saFileIOTest.bin" 
interval=30 
samples=1 
timeout=10 
window=120 
tos=0 
status=active 
name="Write Operation"
class=""
context=""
flags="1"
loglevel=3
}

Example 3: Writing and Reading a File

This example reads the C:\sysedge\bin\saFileIOTest.bin file, writes the contents to F:\Test\RWTest.bin, and then reads F:\Test\WTest.bin.

To create a new test in a policy

  1. Click + (New) on the Test Monitors toolbar.

    The New test pane appears.

  2. From the Test Type list, select File I/O.
  3. In the Description field, specify RWTest.bin.
  4. In the Test Name field, specify Read-Write Operation.
  5. In the Test Interval field, specify 30.
  6. In the Test Timeout field, specify 10.
  7. In the Samples Per Interval field, specify 1.
  8. In the Statistics Window field, specify 120.
  9. In the File Operation field, select Read/Write.
  10. In the Destination Filename field, specify F:\Test\RWTest.bin.
  11. In the Source Filename field, specify C:\sysedge\bin\saFileIOTest.bin.
  12. Accept defaults for the other values.
  13. Click Save Test.

When you commit your changes, SRM adds an entry similar to the following to the svcrsp.cf file:

{ 
index=33 
type=fileio
desc="Performing a read/write operation for RWTest.bin." 
destination=F:\Test\RWTest.bin
args="op=rw&local=C:\sysedge\bin\saFileIOTest.bin" 
interval=30 
samples=1 
timeout=10 
window=120 
tos=0 
status=active 
name="Read-Write Operation"
class=""
context=""
flags="1"
loglevel=3
}

Example 4: Comparing Two Files

This example reads the C:\sysedge\bin\saFileIOTest.bin file, reads the F:\Test\CompTest.bin file, and compares their contents.

To create a new test in a policy

  1. Click + (New) on the Test Monitors toolbar.

    The New test pane appears.

  2. From the Test Type list, select File I/O.
  3. In the Description field, specify CompTest.
  4. In the Test Name field, specify File Compare.
  5. In the Test Interval field, specify 30.
  6. In the Test Timeout field, specify 10.
  7. In the Samples Per Interval field, specify 1.
  8. In the Statistics Window field, specify 120.
  9. In the File Operation field, select Compare.
  10. In the Destination Filename field, specify F:\Test\CompTest.bin.
  11. In the Source Filename field, specify C:\sysedge\bin\saFileIOTest.bin.
  12. Accept defaults for the other values.
  13. Click Save Test.

When you commit your changes, SRM adds an entry similar to the following to the svcrsp.cf file:

{ 
index=44 
type=fileio
desc="Comparing files." 
destination=F:\Test\CompTest.bin
args="op=cmp&local=C:\sysedge\bin\saFileIOTest.bin" 
interval=30 
samples=1 
timeout=10 
window=120 
tos=0 
status=active 
name="File Compare"
class=""
context=""
flags="1"
loglevel=3
} 

For information about errors you may encounter when running File I/O tests, see File I/O Test Error Codes.