on one’s last legs

on (one's) last legs

Near physical collapse or death. I knew I was on my last legs, so I was very relieved to see the marathon's finish line in the distance. Ed's on his last legs—you should probably try to visit him in the hospital today.
See also: last, leg, on
Farlex Dictionary of Idioms.

on one’s last legs

and on its last legs
mod. about to expire or become nonfunctional. This car is on its last legs. We have to get a new one.
See also: last, leg, on
McGraw-Hill's Dictionary of American Slang and Colloquial Expressions
See also:
  • on (one's) last legs
  • on last legs
  • on one's last legs
  • on your last legs
  • Let’s have it!
  • let's have it
  • the last of the lot
  • last but not least
  • win the wooden spoon
  • in the last chance saloon