To serial port. Hope this helps. To serial port. The DTR is kept high, when the UPS's power input is gone it will close the relais . The computer is monitoring the DCD input port to go LOW .
Battery is low.
If you use one of the packages, follow the instructions there. If you want to hack powerd.c , keep reading. It's a hacked version of powerd.c . It allows you to set the necessary port flags from the command line and then monitors the port, displaying the control lines every second. See the code for details.