Is there any way to detect when an uninterruptible power supply's backup battery starts being used? I would like to add an automatic shutdown to my server program if the u.p.s. is running on its battery.