How to Analyse HDD

Hi,

Is there a tool in QNX that allows me to analyse my HDD? I suspect some of my files are corrupted and I want to find out if there is a problem with the HDD.

Thanks!

chkfsys and dcheck.

chkfsys will check the file system, dcheck will check for bad sectors.

talking about that,
are there any tool to defragment the HDD?

fragmentation is not needed on all fs. A lot of fs work very long before you can find fragmentation at all.
Some fs even defrag during read/write operations.

But i never checked that on QNX…

I don’t think so…

qnx.com/developers/docs/6.4. … sinfo.html

fsysinfo is just a tool to analyze whether a drive needs defragmenting. There is no specific tool (that I know of) for QNX that defragments a drive in place. The algorithms that the file system uses will generally maintain an un-fragmented file system as long as there is always some reasonable percentage of free space available. Certain uses will always create fragmentation, for example allocating a lot of small files, and randomly deleting them.

If you find that your drive is fragmented, here are two strategies that will help.

  1. If you need to defrag in place, and you have sufficient empty space available, do the following. Figure out which files are not in use. Copy each such file. Delete the old file and rename the new one. The file system will defrag these files as it copies them.

  2. If you can defrag off line, try the following. Copy most files (not .boot or .altboot) to a backup hard drive. Delete all the old files, and copy the backuped up ones back, one by one. This will create an almost completely defragmented drive. If you know which files are causing the defragmentation, you can copy more selectively.

I’m sure I’ve missed something that Mario or Bill Flowers will remind me of.