I would like a command line utility that tracks when a block read operation or block write operation is directed to a specified disk, and when the information is reported as loaded into RAM, or write operation has been committed, and report the result in one-second increments.
This requires in some way intercepting or being aware of the read/write command at the storage driver level during the command execution; and also intercepting or being aware of data ready / write committed notification at the driver level, and undoing the interception when the command exits with a keypress.
Output should look like this (with new line of results shown per second), similar to the PING command:
Reply from C: Write-> 2ms avg 24ms max; Read-> 2ms avg 18ms max
This program would require keeping many small structures in RAM, one for each outstanding I/O request, so the recommendation is to pre-allocate more than enough RAM, and mark the structures free or in use, and free up structures after being marked completed, and after the record has been utilized in outputting the result.
I am not 100% certain this is feasible at all, so please use your resources/expertise to verify before posting a bid.
## Deliverables
This should be a Visual Studio 2005, 2008, or 2010 solution.
Please use static linking, so the resulting executable has no dependencies that need to be installed/registered. It should be possible to put this on a flash drive, and take it to a computer, and just execute it from the command prompt, as a single self-contained file.
The resulting excutable should be a command line utility that runs much like the regular PING utility, and take one required parameter, the disk drive letter. Example:
diskping c:
The above should monitor block read/write operations on the C: drive until a keypress causes an exit.
The executable should work properly on Windows 2000, XP, 2003 Server, 2003 Server R2, Vista, Server 2008, 7, Server 2008 R2, both in 32-bit and 64-bit versions.
Please post any questions you may have.