Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
OPTI-UPS VS375C on Gentoo
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message

Joined: 08 Oct 2003
Posts: 171

PostPosted: Thu Feb 03, 2005 1:18 am    Post subject: OPTI-UPS VS375C on Gentoo Reply with quote

Gentooists and Googlers, here are my experiences on getting OPTI UPS units working on my Gentoo boxes. The models I have here are the cheap AU$90 VS375C.

Warning: Opti provides binary software for all the OSs they support! The CD they give you has the only version supporting Linux available. They don't provide a Linux version on the website. Opti provided me a link to the latest versions but it has its own catches. As far as I know (could find) there are no opensource UPS daemonsd that can talk to these UPSs. If you want to use opensource then buy an APC.

Note: The linux version is purely console (server) software. It is a daemon that speaks to the UPS via a serial cable. You have the ability to change shutdown etc via the console. To see a graphical view of the UPS status you need to make either use the CD version server software and run a Windows client. If you install Xtreme v3 then you can use a web browes to point to the server on port 9982 ( admin, pass:1234)

The cable: Opti provide you with a Windows RS-232 cable and claim you need to buy a AU$25 Linux cable to use Linux software. I dont think so. Mine works with both Windows and Linux. Just plug it into COM1 and it will work fine. It should really auto detect the port or use the console tool (powerconf) to point to your /dev/ttyS0.

The software: The Opti binaries live in an install package called (bizzar i know). I could not run this installer on either x86 or amd64 version of Gentoo. Lots of stupid error messages etc etc. Why couldn't they just tar.gz the thing up? Anyway, I booted a "Redhat" based distro in Vmware and installed it there from the CD, tar.gz the folder up (dnpower) and scp it over to Gentoo. Please be aware that OPTI modifies the /etc/inittab file to autostart the daemon (i don't like this at all - I chose not to do this). Depending on your version the software lives in either /etc/dnpower or /usr/bin/dnpower. I chose /usr/local/bin/dnpower as it is not a Gentoo package.
BTW, the v3 software is located here:
Use v3 if you can but you may come up against a problem with the mini web server component that refuses to start - stopping you from connecting to it with your browser (upsis). Try it otherwise use the CD version but I am unsure if a web browser can connect to it (didn't test it). !Update: Yes the webbrowser can connect to it. Copy the /usr/local/bin/dnpower/dnpower to your apache htdocs and you should be able to connect. With the CD version (v2.2) the pass is "public". What happens is the web components communicate to the daemon through sockets or even snmp (who knows).

Running the software: Goto to where the software lives and try and start the daemons (v3) - ./powersrv & ./upsagentd ./onevent ./upsis -s
Check they are running with ps aux.
If upsis wont start you may have the problem I am having on my Gentoo-x86:
axel@p3gway dnpower $ ./upsis
UPS Information Server
2005/02/03 12:03:02: smthttp: web server binding to address
2005/02/03 12:03:02: smthttp: opening HTTP service on port 9982...
2005/02/03 12:03:02: smthttp: could not open port 9982
2005/02/03 12:03:02: smthttp: Protocol not known
2005/02/03 12:03:02: smthttp: No such file or directory
I don't know why it does it but have given up trying to fix it. I run it on my Gentoo-amd64 (64bitOS with emu32 stuff) and it works fine? No idea.

Configuring: So now try running ./powerconf to configure the daemon. You should see a termcap UI that you use "tab" key to get around. If it complains on start then its usually a lack of libtermcap. Try emerging libtermcap-compat. Check what it needs with ldd powerconf.
From here on your on your own.

Conecting via http: You can either install the Windows client (make sure you install the provided Sun JRE - yes the exact version!) or fire up a web browser from Linux and connect to the UPS daemon - Enter the default user and pass (see above).
Enjoy. If upsis didn't start for you then there is no port 9982 and no graphical joy for you. If you work out why upsis won't start let me know!
The CD version doesn't run the upsis daemon, it is built into powersrv i think. Upsis is a butchered Xitami web server. I am pretty sure you can move the cgi and pages for Apache to serve - I will probably give this a shot soon.

Startup config: If you use v3 make sure that the software installer didn;t clobber your inittab. Instead I made a startup script in /etc/init.d/dnpower to start and stop the daemons. Just copy one of the existing scripts there and edit it to your liking. Mine starts the 4 daemons and kill -9 them to stop. rc-update them to the default runlevel and your done. If you get stuck and want a copy of mine try and email me.

If anyone has any solution to the upsis problem let me know - axelmasok at

Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum