SYNOPSIS/usr/sbin/gentest [ -d ] [ -r ] serial-device
DESCRIPTIONGentest monitors the serial port connected to a UPS and allows DTR and/or RTS lines to be stet to simulate the genpowerd UPS monitoring software.
The gentest program will show the state of the control lines in the serial connection. Its primary purpose is to help discover the settings for UPS monitoring cables.
- Some serial port that is not being used by some other device, and does not share an interrupt with any other serial port.
OPTIONSgentest has the following command line options:
- Causes gentest to assert DTR on the serial line.
- Causes gentest to assert RTS on the serial line.
EXAMPLEIf we were to start gentest with the command line
genpower -r /dev/ttyS1while /dev/ttyS1 was connected to a LAN Manager cable and a TrippLite BC750/LAN, gentest would display:
--------------- DTR = Cleared RTS = Set CAR = Low ( ) CTS = Low ( ) DSR = Low ( ) RNG = Low ( )If the line power to the UPS were shut off, gentest would update the screen with:
--------------- DTR = Cleared RTS = Set CAR = Low ( ) CTS = High (*) DSR = Low ( ) RNG = Low ( )indicating that the CTS line had changed status and that the new status of the CTS line is HIGH.
Gentest is valuable in determining the parameters to use in genpowerd.h with unfamiliar cables and UPSs. In the example above, it could be determined that RTS probably provides power to the cable and that CTS is the line that shows changes in the line power's status (with LOW being the normal status of the line).