We normally see this behavior when a dog's urine has blood in it or excess about of sugar. Since your guy is elderly, I'd have a senior checkup done and be sure he has a urinalyses done to check for diabetes and blood in the urine. You can read about diabetes here:
Blood in the urine can be caused urinary stones, Cystitis, Kidney Disease, Bladder Cancer, or Urinary Bacterial Infections.
Urinary Stones are common and found in the kidneys, bladder and urethra though usually they are in the bladder. The formation of crystals or stones in urinary tract can be caused by the following factors usually working together: mineral crystals in the urine, bacteria, diseases, some medications, excess Vitamin C, imbalance in pH of urine. Typical symptoms are straining to urinate, frequent urination of small amounts and blood in the urine. Some breeds are known to have problems with stones. These are Miniature Schnauzer, Schnauzer, Lhasa Apso, Shih Tzu, Bichon Frise, Miniature poodle, and Yorkshire terrier.
Cystitis is when your dog's bladder becomes inflamed. It is believed that infections, polyps, tumors and stones contribute to this condition, but the actual cause is unclear. Typical symptoms are straining to urinate, frequent urination, straining to urinate, difficulty urinating and blood in the urine.
Kidney Disease is a common cause of non-accidental death in dogs. It is not clear what causes kidney disease but it is believed that dehydration, blood loss, impaired heart function, tumors, infections and toxins contribute to it. Some medications for kidney disease may cause blood in the urine.
Bladder cancer occurs in middle-aged and older dogs. Bladder cancer is not as common as other causes such as Urinary tract infections, though it is not recognized early for that same reason. Typical symptoms are frequent urination, urinating small amounts, blood in the urine, and infections.
Urinary bacterial infections can occur in bladder (most common), kidneys, urethra, and prostate. They are easily treated once diagnosed. They are the major cause of the prostate disease in male dogs. The prostate becomes inhabited by bacterial and it becomes difficult to eliminate. Some other conditions such as diabetes, cancer and viral diseases affect a dog’s immune system and may contribute to this condition.
Hope this helps you.