Re: [Nut-upsuser] upsmon shutdown based on Time since power fail.
Citeren Richard Chapman : This sounds like one way to do it. If I do it this way - do you know whether the file: /etc/killpower will be created before the shut-down is issued (as it would if the battery low event occurs). If not - the UPS may not be shut down - and therefore the system may not start up again if the power returns before the battery is completely flat. I guess if the flag file isn't created - then we could run a short script to create it - then issue the shut-down Does that sound right to you? Indeed - if we do write a short script - we could do the delay in the script - somehow test whether we are still on battery - and if so - issue the shut-down immediately. Don't do this. As written in the FAQ, in some cases you may wish/need to use 'upssched' to start shutting down your systems before the UPS indicates the battery is low. In that case, you probably want to call 'upsmon -c fsd' instead, which will initiate a shutdown on the upsmon master (in your case, your server). This means that you will have to configure the upsmon on the server (FINALDELAY) to allow for enough time for your clients to shutdown. This will put your master at risk in case of repeated power failures however, so don't overdo this. Best regards, Arjen -- Please keep list traffic on the list ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
[Nut-upsuser] APC Smart UPS 900i
Hi, I'm running an old APC Smart UPS 900i. As there isn't any software from APC which supports this UPS anymore, I've installed NUT (Gentoo Ebuilds), but version 2.0.5 and version 2.2.2 loose connection to the UPS while version 2.4.1 and SVN version don't show any settings and there are no instant commands. The only information I can get are: driver.name: apcsmart driver.parameter.cable: 940-0024C driver.parameter.pollinterval: 2 driver.parameter.port: /dev/ttyUSB0 driver.version: 2.4.1 driver.version.internal: 2.03 input.voltage: 226.9 ups.mfr: APC ups.model: Smart-UPS ups.serial: 00016325 ups.status: OL How can I use the UPS (battery test, configuration)? Best regards, Renne ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] upsmon shutdown based on Time since power fail.
Hi I am sorry, but i can not answer any of your technical NUT questions, i just wrote with an idea that might or might not work. As for starting the machine if power returns, then i can think of some remote power management that can turn the power on/off to the machine and then sit between the UPS and the machine(s). WAKE on LAN might be an option too. JonB On 22/05/2009, at 03.07, Richard Chapman wrote: Thanks Jon This sounds like one way to do it. If I do it this way - do you know whether the file: /etc/killpower will be created before the shut-down is issued (as it would if the battery low event occurs). If not - the UPS may not be shut down - and therefore the system may not start up again if the power returns before the battery is completely flat. I guess if the flag file isn't created - then we could run a short script to create it - then issue the shut-down Does that sound right to you? Indeed - if we do write a short script - we could do the delay in the script - somehow test whether we are still on battery - and if so - issue the shut-down immediately. Out of interest - do you know what the ups parameter: battery.runtime: 120 Means - and where might it be documented? Thanks Jon Richard. Jon Bendtsen wrote: On 20/05/2009, at 12.11, Richard Chapman wrote: For various reasons - I have been trying to get my Desktops and/or servers to shut-down a fixed time after a power fail - or better still a fixed time - or a low battery whichever comes first. [cut] Is there another parameter somewhere - probably in upsmon - which would allow me to specify a shut-down after (say) 3 minutes running on battery regardless of battery status? In the upsmon.conf file you use NOTIFYCMD and ONBATT to execute a shutdown $time Then you use a ONLINE to execute a -c to cancel a shutdown if the power returns. JonB ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
[Nut-upsuser] FreeBSD installation procedure (updated)
The purpose of this posting is to summarize the FreeBSD installation procedure from the beginning till the very end. 1. Follow the instructions provided in the How-To prepared by Thierry Thomas (http://people.freebsd.org/~thierry/nut_FreeBSD_HowTo.txt). Please note the following: a) if you are using an USB device, as of NUT 2.2 usbhid-ups completely replaces the legacy hidups driver and provides support for various manufacturers. At that time, it will be renamed to usbhid-ups; b) if your USB device is claimed by the uhid and not by ugen driver, this should be fixed, since libusb-based packages such as NUT can't work with uhid* device nodes. Therefore, you need to either de-configure the uhid driver (in FreeBSD a separate driver handles USB/HID keyboard and mouse) or blacklist that specific USB VID/PID combination. Please refer to the following thread for more details on the issue: http://lists.alioth.debian.org/pipermail/nut-upsuser/2009-May/005058.html c) 'allowfrom' in upsd.users is obsolete and is no longer used; d) you may need to insert additional instructions into ups.conf - e.g. if you need a decent grace delay on the UPS for the shutdown procedure. See below for more details on the issue. 2. After you have followed the above How-To instructions and have tested your configuration, you will need to configure the automatic UPS shutdown (http://www.networkupstools.org/doc/2.2.0/shutdown.html). Put the following sentence either into /etc/rc.shutdown script, or into /usr/local/etc/rc.d/nut (inside the 'nut_poststop' section, straight after the '${nut_prefix}/libexec/nut/upsdrvctl stop' instruction): # uncomment for rc.shutdown script # # nut_prefix=${nut_prefix-"/usr/local"} if [ -r /etc/killpower ]; then rm -f /etc/killpower echo "Killing the power, bye!" ${nut_prefix}/libexec/nut/upsdrvctl -v shutdown if [ $? -ne 0 ]; then ${nut_prefix}/libexec/nut/UPS_DRIVER -k -D -a UPS_NAME fi # increase this timeout (to, say, 120 sec) if your configuration is vulnerable to a power race # *** see the section on power races below *** sleep 5 # uh oh... the UPS poweroff failed! # you probably should reboot here to avoid getting stuck # *** see the section on power races below *** # # /sbin/reboot fi Arguably rc.shutdown is a better place for this but it's not very ports friendly. If you you decide to put this into /usr/local/etc/rc.d/nut, you need a decent grace delay on the UPS so the rest of the system will shut down properly. This can be done by adding two variables into ups.conf: [UPS_NAME] driver = UPS_DRIVER port = UPS_PORT # Give the system enough time to shutdown when the power fails offdelay = 120 # ondelay must be greater than offdelay so change it ondelay = 130 3. Test whether your configuration is able to handle a power race successfully as described in http://www.networkupstools.org/doc/2.2.0/shutdown.html and add the "reboot after timeout" hack, if required. 4. That's it. At this stage you may wish to add some post-installation procedures, like cgi-scripts for web-access or any other. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser