A device was subjected to a sequence of shocks occurring randomly at times n = 1 min, 2 min, … . Each shock caused a random amount of damage and the damage accumulated additively. In such a case, a device can fail at any point of time and the chance of failure depends on the history of the system. If the system is replaced before failure, a cost C is incurred and if the system fails, it is replaced by a new and identical one and a larger cost C + K is incurred. There is another cost known as the operational cost of the system depending on the accumulated damage at any point of time. Here we studied the problem of determining a replacement rule minimizing the long-run average cost per unit time. We also analyzed the system as a special case in which the system fails whenever the total damage exceeds a fixed threshold.