Determining If Relays Are Working, Programmatically

What's switching on the contact side of the relays?