Customizable UPS Options?

StorCenter ix2-200 Network Storage
Post Reply
phill1127
Posts: 9
Joined: Thu Jan 09, 2014 1:48 am

Customizable UPS Options?

Post by phill1127 » Thu Jan 09, 2014 1:59 am

I connected a UPS to my ix2. It gets recognized and the "UPS Management" page displays the UPS model #, battery level, and linepower/battery status. However, this just isn't enough for me -- I'm not satisfied with the minimal display and lack of options. The desktop program for the UPS displays all kinds of useful info: power consumption, time remaining on battery, blackout info, etc. It'd be nice to get something out of the NAS. At the very least, I'd like to see and modify the battery level at which the NAS will auto shutdown.

I have root access to my NAS but can't figure out what the UPS Management process is or where I get at some config options if they exist. Does anyone have any info here? Are there any UPS tweaks that can be done manually via some config files?

Thanks!

phill1127
Posts: 9
Joined: Thu Jan 09, 2014 1:48 am

Re: Customizable UPS Options?

Post by phill1127 » Thu Jan 09, 2014 2:48 am

Found it. I have an APC UPS and the process name is apcupsd.
The config file is located at: /mnt/apps/usr/local/apcupsd/apcupsd.conf

jormc
Posts: 3
Joined: Mon Apr 28, 2014 7:20 am

Re: Customizable UPS Options?

Post by jormc » Mon Apr 28, 2014 7:23 am

Hi phill1127,

I'm looking for a UPS for my ix2-200 and I've not any idea what model to purchase. Can you tell me about your?

Thanks!

Jordi

phill1127
Posts: 9
Joined: Thu Jan 09, 2014 1:48 am

Re: Customizable UPS Options?

Post by phill1127 » Tue Apr 29, 2014 12:52 am

I acquired an old APC model: http://www.apc.com/resource/include/tec ... u=br800blk

I'd imagine that many APCs would work since the NAS has 'apcupsd' process. The NAS setup page through the web interface doesn't give you anything to customize UPS setup (it just reports model, charge, and status). But the config file at /mnt/apps/usr/local/apcupsd/apcupsd.conf had pretty much everything I was looking for.

amr42
Posts: 28
Joined: Mon Jan 16, 2012 9:34 pm

Re: Customizable UPS Options?

Post by amr42 » Sun May 03, 2015 6:32 pm

phill1127 wrote:I acquired an old APC model: http://www.apc.com/resource/include/tec ... u=br800blk

I'd imagine that many APCs would work since the NAS has 'apcupsd' process. The NAS setup page through the web interface doesn't give you anything to customize UPS setup (it just reports model, charge, and status). But the config file at /mnt/apps/usr/local/apcupsd/apcupsd.conf had pretty much everything I was looking for.

I also want to change my APC UPS config file and start the apcupsd without having a UPS connected via USB (will use net slave mode from another NAS with apcupsd running)

How do you modify this config file, since it is read only and exists in a read only file system?

Any suggestions welcome. I can do basic Linux!

Thanks,

phill1127
Posts: 9
Joined: Thu Jan 09, 2014 1:48 am

Re: Customizable UPS Options?

Post by phill1127 » Sun May 03, 2015 7:41 pm

Take a look at the "Auto-start programs" heading at this page http://techmonks.net/installing-transmi ... -on-a-nas/. It tells you how to modify the sohoProcs.xml file to auto-start a specific program. The sohoProcs.xml similarly appears as read-only. I tweaked the example to modify the apcupsd.conf file to configure the UPS. My version, titled editconfig_apcupsd.sh, is below:

#!/bin/sh
# edit the bootup config for the ix2 APC UPS process
mknod -m0660 /dev/loop3 b 7 3
chown root.disk /dev/loop3
mkdir /tmp/apps
mount -o loop /boot/images/apps /tmp/apps
vi /tmp/apps/usr/local/apcupsd/apcupsd.conf
sleep 1
umount /tmp/apps
rm /dev/loop3

amr42
Posts: 28
Joined: Mon Jan 16, 2012 9:34 pm

Re: Customizable UPS Options?

Post by amr42 » Wed May 06, 2015 11:34 am

Many thanks. That did the trick! :D
phill1127 wrote:Take a look at the "Auto-start programs" heading at this page http://techmonks.net/installing-transmi ... -on-a-nas/. It tells you how to modify the sohoProcs.xml file to auto-start a specific program. The sohoProcs.xml similarly appears as read-only. I tweaked the example to modify the apcupsd.conf file to configure the UPS. My version, titled editconfig_apcupsd.sh, is below:

#!/bin/sh
# edit the bootup config for the ix2 APC UPS process
mknod -m0660 /dev/loop3 b 7 3
chown root.disk /dev/loop3
mkdir /tmp/apps
mount -o loop /boot/images/apps /tmp/apps
vi /tmp/apps/usr/local/apcupsd/apcupsd.conf
sleep 1
umount /tmp/apps
rm /dev/loop3

phill1127
Posts: 9
Joined: Thu Jan 09, 2014 1:48 am

Re: Customizable UPS Options?

Post by phill1127 » Wed May 06, 2015 11:48 am

No problem.

This page has more detail on the script than the one I linked before...
http://vincesoft.blogspot.com/2012/01/h ... omega.html

amr42
Posts: 28
Joined: Mon Jan 16, 2012 9:34 pm

Re: Customizable UPS Options?

Post by amr42 » Wed May 06, 2015 11:53 am

Follow on question...

So if I want to make sure that apcupsd is running, I checked the sohoProcs.XML file and the entry exists (see below), but there must be something else that determines if this daemon should be running (like a UPS plugged into the USB ! ).

<Program Name="apcupsd" Path="/sbin/apcupsd">
<Args>-b</Args>
</Program>


Any ideas, how to ensure apcupsd is running, other than put another entry like the above in the sohoProcs.XML file?


phill1127 wrote:No problem.

This page has more detail on the script than the one I linked before...
http://vincesoft.blogspot.com/2012/01/h ... omega.html

phill1127
Posts: 9
Joined: Thu Jan 09, 2014 1:48 am

Re: Customizable UPS Options?

Post by phill1127 » Wed May 06, 2015 12:11 pm

If you run 'top' you should be able to see the apcupsd process running. Alternatively you could do 'ps aux | grep apcupsd'. Running '/sbin/apcaccess' prints a bunch of info, STARTTIME indicates when the apcupsd process started. (apcaccess documentation: http://www.apcupsd.org/manual/manual.ht ... ort-fields)

My ix2 sends me an email when the UPS goes on battery, so you could unplug the UPS from the wall and you should get an automated email after the time set in the config file (I forget exactly which timer this is).

amr42
Posts: 28
Joined: Mon Jan 16, 2012 9:34 pm

Re: Customizable UPS Options?

Post by amr42 » Thu May 05, 2016 1:40 pm

I'm still battling with getting my apcupsd to start after reboot.

I moved this entry (see below) in sohoProcs.xml from Program Level = 2, to Program Level = 1 - but this did nothing (apcupsd did not start after reboot).

<Program Name="apcupsd" Path="/sbin/apcupsd">
<Args>-b</Args>
</Program>

Any ideas pls?

A

Post Reply