Patent ID: 8156382

Claim:
A method for counting error events associated with an operation of at least one storage device utilizing a sliding window, comprising: defining the sliding window and a threshold number of error events; storing the sliding window and the threshold number of error events in memory; monitoring the operation of the at least one storage device; during the monitoring, detecting the error events associated with the operation of the at least one storage device; counting the plurality of error events utilizing the sliding window; determining whether the threshold number of error events has been counted in the sliding the window; and reacting to the error events, if it is determined that the threshold number of error events has been counted in the sliding the window; wherein the threshold number varies based on a type of PHY device; wherein the type of PHY device includes a host PHY device which connects the at least one storage device to a host system or to another storage device, and a drive PHY device that connects an expander and a storage drive of the at least one storage device; wherein the threshold associated with the host PHY device is set lower than the threshold associated with the drive PHY device.