[Nut-upsuser] 2.2.2-pre2 64 bit rpm tested on openSUSE 10.3

Roger Price rprice at cs.uml.edu
Sun Apr 20 13:58:59 UTC 2008


I started testing the 64 bit rpms of 2.2.2-pre2 on openSUSE 10.3 with an 
MGE Ellipse 1500 USB.  Here is my writeup of the test, with my apologies 
for a long post.  It looks as if I have a problem with upssched.

My 64 bit rpm's are available at

http://rogerprice.org/nut-2.2.2/nut-2.2.2-pre2.x86_64.rpm  
http://rogerprice.org/nut-2.2.2/nut-devel-2.2.2-pre2.x86_64.rpm  
http://rogerprice.org/nut-2.2.2/nut-hal-2.2.2-pre2.x86_64.rpm

On Sun, 20 Apr 2008, Kjell Claesson wrote:

> Hi Roger.
> 
> I can answer that, so you don't have to wait :-)
> 
> The nut-hal package is a package that contains the hal drivers and fdi file
> udev rules.
> 
> As you are using a usb ups, you may use this instead of the nut package.
> If you install it, the ups gets hotplugged by udev hal and would show up as a
> battery in the power monitor in Gnome. (should be the same in KDE)
> 
> So no configuration or anything. Just plug it in and it should work.

Hello Kjell, I guess that there would be some configuration, for example 
to say after what interval shutdown would start, and to specify the 
shutdown command.  

> So your stationary computer look like a laptop, where you have a battery 
> monitor showing that the battery is loading (running on main's). When power
> is gone it shows running on battery and shut down when battery gets low.
> 
> This package is meant to be used by people running a singel computer
> and a desktop (Gnome, KDE , ....).
> 
> So if you fall under this category, you may try it, and see how it looks.
> If you don't like it and want the normal nut, it is only to uninstall and
> install the nut package.
> 
> (Hope this explanation is OK. Anything to add Arjen and Charles ?)

For me power monitoring should, like justice, not only be done but be seen 
to be done: I have gotten used to the screen display provided by 
mgeups-psp so I installed nut-2.2.2-pre2.x86_64.rpm and mgeups-psp-3.0.4-2

lsusb  reports
Bus 002 Device 002: ID 0463:ffff MGE UPS Systems UPS

Configuration files:

# /etc/ups/ups.conf
[mgeups]
	driver = usbhid-ups
	port = auto
	desc = "MGE Protection Center 750"
	vendorid = 0463

# /etc/ups/upsd.conf
ACL all 0.0.0.0/0
ACL localhost 127.0.0.1/32
ACCEPT localhost
REJECT all

# /etc/ups/upsmon.conf
MONITOR mgeups at localhost 1 monuser mgepass master
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +2 Arret systeme!"
NOTIFYCMD /usr/sbin/upssched
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
NOTIFYFLAG ONLINE SYSLOG+EXEC
NOTIFYFLAG ONBATT SYSLOG+EXEC
NOTIFYFLAG COMMOK IGNORE
NOTIFYFLAG COMMBAD IGNORE
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

# /etc/ups/upssched.conf
CMDSCRIPT /usr/sbin/upssched-cmd
#PIPEFN /var/state/ups/upssched.pipe
#LOCKFN /var/state/ups/upssched.lock
PIPEFN /var/run/ups/upssched.pipe
LOCKFN /var/run/ups/upssched.lock
AT ONBATT * START-TIMER ups-on-battery-timer 121
AT ONLINE * CANCEL-TIMER ups-on-battery-timer
AT ONBATT * EXECUTE ups-on-battery
AT ONLINE * EXECUTE ups-back-on-line

There is no /var/state in openSUSE 10.3, so I changed PIPEFN and LOCKFN to 
/var/run and defined directory /var/run/ups.

And now, flags waving and fireworks for the grand opening:

glacon2:~ # rcupsd start
Starting NUT UPS drivers             done
Starting NUT UPS server              done
Starting NUT UPS monitor             done

There is no sign of action by mgeups-psp, no window, no icon.

glacon2:~ # ps aux | grep ups
upsd  16455  16484 1004 ? Ss /usr/lib/ups/driver/usbhid-ups -a mgeups
upsd  16459  14328  720 ? Ss /usr/sbin/upsd -u upsd
root  16462  16168  696 ? Ss /usr/sbin/upsmon
upsd  16463  16592  816 ? S  /usr/sbin/upsmon

I wonder why upsmon is running twice?
In YaST2 -> System -> System Services (Runlevel) I set upsd 
"Enabled" and restarted the machine for a clean test. 
After restart, in /var/log/messages I see

usbhid-ups[3868]: Startup successful
upsd[3871]: listening on 0.0.0.0 port 3493
upsd[3871]: Connected to UPS [mgeups]: usbhid-ups-mgeups
upsd[3872]: Startup successful
upsmon[3875]: Startup successful
upsd[3872]: Connection from 127.0.0.1
upsd[3872]: Client monuser at 127.0.0.1 logged into UPS [mgeups]
upsmon[3876]: Master privileges unavailable on UPS [mgeups at localhost]
upsmon[3876]: Response: [ERR ACCESS-DENIED]

The directory /var/run/ups is empty. the command upsc reports:
glacon2:~ # upsc mgeups at localhost
battery.charge: 96
battery.charge.low: 30
battery.runtime: 7320
battery.type: PbAc
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.vendorid: 0463
driver.version: 2.2.2-pre2
driver.version.data: MGE HID 1.10
driver.version.internal: 0.33
input.transfer.high: 264
input.transfer.low: 184
outlet.0.desc: Main Outlet
outlet.0.id: 1
outlet.0.switchable: no
outlet.1.desc: PowerShare Outlet 1
outlet.1.id: 2
outlet.1.status: on
outlet.1.switchable: no
outlet.2.desc: PowerShare Outlet 2
output.frequency.nominal: 50
output.voltage: 230.0
output.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.load: 3
ups.mfr: MGE UPS SYSTEMS
ups.model: Ellipse 1500
ups.power.nominal: 1500
ups.productid: ffff
ups.serial: 000000000
ups.status: OL CHRG
ups.timer.shutdown: -1
ups.timer.start: -10
ups.vendorid: 0463

I disconnected the UPS from the wall and upsc reported
   ups.status: OB DISCHRG
but there is no notification of an impending shutdown and no shutdown.
In /var/log/messages, I see

Apr 20 15:29:55 glacon2 upsmon[3876]: UPS mgeups at localhost on battery
Apr 20 15:30:03 glacon2 upssched[5363]: Failed to connect to parent and 
failed to create parent: No such file or directory
Apr 20 15:34:34 glacon2 upsd[3872]: Connection from 127.0.0.1
Apr 20 15:34:34 glacon2 upsd[3872]: Client on 127.0.0.1 logged out

Directory /var/run/ups is still empty.  It looks as if I have a problem 
with upssched - any help would be much appreciated.

Roger



More information about the Nut-upsuser mailing list