Hardware fault detection and prediction