checking non sequential reading/writing of hard drive

what command check that?

Does it depend in the time it take to access the file?

we need way more information.

What problem - exactly - are you trying to solve? Please tell us what you are trying to work on, not what you think the solution is. Pls -- what unix are you using?

The answer to your question as posed is not going to help you: depending on hardware, you probably need to log average seek times over long periods of operation, then look at the logs to see what seek times are like during the time of your problem, if there is one. Some controllers maintain information like that, for example some SCSI controllers. Special software (usually from the manufacturer ) lets you see data like that. There may also be some ioctl queries that can help.

Generally lots of seeks can slow down I/O, depending on what the application is doing that defeats the effect of caching.