USB UPS to openVZ

Guy

Renowned Member
Jan 15, 2009
121
1
83
m0guy.com
Hello,

I'm trying to get nut (Network UPS Tool) working on my centos 5 OpenVZ.

I've added the USB device to the devices list in the conf file after finding them with the "lsusb" command.

DEVICES="c:189:256:rw c:189:257:rw"

and restarted the virtual.

I then create the nodes on the virtual:

mkdir -p /dev/bus/usb/003/002
mknod 001 c 189 256
mknod 002 c 189 257

I can then see the UPS with the "lsusb" command under the virtual..

However when I attempt to start up nut I'm getting this:

# /usr/local/ups/bin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.4.1
Network UPS Tools - MGE UPS SYSTEMS/U-Talk driver 0.89 (2.4.1)
tcgetattr(/dev/bus/usb/003/002): Inappropriate ioctl for device
Driver failed to start (exit status=1)


Which seems to me to be an issue with the way I've routed the USB devices... though I've set it to RW..

Did I miss a step here? any help would be great..

Cheers,
---Guy
 
finally got the X64 version installed.. but I'm still getting the same failure...

# /usr/local/ups/bin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.4.1
Network UPS Tools - MGE UPS SYSTEMS/U-Talk driver 0.89 (2.4.1)
tcgetattr(/dev/bus/usb/003/002): Inappropriate ioctl for device
Driver failed to start (exit status=1)


---Guy
 
Good day!

I buy Ippon Back Power Pro 700.
Install Proxmox 1.4.
On HN install nut (may be on VE install better).

Copy files from /usr/share/doc/nut/examples to /etc/nut. Delete .example, unpak gz.

Then I edit /etc/default/nut:
# start upsd
START_UPSD=yes

# start upsmon
START_UPSMON=yes
Edit /etc/nut/ups.conf:
[ippon]
driver = megatec_usb
port = /dev/usb/hiddev0
desc = "Local UPS"
lowbatt = 10
Edit /etc/nut/upsd.users:
MONITOR ippon@localhost 1 upsmaster 1234567890 master
Add on the end of file /etc/nut/upsmon.conf:
MONITOR ippon@localhost 1 upsmon defupspasswd master
NOTIFYCMD /usr/local/sbin/callwall
NOTIFYFLAG ONLINE SYSLOG+EXEC
NOTIFYFLAG ONBATT SYSLOG+EXEC
NOTIFYFLAG LOWBATT SYSLOG+EXEC
Ok? Then
/etc/init.d/nut restart
Restarting Network UPS Tools: (upsdrvctl failed) upsd upsmon.
upsdrvctl start
Network UPS Tools - UPS driver controller 2.2.2
Network UPS Tools 2.2.2 - Megatec protocol driver 1.5.14 [megatec_usb]
Carlos Rodrigues (c) 2003-2008

Serial-over-USB transport layer for Megatec protocol driver [megatec_usb]
Andrey Lelikov (c) 2006, Alexander Gordeev (c) 2006-2007, Jon Gough (c) 2007

Megatec protocol UPS detected.
Startup timer elapsed, continuing...
May be you need "adduser nut root"...

Testing:
upsc ippon@localhost
It's all!
 
Last edited: