[mythtv-users] UPS with mythbuntu

Mike Perkins mikep at randomtraveller.org.uk
Tue Feb 24 17:41:06 UTC 2015


On 24/02/15 15:09, Hika van den Hoven wrote:
> Hoi UB40D,
>
> Tuesday, February 24, 2015, 3:57:49 PM, you wrote:
>
>> I recently had a few power outages and the last one caused a database
>> corruption that was sufficiently annoying to repair that I just got myself
>> a UPS.
>
>> The maker's web site offers a linux version of their software, with control
>> panel etc.
>> http://www.cpsww.eu/support/product_support.htm?countrytabs=2
>
>> Should I be using that, or is there a canonical way to integrate a UPS into
>> mythbuntu that I should be following instead? The box is a fully dedicated
>> myth appliance so I'm not actually interested in the control panel.
>
>> All I want is basically, when there is a power cut, for the system to shut
>> down properly, whatever it's doing. OK to miss some recordings, obviously,
>> and even OK to lose the ones that were maybe recording at the time, but not
>> ok to fuck up the database or other crucial bits such that the box doesn't
>> come up properly when the power is back on.
>
>> Thanks
>
> I have never encountered anything like this in Mythtv. But I don´t
> think it is relevant. All that is needed is for the ups to know what
> command to send to the box to shutdown (usb/net-address and os).
> Probably it will run a service on the machine you wont notice unless
> there is a powercut. So ones you have set that up you can ignore the
> panel.
>
That is exactly it. I run an APC UPS and there are standard packages for it 
which allow control and status functions. I think there are packages for Debian 
/ Ubuntu for most popular devices, and doubtless for other distros too.

As Hika said, there is a service run on every PC you connect through the UPS 
which gets signals from the beast over ethernet - my UPS is connected to one box 
which is considered master, not unlike mythtv in fact.

Once the service is run you can define time delays etc before each system shuts 
itself down and the command or script to run at that time. I have a 400VA model 
and draw about 180 VA; that allows about 12 minutes of battery life. I set the 
shutdown scripts for about 4~5 minutes.

One note: I initially put *everything* on my UPS but discovered it didn't like 
my laser printer. This is because it pulls too much power on startup. Everything 
else, however, including all the ethernet switches, is run through the UPS. No 
point having a master / slave system if the boxes can't talk to each other!

-- 

Mike Perkins



More information about the mythtv-users mailing list