OS2World OLD-STATIC-BACKUP Forum

OS/2 - Technical => Applications => Topic started by: RobertM on 2008.03.07, 21:17:37

Title: UPS's (Power Backup), the Web, REXX and more...
Post by: RobertM on 2008.03.07, 21:17:37
Hey all,

So... I'm finally getting around to properly setting up my servers and UPS's. I came upon a few big strokes of luck in the process... I'm going into at least a little detail about all so anyone else in similar situations can benefit:





One of our clients (who are responsible for their own power backup units) was advised to get an APC SmartUPS or better. They run an old generator during power outages, and it kicks on once a week for testing making a mess of the in-building power. What did they get? A CyberPower 650 dumb UPS. As a note to any considering one, if you have no real power issues but need some extra power backup time (or need a UPS that is cheap), maybe a CyberPower is OK for you. But a word of warning, they are cheap for a (multiple) reason(s). First, it cannot handle a 17" CRT and a desktop PC (which draws 250W) without beeping (the "no power, battery dead, shutting down" beep), turning on it's error light, and... yes, shutting off - all WHILE plugged in to AC power. Running just the PC works ok, but dont expect long run times on this tiny unit. Nothing wrong with the unit... just not designed to handle any real load for any length of time.

As a counterpoint, I got really lucky when CompUSA started closing stores... I got 3 APC SmartUPS 1400 RM2U units (rackmount 2U hight). All 3 are from 2000 - BUT, when plugging in the third and testing it, I found that it thought the batteries were fine, and they held charge quite nicely - one of the other two dies under load (but is reporting bad batteries), the other one dies at it's normal run time (but is reporting bad batteries)... the third one was never used. The cover plate wasnt even unboxed yet - hence I got really lucky... batteries are very cheap for these ($21USD each) so bringing the other 2 back to full usability will be cheap and easy - and I have one that is essentially brand new and was just sitting there. So... one stroke of luck really doesn't affect any of you - unless you happen to live near a CompUSA that hasnt closed - in which case, see what you can buy from their server room - most all had multiple SmartUPS1400's - and even if they have older batteries in them, 4 batteries per unit is only $84 - while the UPS will cost you near nothing.

The other biggest strokes of luck in this regard were related to my server, trying to use them and trying to automate some stuff.



First, I needed some way of text messaging myself (from the server) alerts as to power status (and other server related issues) to ensure my servers are always running. For this I found Igor Pool's wonderful RxWeb package. If you haven't tried it - or you run a web server and use PHP/Perl/whatever, it is worth checking out!!!! Igor makes many tasks very very simple, and adding functionality to any web server on OS/2, even if everything else is PHP or Perl based, is very very easy - and worth the ease and simplicity his RxWeb package provides... including things like PDF generation, email functionality, forms parsing and tons more. Check it out!!!





Second, I found out something neat about my IBM Server - which if any of you out there run a similar (or probably a newer) model IBM, you may find the same. I have an IBM Netfinity 7000 M10 and an x440. Both have inputs for 2 power cords. Neither have external inputs on the power supplies. The power cords get plugged into a power controller unit - which THEN powers one or more of the power supplies (usually at least one is redundant... 2 in the case of some fully configured 7000 M10 series). What is so great about that you ask? Well, I set up 2 UPS units and plugged one cord into one UPS, the 2nd cord into the 2nd UPS... turns out, the Netfinity only pulls from one cord at a time. What that means is I can let the Netfinity drain one UPS, and when that UPS shuts off, the Netfinity will automatically switch to the 2nd one (which is still in the high 90% range since nothing has been using it), thus extending my run time pretty decently (buying ONE UPS that lasts as long as these two is a lot, lot more expensive). It also means I can have the Netfinity monitor the first, and when the first runs dead (or is close to it) start doing things like warning me (which gives me 25 minutes till the next dies to intervene in some way) or like properly closing connections to the MySQL server and shutting it down - or numerous other things as your heart and scripting abilities desire/allow.

As a side note, the IBM Server (which can usually be picked up on eBay really cheap) are designed to do FAR more than a "build it yourself" or "desktop tower" server... for instance, besides always keeping a charge for the system management board to alert you that it is off and not powered, it maintains a charge for numerous other things, including input power switchover (ie: in my scenario, when UPS1 dies, the Netfinity doesnt even need to know, it will just auto-switch to the other input), and line filtering - including being able to handle a 10KV line surge. For a couple hundred bucks you can pick up a 4 or 8 way unit on eBay (shipping will cost you - they ARE heavy).






The final part of that puzzle was decent UPS monitoring software. I was using APC's PowerChute. It is slow, clunky and not very configurable - nor is it the best at interacting with external scripts or anything else (unless you count sending a message via NetBIOS - for which you would need a program reading it to determine what you do next) - or just be limited with the "Shut down file systems, turn off unit" capability. Besides being slow, clunky, taking forever to start or shut down, not being configurable, limiting what options you could display on the bar graphs at one time, not updating information nearly quick enough (half a minute? minutes sometimes?), requiring the machine to be logged on to avoid getting annoying messages about it not being logged on - and a horrendous price tag, if like me, you dont have the original disks that came with the UPS and need to get a copy from APC (yeah folks, APC makes you PAY for the OS/2 version... others are free).

As an FYI, I found that option unacceptable for my database. So I looked into alternative UPS Monitoring Software and found Lone Peak Automation's quick, stable, scriptable and highly configurable UPSMonitor. It comes in multiple "flavors" (for different types of UPSs) and supports event scripting, as well as passing UPS status messages to anything that can read REXX shared memory.

Using that, I can watch what the UPS is doing (every 4 seconds if I so choose) and then decide what I want the server to do... call xShutdown (which properly closes MySQL), call my own shutdown routines, call Igor's RxWeb to text me, tell the backup server that if it has more runtime to take over and then shut down the aliased IP address on the main server, display neat widgets on the desktop using Chris W.'s wonderful WPSWizard, display a status/info bar on the xCenter, pop up a full screen - or windowed or Full Screen CMDLine session warning me, beep, call BackTalk's REXX subsystem to have it warn me in "semi-human" speech, play a wave file... (or all of the above, like I am implementing)... anyway you get the point... the limit to what you can do is entirely based off the limit of what you can imagine and what you can make REXX do for you - with the help of packages like LPA's and Igor's that is.


So, all in all, I am very happy right now - and I suggest anyone with a UPS check out Lone Peak Automation's site... and anyone with a web server check out Igor Pool's RxWeb. And anyone who finds them useful, click the donate button on their sites... not just did they not let their tools become abandonware, but they decided to make them free to anyone - with the option to donate if one wanted to - AND have both been very helpful and quick to reply to any questions I had. Great guys, great software, and much thanks from me for not abandoning the OS/2 and eCS community!

-Robert