[Nut-upsuser] Upssched timers

2008-09-03 Thread Alessandro Vesely
Hi all,
I've installed the current debian nut package, i.e. version 2.0.4.

I've configured upssched with timers as follows:

AT ONBATT   [EMAIL PROTECTED] START-TIMER  runonbattery 5
AT ONLINE   [EMAIL PROTECTED] CANCEL-TIMER runonbattery
AT ONLINE   [EMAIL PROTECTED] START-TIMER  backonline 5
AT ONBATT   [EMAIL PROTECTED] CANCEL-TIMER backonline

The idea is to send alerts in case of serious power failures.
In facts, when I pull the plug I get the following:

Sep  2 21:01:20 north upsmon[25026]: UPS [EMAIL PROTECTED] on battery
Sep  2 21:01:20 north upssched[23063]: Timer daemon started
Sep  2 21:01:20 north upssched[23063]: New timer: runonbattery (5 seconds)
Sep  2 21:01:25 north upssched[23063]: Event: runonbattery

However, reinserting the plug I got no backonline event:

Sep  2 21:01:40 north upsmon[25026]: UPS [EMAIL PROTECTED] on line power
Sep  2 21:01:40 north upssched[23063]: Timer queue empty, exiting

Any idea what am I doing wrong?

TIA
Ale


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Delta UPS boxes

2008-09-03 Thread Jerome BENOIT
Hello List !

Kjell Claesson wrote:
 Den Tuesday 02 September 2008 20.11.28 skrev Jerome BENOIT:
 Hello !
 Hi Jerome
 
 On the manual and the box, I read:

 Delta GES N-Series 6kva (on line series)

 On the other hand, upsc gives

 ups.mfr: BELKIN
 This depends on the driver. If the request for manufacturer
 fails to return anything, it set's it to BELKIN.
 
 ups.model: GES602N
 This is OK. 
 
 ups.firmware: 5015307704
 Strange firmware number.
 
 Is the rest of the upsc command OK ?
 Like voltages, runtime, current, status e.t.c..

Here is the full list:

battery.charge: 100
battery.temperature: 000
battery.voltage: 274.0
driver.name: belkin
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyS0
driver.version: 2.2.2
driver.version.internal: 0.21
input.frequency: 60.1
input.transfer.high: 0.0
input.transfer.low: 0.0
input.voltage: 211.0
output.frequency: 60.0
output.voltage: 220.0
ups.firmware: 5015307704
ups.load: 054
ups.mfr: BELKIN
ups.model: GES602N
ups.status: OL
ups.temperature: 000


 
 Also make sure that the shutdown is working.
 upsdrvctl shutdown

 shutdowns the UPS box.

 Yep, Sorry but I was referring to when you pull the mains, and
 check if it goes to OB and if it signalling OB LB and start a
 shutdown on your system. We need to know that the ups
 is giving the right status to the driver.

I have observed the 0B status.
Concerning the LB, I have not yet really test it (see below). 

 
 Nevertheless, it seems that I can not set the UPS fsd,
 so the Debian init NUT script does not poweroff the UPS box.

 
 Hmm, this is the way it should work.
 And this is what happens when you do and FSD.
 If the main's is failing it would go to battery. When the battery goes to
 LB (Low Battery) it start to shutdown the system. Then it power of the ups.
 
 It set the ups in something called shutdown.return. It power off the ups
 to save the battery, then power it on when the main's return (after 
 delay or charge level) So the computer should be set to 'last state' in
 the bios for 'state after power loss'.

I have not yet made such a test.
I have one new cluster, one old cluster, and a new workstation.
So far, I have played with the upssched features on the new computers.
Now I must play with the old computer: this may take some time.
Once the all computers are ready, I will make such a test.

What I can say right now is that when I do

/sbin/upsmon -c fsd

everything shutdown as expect, except the UPS box.
Right now, my guess is that

/sbin/upsmon -K

does not work as expected.

I have not yet modified the /etc/init.d/nut script provided by the Debian 
(Lenny) package:
at the very end, I get the message:

Power down flag is not set (UPS shutdown not needed)

which is due to a FALSE response (IfThenElseFi) of

/sbin/upsmon -K

To be frank I do not get the message:
I ask to shutdown the UPS box,
so I do not understand why the machinery do not do so.
In short, I do not care that ``UPS shutdown (is) not needed'' !

In the manual page of upsmon, we read:

   -K Test for the shutdown flag.  If it exists and contains the magic 
string from upsmon, then upsmon  will
  exit with EXIT_SUCCESS.  Any other condition will make upsmon 
exit with EXIT_FAILURE.

What is the expected magic string ? is this string come somehow from the UPS 
box ? 

Does I miss something here ?


Meanwhile I got a feed from a Delta user:
he suggest to use belkinunv. I let it a try,
but it did not work.


Thanks in advance,
Jerome
 
 Don't hesitate to ask any questions on the list, we are here to help you get 
 things going the way you whant.
 
 We run many different dist's, think Arnaud is best on the Debian side.
 I run Gentoo.
 
 Regards
 Kjell
 
 
 
 

-- 
Jerome BENOIT
jgmbenoit_at_mailsnare_dot_net

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


[Nut-upsuser] OMNIPLUS1000LCD is unavailable

2008-09-03 Thread Kenneth R Litko
Hello!
 
First time posting to this list. I recently purchased a Tripp-Lite
OMNIPLUS1000LCD from Costco (USA). I have it attached via USB to a Dell
computer with Ubuntu 8.04 server (all updates on it).
 
I've gone through a lot of research on google and this list and can't figure
out why my UPS will not connect using nut/usbhid-ups.
 
My setup in ups.conf is:

---
[OMNI1000LCD]
driver = usbhid-ups
port = auto
desc = Tripp-Lite OMNIPLUS1000LCD USB
---

Syslog tells me:

---
Sep  3 10:08:03 bigdog kernel: [ 8641.228674] usb 2-1: new low speed USB
device using uhci_hcd and address 2
Sep  3 10:08:04 bigdog kernel: [ 8641.645072] usb 2-1: configuration #1
chosen from 1 choice
Sep  3 10:08:04 bigdog NetworkManager: debug [1220454484.226168]
nm_hal_device_added(): New device added (hal udi is
'/org/freedesktop/Hal/devices/usb_device_9ae_2007_FW_2263_E').
Sep  3 10:08:04 bigdog NetworkManager: debug [1220454484.277845]
nm_hal_device_added(): New device added (hal udi is
'/org/freedesktop/Hal/devices/usb_device___noserial').
Sep  3 10:08:05 bigdog kernel: [ 8642.988297] hiddev96hidraw0: USB HID v1.10
Device [Tripp Lite  TRIPP LITE UPS ] on usb-:00:1a.1-1
---

If I try to stop and restart the driver, I get:

---
[EMAIL PROTECTED]:~$ sudo upsdrvctl stop
Network UPS Tools - UPS driver controller 2.2.1-
[EMAIL PROTECTED]:~$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.2.1-
Network UPS Tools: 0.29 USB communication driver - core 0.32 (2.2.1-)

Using subdriver: TrippLite HID 0.2 (experimental)
Startup timer elapsed, continuing...

Broadcast Message from [EMAIL PROTECTED]
(somewhere) at 10:18 ...

UPS [EMAIL PROTECTED] is unavailable
---

I can't use upsc:

---
[EMAIL PROTECTED]:~$ upsc [EMAIL PROTECTED]
Error: Data stale
---

Why is it telling me that the device is unavailable?

Any ideas?

Ken L.


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Delta UPS boxes

2008-09-03 Thread Kjell Claesson
Den Wednesday 03 September 2008 15.56.11 skrev Jerome BENOIT:
OK Jerome,
 Here is the full list:

 battery.charge: 100
 battery.temperature: 000
 battery.voltage: 274.0
 driver.name: belkin
 driver.parameter.pollinterval: 2
 driver.parameter.port: /dev/ttyS0
 driver.version: 2.2.2
 driver.version.internal: 0.21
 input.frequency: 60.1
 input.transfer.high: 0.0
 input.transfer.low: 0.0
 input.voltage: 211.0
 output.frequency: 60.0
 output.voltage: 220.0
 ups.firmware: 5015307704
 ups.load: 054
 ups.mfr: BELKIN
 ups.model: GES602N
 ups.status: OL
 ups.temperature: 000


Thank you for the info.


 I have not yet made such a test.
 I have one new cluster, one old cluster, and a new workstation.
 So far, I have played with the upssched features on the new computers.
 Now I must play with the old computer: this may take some time.
 Once the all computers are ready, I will make such a test.

Yes I understand that. You need a testsetup so you don't mess up
your cluster. We recomend to power some other load (light's) for
testing and supply the computer directly. In that case if the UPS missbehave
the computer is uneffected.

 What I can say right now is that when I do

 /sbin/upsmon -c fsd

 everything shutdown as expect, except the UPS box.
 Right now, my guess is that

 /sbin/upsmon -K

 does not work as expected.

 I have not yet modified the /etc/init.d/nut script provided by the Debian
 (Lenny) package: at the very end, I get the message:

 Power down flag is not set (UPS shutdown not needed)
8--snip--
 What is the expected magic string ? is this string come somehow from the
 UPS box ?

 Does I miss something here ?

If you read the 'shutdown.txt' in the doc, you find that this is a file
'creates the POWERDOWNFLAG file - usually /etc/killpower'
And this is created by upsmon master.

http://eu1.networkupstools.org/doc/2.2.0/shutdown.html

This is the file that the shutdown script look for to power of the
ups.

quote

   if (test -f /etc/killpower)
   then
echo Killing the power, bye!
/usr/local/ups/bin/upsdrvctl shutdown

sleep 120

# uh oh... the UPS poweroff failed!
# you probably should reboot here to avoid getting stuck
# *** see the section on power races below ***
   fi

unquote


 Meanwhile I got a feed from a Delta user:
 he suggest to use belkinunv. I let it a try,
 but it did not work.


It would be fine if he could give us the info from his setup.
We need to enter this into the compatibility list.
So people know what driver to use.

Regards
Kjell


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Delta UPS boxes

2008-09-03 Thread Jerome BENOIT
Hello List,



 If you read the 'shutdown.txt' in the doc, you find that this is a file
 'creates the POWERDOWNFLAG file - usually /etc/killpower'
 And this is created by upsmon master.
 
 http://eu1.networkupstools.org/doc/2.2.0/shutdown.html
 
 This is the file that the shutdown script look for to power of the
 ups.
 
 quote
 
if (test -f /etc/killpower)
then
   echo Killing the power, bye!
   /usr/local/ups/bin/upsdrvctl shutdown
 
   sleep 120
 
   # uh oh... the UPS poweroff failed!
   # you probably should reboot here to avoid getting stuck
   # *** see the section on power races below ***
fi
 
 unquote
 

I read the 'shutdown.txt' before to send the email.
And I read this IfThenFi in the /etc/init.d/nut :

  poweroff)
flag=`sed -ne 's#^ *POWERDOWNFLAG *\(.*\)$#\1#p' /etc/nut/upsmon.conf`
wait_delay=`sed -ne 's#^ *POWEROFF_WAIT= *\(.*\)$#\1#p' /etc/default/nut`
if [ -f $flag ] ; then
  if /sbin/upsmon -K /dev/null 21 ; then ## 
---
  log_daemon_msg Shutting down the UPS ...
  sleep 1
  if /sbin/upsdrvctl shutdown ; then
sleep 5
log_progress_msg Waiting for UPS to cut the power
log_end_msg 0
  else
log_progress_msg Shutdown failed.
log_progress_msg Waiting for UPS batteries to run down
log_end_msg 0
  fi
  if [ $wait_delay ] ; then
log_daemon_msg  (will reboot after $wait_delay) ...
sleep $wait_delay
/etc/init.d/reboot stop
  fi
  else
log_daemon_msg Power down flag is not set (UPS shutdown not needed)
  fi
else
if [ -z $flag ] ; then
log_daemon_msg   
##
log_progress_msg ## POWERDOWNFLAG is not defined in /etc/nut/upsmon.conf 
##
log_progress_msg ##  
##
log_progress_msg ## Please read the Manual page upsmon.conf(5)   
##
log_progress_msg 
##
log_end_msg 0
  fi
fi
;;

I guess that /sbin/upsmon -K check something else, otherwise
there is a clear redundancy here.

upsmon does generate the $flag , but /sbin/upsmon -K responses FALSE :
I will try to dig this issue later.

Thanks,
Jerome 


-- 
Jerome BENOIT
jgmbenoit_at_mailsnare_dot_net

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


[Nut-upsuser] Some issues with UPS Forza SL-1001

2008-09-03 Thread Néstor Peña

Hi to everybody.  Some days ago, I bought an UPS by Forza Power 
Technologies, 
model SL-1001.  This Forza SL-1001 is line-interactive, has 14,4 A/h charge 
and is rated at 1000VA.  Before, I had a TrippLite Omni 500 (or something 
like that), a simple contact-closure UPS, and I used nut with the simple 
genericupsdriver, so I'm new with this type of UPSs.

NUT doesn't list Forza as a supported UPS so I first tried to use 
the marvelous software inside, the infamous WinPower.  As their name 
states, only works well in Windows, because in Linux it only recognizes 
RS232-based UPS, but this SL-1001 is detected as a HID device.

Google brings me to this mail list and I tested using the megatec_usb 
driver, 
following recomendations from a mail here.  The driver works perfectly - 
almost.  I have some problems with it.  I hope you can help me or enlight me 
to cure, at least.

*   First: the megatec_usb driver takes sooo long to detect the UPS - 
almost 70 
seconds to say yes, this UPS talks megatec_usb protocol, so I needed to 
raise the maxstartdelay to 80.  It's possible to reduce this time?

*   Second: variables detected.  Look at the listing:

battery.charge: 87.5


Nut states battery is at 87,5% but Winpower says 100%.  In fact, with 
nut, 
the battery doesn't charge above 95%.  Using megatec_ups -DD gave me this 
voltage ranges: 13,7V-9,7V, and the maximum battery voltage I ever seen is 
13,5V.  Is WinPower using relaxed values? Is the UPS needing a battery 
recalibrate? I just unpacked and connect it...

battery.voltage: 13.20
battery.voltage.nominal: 12.0
driver.name: megatec_usb
driver.parameter.mfr: Forza
  ^^
driver.parameter.model: SL-1001
^^^
driver.parameter.pollinterval: 1
driver.parameter.port: auto
driver.parameter.productid: 5161

driver.parameter.vendorid: 0665
   

This values are really forced in the ups.conf file.

driver.version: 2.2.2
driver.version.internal: 1.5.14
input.frequency: 59.9
input.frequency.nominal: 60.0
input.voltage: 114.4
input.voltage.fault: 114.4
input.voltage.maximum: 115.5
input.voltage.minimum: 114.4
input.voltage.nominal: 120.0
output.voltage: 114.6
ups.beeper.status: enabled
ups.delay.shutdown: 0
ups.delay.start: 2
ups.load: 27.0
ups.mfr: Forza
ups.model: SL-1001
ups.serial: unknown
ups.status: OL
ups.temperature: 25.0
ups.type: standby
  ^^^

According with this, this UPS is standby type, so it's incorrect (check 
http://www.forzaups.com/product_detail.aspx?PrdId=27#technical)

*   And the third and last: if I send a upscmd ups-parallax 
test.battery.start, 
the upsd loss communications with the megatec_usb driver, and only restore 
communication when the battery test ends.  Why?

Thanks in advance.

-- 
Néstor Peña
EPCA Sistemas, C.A.
Caracas - Venezuela

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser