UPS, Ubuntu 18.04 - help needed

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
37,604
I'm running Ubuntu 18.04 on my docker server.

I recently moved said server to where my NAS is - and put them on the same UPS - initially, the UPS (APC) was connected directly to the NAS, which allowed the UPS to trigger a shutdown event on the NAS when power is low. (Buffalo TeraStation - fairly locked down, but I got SSH access and can trigger a shutdown)

Now - I'd like to connect to the UPS to the server, and somehow trigger a shutdown from the server when power is low for both the server, and the NAS - what's going to be my best approach?

Ive also got to figure out how to start the NAS/Server backup after power restores.
 

Rickster

EVGA Fanatic
Joined
Jul 31, 2012
Messages
16,861
Server and NAS should have settings in the BIOS to auto start when it detects power. My gaming PC has this function.

1585296364491.png

Im sure the NAS/server should do this automatically because if not then whats the point of a server. Unless your server isnt an actual server but rather a Home PC with server software?
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
37,604
Server and NAS should have settings in the BIOS to auto start when it detects power. My gaming PC has this function.

View attachment 807495

Im sure the NAS/server should do this automatically because if not then whats the point of a server. Unless your server isnt an actual server but rather a Home PC with server software?
Yeh, it is a server (HP Gen8 Microserver) - it does have the functionality - not sure about the NAS though, if its been shutdown remotely - whether it'll start up again
 

Nod

Executive Member
Joined
Jul 22, 2005
Messages
8,990
Under /etc/apcupsd you have various scripts. One of them is called "onbattery". You can use this to trigger a shutdown of other systems when this system goes on battery.

You could possible use WOL (wake on lan) to start up the other systems from system that monitor the UPS.
"etherwake" could be used to wake up other systems. WOL will have to enabled in their BIOS.
 
Last edited:

Nod

Executive Member
Joined
Jul 22, 2005
Messages
8,990
Yeh, it is a server (HP Gen8 Microserver) - it does have the functionality - not sure about the NAS though, if its been shutdown remotely - whether it'll start up again
Starting up automatically is normally only with a power failure not a shutdown.
Also, if you shutdown the system, the UPS will probably still have enough power to make it seem that there is power, so no "power restore" event will be detected.
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
37,604
Starting up automatically is normally only with a power failure not a shutdown.
Also, if you shutdown the system, the UPS will probably still have enough power to make it seem that there is power, so no "power restore" event will be detected.
That's what I suspect - although the NAS seemed to handle it automatically, but I think it was built into their "handling" software with the UPS.

I'd like to try and test this all and get it working while I'm at home - so I don't run into a situation where I'm away and my whole house stops working.
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
37,604
Just ran into another problem - realised the switches aren't on the UPS... going to have to make a "UPS multiplug for the UPS + Servers + office switch"
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
37,604
And it looks like the battery is dying/dead :D good day for this project.
 
Top