Cat Health Questions? Ask a Cat Vet for Answers ASAP.
Keflex is not my first choice of antibiotics for a cat with a urinary tract infection. Because male cats are very prone to getting blocked, I recommend having a urinalysis done to see if there are any crystals, blood, white blood cells, or bacteria in the urine. If there is just an infection, then I would ask your vet if you could just use the Keflex since you have some, saving you the prescription fee.
Because he isn't urinating much at any one time, I'd say he is at very high risk of blocking, which will require catheterization and a stay in the hospital. But if you can get him started on treatment (which may include fluids, a diet change, and an anti-inflammatory), hopefully he won't block. He is a bit on the older side for blocking, so it would be good to have either an ultrasound or an x-ray done to make sure there isn't bladder stones complicating things.
Hope that helps!