The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

UPS's! (new Q: linux scripting)

GdiguyGdiguy San Diego, CARegistered User regular
[edit: see new post on 2/25 below]

So I'm buying a UPS for a couple of rack-mounted servers we have in the lab, and I'm in need of advice / etc

What we have: 2 HP Proliant DL145's that I'd like to get onto a UPS (no, they're not currently on any kind of power backup, and yes, one went down with a power outage and took a hard drive with it a couple weeks ago)

Problem: I'm struggling to find documentation for what the actual current draw / psu wattage are. The part number on the psu is 361620-001, which some searching on HP's site indicates was replaced by a new part that's a 500W psu, so I'm assuming 500W should be a decent upper estimate; the actual draw is likely lower (obviously)


So questions:
1) Is there a significant difference between rack mounted UPS's (eg This 900W rack UPS) vs standing consumer grade ones (see this 900W other one)? The rack ones seem to be between twice and 3x the cost, is it worthwhile (keep in mind that these are servers that currently aren't on any kind of backup, and one is sitting out on a table as your base level of comparison - this isn't setting up an NSA-style server room i'm talking about here (and no, this setup was not my idea or responsibility, yes, this is a biology lab that had computational people but not really set up well)

2) Is 900-1000W probably going to work fine if the PSU's are ~500W?

I have one of those cyberpower ones at home for my desktop, I might bring it in (or just buy a voltage/watt reader) to figure out what the actual draw of these servers are, but anyone have any easier suggestions? Or can find the actual documentation online for the voltage/current draws of these things?

thanks :) this isn't really my area of expertise at all

Gdiguy on

Posts

  • FingerSlutFingerSlut __BANNED USERS regular
    edited February 2010
    for the love of God make sure its not a pain in the ass to replace the batteries.

    FingerSlut on
  • Xenogears of BoreXenogears of Bore Registered User regular
    edited February 2010
    Trying to tell me you can't find a watt reader someone in or around the lab?

    It would be a good idea. 900 probably should do the job. But yes, ease of battery replacement is the next most important thing beyond having one that adequately serves your servers.

    Xenogears of Bore on
    3DS CODE: 3093-7068-3576
  • travathiantravathian Registered User regular
    edited February 2010
    Trying to tell me you can't find a watt reader someone in or around the lab?

    In a biology lab?!?


    Just use APC's nifty tool to determine what you need. I would suggest using a Kill-a-watt or other device to actually measure your power usage. Using the max draw of the PSU in each server is a terrible fudge factor because you may end up spending a heck of a lot more than you need to.

    http://www.apc.com/tools/ups_selector/index.cfm

    The tool will let you know about the range you should look for, even if it is not an APC model. If you just have the two rack mount servers in a rack and not pressed for space, buy a consumer one and toss it in the bottom. Rack mount ones are more expensive because they have to squeeze a lot of bulky components into a restricted space, plus some of them come with nifty features it doesn't sound like you need.

    travathian on
  • GdiguyGdiguy San Diego, CARegistered User regular
    edited February 2010
    I hadn't seen that tool on the APC site before, thanks! They think that it shouldn't need more than ~275W, so I should definitely be good with anything even close... I'll still look for some way to measure the power draw, though

    Gdiguy on
  • TethTeth __BANNED USERS regular
    edited February 2010
    Honestly, just find a proper reseller and forward your question to them. You'll usually end up saving money going through one anyways.

    And as far as measuring power consumption, I wish I could help, but everywhere I've worked since 2003 we've had an actual infrastructure with PDU's that measure power consumption down to the socket. Last time I checked HP provided something called Power Regulator - I'm pretty sure it reported statistics to HP SIM (Insight Manager). And last meeting I had to sit through with HP reps, they pretty much opened up every component to SIM so that as long as the server has a license, you can access every feature.

    The DL145 line is really low, but it may come with a free license to SIM. If not maybe 30 days, In any event, here's where a reseller could come in handy again. And since I'm no longer involved with the purchasing of server hardware, I can't tell you if they're still charging the $150 or so for the SIM license. Wouldn't surprise me if BL and DL360+ comes with a SIM license for free and DL1xx either don't support it or you have to pay.

    Teth on
    #1
  • GdiguyGdiguy San Diego, CARegistered User regular
    edited February 2010
    You think it's cheaper than Amazon (for a desktop-style one, at least?)

    I brought in my one from home and measured, and the app on APC's website was fairly good - it rated the servers at ~275W, and measuring one over the past couple days it's been around ~160W, maybe peaking at ~180W


    Now going to the next step - the Cyberpower one that I have connects via USB to one of the servers, and upon power loss allows you to run a shell script and then shutdown the system. (edit: these are both Linux machines, I believe both are very old fedora core (3))

    The default shell script is spoilered below; what I need to add is a line that connects with another server and tells it to shut down as well (the ups is only connected to one via usb)

    I'm fairly proficient at perl, but I've never done shell scripting before, so while I'm currently trying to crash course myself on how to do this, if someone can write up a way to do this in 5 minutes it would be awesome
    #!/bin/sh
    echo "Warning: Utility power failure has occurred for a while, system will be shutdown soon!" | wall
    
    export RECEIPT_NAME
    export RECEIPT_ADDRESS
    export SENDER_ADDRESS
    
    #
    # If you want to receive event notification by e-mail, you must change 'ENABLE_EMAIL' item to 'yes'.
    # Note: After change 'ENABLE_EMAIL' item, you must asign 'RECEIPT_NAME', 'RECEIPT_ADDRESS', and
    # 'SENDER_ADDRESS' three items as below for the correct information.
    #
    
    # Enable to send e-mail
    ENABLE_EMAIL=no
    
    # Change your name at this itme.
    RECEIPT_NAME="user name"
    
    # Change mail receiver address at this itme.
    RECEIPT_ADDRESS=user_name@company.com
    
    # Change mail sender address at this itme.
    SENDER_ADDRESS=user_name@company.com
    
    # Execute the 'pwrstatd-email.sh' shell script
    if [ $ENABLE_EMAIL = yes ]; then
       /etc/pwrstatd-email.sh
    fi
    

    Gdiguy on
  • VistiVisti Registered User regular
    edited February 2010
    Can you ssh into the machine? Then you could:
    ssh user@remotebox 'shutdown -h now'
    

    Visti on
    [SIGPIC][/SIGPIC]
  • LuvTheMonkeyLuvTheMonkey High Sierra Serenade Registered User regular
    edited February 2010
    Another option would be to look into the wonderful Network UPS Tools package. Cross-platform between Linux and Windows, monitors a LARGE number of different brands (even Liebert has donated hardware to get a driver written, and CyberPower has as well), USB and serial monitoring, even Python bindings are available.


    SSH would work as well, but that's not as fun. :rotate:

    LuvTheMonkey on
    Molten variables hiss and roar. On my mind-forge, I hammer them into the greatsword Epistemology. Many are my foes this night.
    STEAM | GW2: Thalys
  • GdiguyGdiguy San Diego, CARegistered User regular
    edited February 2010
    Visti wrote: »
    Can you ssh into the machine? Then you could:
    ssh user@remotebox 'shutdown -h now'
    

    This is exactly what I want, though apparently you need to do some sort of key generation / exchange to be able to do it without having a password prompt... hooray for more complications

    *edit

    Figured it out, so for now this is somewhat solved; I'll update it with more questions if I have them :) thanks everyone

    Gdiguy on
Sign In or Register to comment.