Shutdown UPS by command line

Discussion in 'UPS Discussions' started by FelipeTersa, Apr 19, 2012.

  1. FelipeTersa

    FelipeTersa New Member

    Hi all,

    I want to know about UPSes from American Power Conversion

    I have a Smart-UPS RT 6000 XL connected with a Linux Server by network cable and a Network Management Card 2 AP9631.
    I have too a Smart-UPS 3000 XL connected with another Linux Server by 940-0127E FCI cable (USB).

    My whole system is based in Linux OS (Fedora).

    My problem is: I want to know how I can, by command line (by terminal, shell), shutdown these two UPSes.
    I've tried PowerChute, but PC Server and Console Edition run just in Windows, right?

    By the way, i'd want a command that I could turn on the UPSes, after they be shutted down, just pressing the power button(by physical way).

    Thank you all!!
    (Sorry about my english, its very defective)

    (I want to do this for protection's issues)
  2. Bubblehead

    Bubblehead My Senior Picture

    This is easily fixed by soaking these units in a light saline solution.
    Be sure they are plugged in while soaking.
  3. ikoi62

    ikoi62 Member

    so are your reading
  4. cachsux

    cachsux Wah

    The Off-line SBS
    The Off-line SBS offers the bare bones power protection of basic surge protection and battery backup. Through this type of SBS your equipment is connected directly to incoming utility power with the same voltage transient clamping devices used in a common surge protected plug strip connected across the power line. When the incoming utility voltage falls below a predetermined level the SBS turns on its internal DC-AC inverter circuitry, which is powered from an internal storage battery. The SBS then mechanically switches the connected equipment on to its DC-AC inverter output. The switch over time is stated by most manufacturers as being less than 4 milliseconds, but typically can be as long as 25 milliseconds depending on the amount of time it takes the SBS to detect the lost utility voltage.
    When selecting this type of an SBS, be aware that your computer equipment, as well as most electronic equipment is designed for use in the United States. As such it was designed to operate from a 120 volt, 60 Hertz (Hz), sinewave utility source. Most Off-line SBS products on the market today only provide a sinewave output to your equipment when operating normally from the utility line. When they switch to their internal DC-AC inverter they may only provide a square wave, modified square wave or quasi-sinewave, not a pure sinewave. In many cases your equipment may appear to operate normally on these waveforms, but over time may be damaged by them. If you decide only minimal protection is needed, an off-line SBS offers, it is always best to select an SBS or UPS that states it has an inverter with a true sinewave output. You should also be aware that most off-line SBS units will not be capable of accepting additional battery packs for extended battery operation. To keep the cost down and prevent overheating, their inverters are designed to only operate as long as the internal battery capacity allows. For your reference units of all three design types typically provide from 5 to 15 minutes of battery back-up time when loaded to their full output capacity. Slightly longer backup times can be achieved by overrating the SBS or UPS size.
    The Line-Interactive SBS
    The Line-interactive SBS offers the same bare bones surge protection and battery back-up as the offline, except it has the added feature of minimal voltage regulation while the SBS is operating from the utility source. This SBS design came about due to the off-line SBSs inability to provide an acceptable output voltage to the connected equipment during “brown-out” conditions. A “brown-out” happens when the utility voltage remains excessively low for a sustained period. Under these conditions the off-line SBS would go to battery operation and if the brown-out was sustained long enough, the SBS battery would become fully discharged, turn the power off to the connected equipment and not be able to be turned back on until the utility voltage returned to normal. To prevent this from happening a voltage regulating transformer was added, hence the term line-interactive was born. This feature really does help as low voltage utility conditions are common. The down side for this design, most of the units available have to switch to battery momentarily when making transformer voltage adjustments and this can be a bit annoying in a quiet home office on a bad power day.
    Again when selecting a Line-interactive SBS it is always best to select a model with a true sinewave output. Several manufacturers have models available that will accept extended battery packs to provide additional battery runtime. This type of SBS typically costs more than the off-line type, but is worth the additional cost.
    The On-line UPS
    The On-line UPS provides the highest level of power protection for the serious home office user. It does typically cost more, but like all electronic equipment today the cost is coming down as the technology advances. The true advantage to the on-line UPS is its ability to provide an electrical firewall between the incoming utility power and your sensitive electronic equipment. While the off-line and line-interactive designs leaves your equipment connected directly to the utility power with minimal surge protection, the On-line UPS provides an electronic layer of insulation from power quality problems. This is accomplished inside the UPS in several tiers of circuits.
    First the incoming AC utility voltage is passed through surge protected rectifier stage where it is converter to a Direct Current (DC) and is heavily filtered by large capacitors. This tier removes line noise, high voltage transients, harmonic distortion and all 50/60 Hertz frequency related problems. The capacitors also act as an energy storage reservoir giving the UPS the ability to “ride-through” momentary power interruptions. The battery is also connected to this tier and takes over as the energy source in the event of a utility loss. This makes the transition between utility and battery power seamless, without an interruption.
  5. curiousbrain

    curiousbrain Well-Known Member

    Start looking here: Software / Firmware

    This lists some PowerChute software that will run on Linux, and most likely Fedora; I stress that this was just a simple Google search. A decent rule of thumb on Linux is that if it exists in the private sector, there is more than likely an open-source version (or the beginnings of one) somewhere. Check Ubuntu software repo's, SourceForge, Google Code, places like that ... it probably exists somewhere.

    If PowerChute absolutely will not run, then see if your manual lists a default network location for the UPS; it might be possible to telnet to it on the default (23, iirc) or other arbitrary port. From there, you might glean additional information. Assuming you have some success with that, it is occasionally possible to setup a '/dev/xyz' device or other I/O device (maybe via /sys these days), and then write a bash (or other sh version) script to echo commands out/through it, in hex format; so, one might imagine something like:

    echo 0x01 > /dev/blah

    to turn the device on.

    edit: Oh yeah, I left out the most obvious thing: this forum is actually for UPS, the company, not UPS, the device. But, I will never waste an opportunity to blather on about .... things ...
  6. splozi

    splozi Guest

    7 days 'till Ubuntu 12.04!!!
  7. UpstateNYUPSer

    UpstateNYUPSer Very proud grandfather.

    cachsux, your copy and paste skills rival those of the master.

    Good job.
  8. faded jeans

    faded jeans just a member

    You're start and smupid all at the same time!
  9. Johney

    Johney Well-Known Member

    I call BS, I think he actually knows all that info:wink2:.
  10. Cementups

    Cementups Box Monkey

    This may be the funniest thread I've seen in at least a week. ha ha ha
  11. cachsux

    cachsux Wah

    #1: Power capacity
    When reviewing UPS options, volts-amperes/wattage should be the first consideration (volts-amperes/wattage indicates a device's power capacity). An underpowered UPS can't properly prevent data loss resulting from unintended shutdowns. For that reason, it's critical that a UPS be matched well with the power loads it must support.
    APC, a leading vendor of UPS devices, recommends deploying a UPS boasting a minimum of 510 volt-amperes (VA) and 357 watts to support a common Dell PowerEdge 1850 1U server setup and a 14-inch LCD. APC's 1000 VA/600 watt rackmount/tower UPS could operate such a setup for an estimated 15 minutes.
    Small businesses using a tower PC as a workstation server (with a 15-inch LCD) might select a 350VA/200 watt UPS. With that power capacity, the small business could expect the UPS to power the system for approximately six minutes, or long enough to complete a proper shutdown.
    When calculating your network's electrical requirements, be sure to account for additional equipment and peripherals that must continue operating, at least for a short period, during an outage. Examples of such easily forgotten equipment include external hard disks, KVM switches, storage area network appliances, and routers and switches enabling servers to complete communications before shutting down.
    #2: Outlet capacity
    UPS devices, of course, provide power outlets that supply electricity to computers and peripherals when the main electrical supply fails. Many UPS models also feature surge-protected outlets that protect connected equipment from damaging spikes.
    Technology professionals typically calculate the number of required battery backup outlets properly, as the UPS device's main purpose is to power the systems attached to them. The number of surge-protected outlets needed is easily overlooked.
    The number of power outlets a UPS (and surge protection device) possesses is quickly exceeded, so be sure to review your current network setup before purchasing a UPS. Don't forget to allow for broadband modem, switch, firewall, KVM, and external hard disk power supplies in calculating the total number of required surge-protected outlets.
    [h=2]#3: Electrical protection[/h]
    Computers and related peripherals are typically designed to receive 120 volts of AC power at 60 Hertz. The actual electricity a wall outlet provides, however, can vary significantly from that baseline.
    Surge protectors regulate the power quality supplied to computers and peripherals, while many UPS models actually tune and condition the electricity they supply to attached equipment. Surge protectors also block voltage levels exceeding specific thresholds (as do UPSes). High quality surge protectors (and UPSes) even prevent damage occurring from lightning strikes. Be sure to review a UPS/surge protector's technical specifications to ensure the device protects against lightning damage; if a model does not cover lightning strikes, continue searching for one that does.
    When a surge protector or UPS sustains a particularly powerful spike, the protector's internal mechanisms can be damaged. Subsequently, the unit may no longer function correctly, thereby leaving connected equipment subject to damage from future spikes and surges. Seek models that include failsafe technologies in the event that internal mechanisms become compromised. Some models disconnect equipment attached to failed outlets, while other brands may include warning lights.
    Field experience demonstrates that surge protectors, in particular, frequently surrender their operational lives in saving attached equipment from destruction. But it's not always possible to know that a protective power strip is no longer functioning properly. Thus, such failsafe technology proves critical.
    [h=2]#4: Data line protection[/h]
    Gone are the days of just protecting computers and monitors from electrical spikes. Broadband links and even dial-up fax/modems (in servers, PCs, and laptops) provide common inroads for destructive electrical spikes.
    If a computer is connected to a powerful UPS, but an associated DSL, cable, telephone, or other telecommunications circuit goes unprotected, even the most potent UPS can prove worthless. While the computers themselves might be protected from direct spikes, it's incredibly easy (and common) for lightning strikes to discharge through a cable modem, DSL, or other telecommunications link. Once in a network, the indirect damage can prove devastating as the spike travels Ethernet cables and toasts everything in its path, including network switches, NICs, motherboards, video cards, routers, and more.
    I've seen it happen, and colleagues even report removing black-singed Ethernet cables from systems. Avoid such occurrences by selecting a UPS that offers data line lightning protection.
    #5: Bundled software
    The software bundled with a UPS often makes the difference between a UPS serving as a simple protective mechanism versus a sophisticated data reporting device. While a UPS' job is to condition the power supply provided by a local utility for use by sensitive electronic equipment and to provide emergency power when the main electrical supply fails, higher quality uninterruptible power supplies also include sophisticated software (Figure A).
    Belkin's Sentry Bulldog Monitor reports on the battery's charge and the UPS' load level, input voltage, and operating temperature.
    Such software can report the electricity supply's condition, including input and output voltage, input and output frequencies, and load levels. Strong software also enables supporting network connectivity to a UPS and alarm configuration (as I'll discuss in greater detail shortly).
    Most UPSes also include an application that enables specifying actions to take if the power sags or fails. Many organizations can't monitor PCs and servers 24x7, so programming a UPS to automatically shut down an attached PC or server proves more than convenient; it can mean the difference between corrupting a database and losing information or properly shutting down database, file, and mail servers with no data loss.
    A SOHO should require such software be included with any UPS it purchases. Large organizations, meanwhile, may have more sophisticated fault-tolerant systems in place, but many may choose to leverage the UPS-provided application to properly shut down systems.
    [h=2]#6: Equipment protection warranty[/h]
    It seems like a no-brainer, but warranties vary widely. When purchasing a surge protector or UPS, review the manufacturer's equipment protection warranty and any applicable limitations. Always register a surge protector or UPS the day it's deployed, too; otherwise, collecting reimbursement should damage occur could prove impossible.
    #7: Alarm capabilities
    UPS devices possessing the appropriate software can report when thresholds for a number of values, including voltage fluctuations, brownouts, blackouts, loading levels, operating temperatures, and battery strength, are exceeded. (Figure B) In addition to audible tones, alarms can be configured to send administrators e-mail messages if specified thresholds are exceeded. These alarms can prove invaluable in alerting users that problems are afoot, as potentially damaging power fluctuations don't always result in more attention-getting outages.
    APC's PowerChute software, which is included with many of its SOHO model UPS systems, enables setting audible alarms for specific situations.
    #8: UPS type
    UPSes essentially leverage two operating technologies: offline and online. The difference relates to the way a UPS powers attached equipment.
    Typically, a UPS receives electricity from a wall outlet powered by a local energy utility. The utility-supplied electricity is converted from AC to DC by a rectifier inside the UPS device. The rectifier's DC power then passes to an inverter (which is connected to the actual computer equipment the UPS protects and powers) and a series of batteries. In some models a flywheel substitutes for batteries. When the utility-supplied electricity fails, battery power (or a flywheel) kicks in to supply the energy the inverter distributes to attached equipment.
    Standby models, often referred to as offline devices, don't continually engage the system's battery. Instead, standby UPSes tap battery power only when electrical outages occur. They transfer operation from utility to battery power so fast, though, that a PC typically continues operating until it's shut down or the UPS runs out of juice. Occasionally, even a short sub-100 millisecond delay in switching power sources can cause hiccups and potential data loss. Offline models tend to cost less than line-interactive devices.
    With online (also known as line-interactive or continuous) models, the battery continuously provides the electricity used by the inverter to power equipment attached to the UPS device. The battery is continuously charged as the device operates. Should the principal electrical source fail, the battery continues providing electricity until its charge depletes. Line-interactive models provide a cleaner and more consistent energy source than standby models and consequently cost much more.
    If you're operating within a SOHO environment, a standby model will likely meet all your needs. In mission-critical environments or larger enterprises, line-interactive models are typically required.
  12. UpstateNYUPSer

    UpstateNYUPSer Very proud grandfather.

    OK, now you're just showing off.
  13. cachsux

    cachsux Wah

    show v. showed, shown or showed, show·ing, shows a. To cause or allow to be seen; display.
    b. To display for sale, in exhibition, or in competition: showed her most recent paintings.

    2. To conduct; guide: showed them to the table.
    3. To direct one's attention to; point out: show them the biggest squash in the garden.
    4. To manifest (an emotion or condition, for example); reveal: showed displeasure at his remark; a carpet that shows wear.
    5. To permit access to (a house, for example) when offering for sale or rent.
    6. To reveal (oneself) as in one's behavior or condition: The old boat showed itself to be seaworthy.
    7. To indicate; register: The altimeter showed that the plane was descending.
    8. a. To demonstrate by reasoning or procedure: showed that the hypothesis was wrong; a film that showed how to tune a piano.
    b. To demonstrate to by reasoning or procedure; inform or prove to: showed him how to fix the camera; showed her that it could really happen.

    9. To grant; bestow: showed no mercy to the traitors.
    10. Law To plead; allege: show cause.

    v.intr.1. To be or become visible or evident.
    2. Slang To make an appearance; show up: didn't show for her appointment.
    3. a. To be exhibited publicly: What's showing at the movie theater tonight?
    b. To give a performance or present an exhibition.

    4. Sports To finish third or better in a horserace or dog race.

    n.1. A display; a manifestation: made a show of strength.
    2. a. A trace or indication, as of oil in a well.
    b. The discharge of bloody mucus from the vagina indicating the start of labor.
    c. The first discharge of blood in menstruation.

    3. A false appearance; a pretense: only a show of kindness.
    4. a. A striking appearance or display; a spectacle.
    b. A pompous or ostentatious display.

    5. Display or outward appearance: This antique tea service is just for show. His smile was for show.
    6. a. A public exhibition or entertainment.
    b. An exposition for the display or demonstration of commercial products: an auto show.
    c. A usually competitive exhibition of domestic animals: won first place at the cat show.

    7. a. A radio or television program.
    b. A movie.
    c. A theatrical troupe or company.

    8. Informal An affair or undertaking: ran the whole show.
    9. Sports Third place at the finish, as in a horserace.

    Phrasal Verbs: show offTo display or behave in an ostentatious or conspicuous way.

    show up1. To be clearly visible.
    2. To put in an appearance; arrive.
    3. To expose or reveal the true character or nature of: showed their efforts up as a waste of time.
    4. Informal To surpass, as in ability or intelligence.

    Idioms: get the show on the road Slang To get started.

    show (one's) hand1. Games To display one's cards with faces up.
    2. To state one's intentions or reveal one's resources, especially when previously hidden.

    show (one's) heelsTo depart from quickly; flee.

    show (someone) a good timeTo occupy (someone) with amusing things; entertain.

    Synonyms: show, display, expose, parade, exhibit, flaunt
    These verbs mean to present something to view. Show is the most general: "She hated to show her feelings" (John Galsworthy).
    Display often suggests an attempt to present something to best advantage: The dealer spread the rug out to display the pattern.
    usually involves uncovering something or bringing it out from concealment: The excavation exposed a staggering number of artifacts.
    The term can often imply revelation of something better left concealed: Your comment exposes your insensitivity.
    usually suggests a pretentious or boastful presentation: "He early discovered that, by parading his unhappiness before the multitude, he produced an immense sensation" (Thomas Macaulay).
    Exhibit implies open presentation that invites inspection: "The works of art, by being publicly exhibited and offered for sale, are becoming articles of trade" (Prince Albert).
    Flaunt implies an unabashed, prideful, often arrogant display: "Every great hostelry flaunted the flag of some foreign potentate" (John Dos Passos). See Also Synonyms at appear.

    n show-offInformal a person who makes a vain display of himself
  14. splozi

    splozi Guest

    pe·nis [pee-nis]

    noun, plural pe·nis·es, pe·nes  [-neez]
    the male organ of copulation and, in mammals, of urinary excretion.

    1685–95; < Latin pēnis tail, penis

    Related forms
    pe·nile  [peen-l, pee-nahyl] pe·ni·al [pee-nee-uhl] adjective

    Can be confused:  penal, penile .
  15. TearsInRain

    TearsInRain IE boogeyman

    you have to be a masochist to use Linux
  16. splozi

    splozi Guest

    Linux distros of today are not what they were 12 years ago.
    Everything is streamlined to the point of being over-simplistic.

    After I built my new computer around new year (from extra money earned driver helping, yeehaw), I started messing with Ubuntu for the first time in a couple of years. Eventually I settled on xubuntu which uses the (light) xfce window manager. Friggin'... awesome...

    Once you figure out what applications you need to do what you want to do, it's better than windows ten times over (imo).

    I mess around with different things a lot that sometimes I end up screwing something up. So I've had to reinstall a few times. I've gotten to the point to where after a reinstall, I can get everything up and running the way it was before in about 2 hours... all because of the way configuration files are stored in /home. I don't have to reconfigure very much at all. Just move old configs over, reinstall my programs through the software center, and BAM.

    The only part of the masochist thing that is true for me is the SEXUAL THRILL! THE SEXUAL THRILL!

    hehe, Family Guy.
  17. menotyou

    menotyou bella amicizia

    Why am I giggling? :rofl:
  18. Johney

    Johney Well-Known Member

    I'm not touching that one......literally.
  19. Jackburton

    Jackburton Gone Fish'n

    This is who I need to do safety questions with.
  20. curiousbrain

    curiousbrain Well-Known Member

    If you really want to screw things up with linux, start messing with /etc; or, /etc/boot[.d]/; when you can't boot your system anymore from LILO or GRUB, then you know you're on to something; from there, reinstall takes a lot more time.

    If you like that sort of thing, try Slackware.