Question: are on its last legs?
Answer: on its last legs. Something that is on its last legs is in such bad condition that it will soon be unable to work as it should: I've had this laptop for five years now, and it's really on its last legs.