Check a disk for bad blocks (QNX Neutrino)
dcheck [options] drive
QNX Neutrino
The dcheck utility verifies that a disk has been correctly formatted, by attempting to read every block on the drive. The block numbers of any blocks that can't be read are displayed (in hex) to standard output. A summary of the total number of bad blocks is also displayed. You can use dcheck to check any formatted disk, including disks that contain files. The files aren't damaged.
If you don't specify the number of blocks to verify, dcheck obtains this information from the filesystem and checks all the blocks on the specified drive.
Some blocks may be marginal, so if you run dcheck multiple times (see the -F, -l, and -L options), you can increase the chance of recognizing these blocks.
To help you find any marginal blocks, dcheck has a number of options to provide additional checking of a disk. For example, the -r option checks the blocks in a random order; each check consists of a random number of blocks between 1 and 32 (or less, depending on the value specified in the -B option). The dcheck utility keeps track of the checked blocks and checks each one only once. This option allows you to find blocks that are bad due to a slight lag time in head movement.
The -l option makes dcheck continuously check the disk until you stop it. For this option, -r is implicitly used and is toggled for each invocation. That is, for the first loop, random checking is set on; for the second loop, it is off, etc. At the end of each complete check, you're prompted to stop the loop. If you don't stop it within 15 seconds, dcheck is started again, etc. The -L option is identical to -l with an upper limit to the number of loops. The -F doesn't prompt you at the end of each check.
The -w option makes dcheck rewrite each block on the device after reading it. This is a nondestructive check that tests the write portion of the hardware. Note that, although this is a more thorough test, it takes more time, depending on the hardware.
The -V option is similar to the -w option, in that dcheck rewrites each block after reading it, but in this case dcheck also rereads each block after the rewrite check and compares this second read with the first. Like the -w option, this test is nondestructive. Note, however, that this is a more thorough test that takes longer.
Check all blocks on the hard disk:
dcheck /dev/hd0t77