This question already has an answer here:
The scene that I can remember is the following:
A robot/human (not sure) wake up after a lot of time in his spaceship due to an alarm.
He went to the control room and started to check all the systems.
The first system was failing, the second too and also the rest of them.
He was wondering how it could happen and he discovered that he went through a meteoroid shower which destroyed the ship.
I thought it was The Hitchhiker's Guide to the Galaxy but I think it is not. Or it may be from Isaac Asimov. Maybe from his book of short stories?