@FrankZappa said in QNAP recognizing NUT:
From what I can see, NUT only displays data and the QNAP will send a shutdown command to itself based on the data it reads from NUT. APCUPSD, on the other hand, has some shutdown commands based on remaining power and time.
Things are a lot more complicated than that. NUT uses a hardware (UPS) centric approach. Left to its own devices, which is a good idea, NUT will initiate a shutdown when the UPS declares a low battery event. This is not based on time, but the UPS's view of battery exhaustion. When the LB event is declared, this is communicated to the NUT clients (including the client on the local host). The clients then initiate a shutdown of their respective OSs. The NUT server waits for all clients to disconnects before instructing the UPS to cut power after a delay. Cutting power is critical for recovery when mains return.
Apcupsd uses a software centric approach which is at odds with NUT's approach. If the time on battery determines that it's time to shutdown and initiates it, the NUT server will never know. Subsequently, neither will NUT clients. So from NUT's point of view, power will simply stop. Even if you try and coordinate the amount of time on battery for all the systems, you still have an issue because the systems poll at different times and have different shutdown durations.
If you want to use NUT for distributed shutdown, you have to disable apcupsd, or disable its ability to send shutdown instructions to both the OS and the UPS.
That said, I'm curious... why do you want to run both?