rndck - Exercises random access devices in a nondestructive manner. This test is intended to exercise random access devices using both read and write as well as heavy seeking. syntax: rndck [-w] [-r] [-h] [-b begin[kMr]] [-s size[kM]] [-p part] dev -w Write allowed flag. This or -r flag required for operation. -r Read only flag. This or -w flag required for operation. No compare. -h Hex dump flag. Upon compare errors the entire blocks (found and expected) will be printed in hex+ascii, default is 6 hex bytes of each. -b n Begin (start) address for the test. A 'k' or 'M' suffix may be added to form kb or Mb. Adding the 'r' means n bytes (relative) from the end of the device. Default value is zero. -s n Size of the area to be tested, starting at 'begin' address. A 'k' or 'M' suffix may be added. Default is from 'begin' value to the end of the device. -p n Number of test partitions to split the test into. Default is 2. Upon startup the block (sector) size and the number of blocks on the device will be presented as well as the capacity in decimal, K bytes and M bytes. The area specified with the begin and size values are split into a number of sub-areas (partitions), each controlled by its own forked copy of rndck. Each partition will then perform the following sequence: 1 Pick a random block address within the partition. 2 Read the block of original data at address and save for later use. 3 Create a block of unique data containing the block number. 4 Write the unique data at address and then read it back again. 5 Compare the written and read data. 6 Write the original data at address and then read it back again. 7 Compare the written and read data. IF ERROR - GO TO #6. This sequence repeats until 50 errors is encountered or a signal is received. However, if the test fails to write back (restore) the original data, it will not terminate unless it has received 5 signals. Log device is stderr. Exept for the compared bytes upon compare errors the following is also shown: bn 58846 0xe5de - Block number that is failing, decimal and hex. byte 30129152 0x1cbbc00 - Byte address of failing block, decimal and hex. off 35 - Offset to first failing byte in block. try 1 - Retry count, two reads is attempted, 0 and 1. CAUTION! If write is allowed, this program writes test data on the device, make sure You are aware of the possible impact this may have on other programs. Example: Test a 148Mb disk, exept for the first 15Mb using 2 partitions: "rndck -w -b 15M /dev/si16" Example: Test a disk with one partition for the first 1Mb and three for the last 2Mb. Since the two areas is not adjacent, start two programs: "rndck -w -p 1 -s 1M /dev/si16" and "rndck -w -p 3 -b 2Mr /dev/si16" Example: Test 22Mb in the middle of a 152000k disk drive using 12 partitions: "rndck -w -p 12 -b 76000k -s 22M /dev/si16"