Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84577members
353848posts

Shutdown UPS by command line

APC UPS Data Center & Enterprise Solutions Forum

Schneider Electric support forum for our Data Center and Business Power UPS, UPS Accessories, Software, Services, and associated commercial products designed to share knowledge, installation, and configuration.

Solved
Felipe_apc
Crewman
Crewman
0 Likes
7
1180

Shutdown UPS by command line

This was originally posted on APC forums on 4/18/2012


Hi all,

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)


Accepted Solutions
voidstar_apc
Janeway
Janeway
0 Likes
0
1179

Re: Shutdown UPS by command line

This was originally posted on APC forums on 4/27/2012


>
Hey, thanks for the answer too!

So, I have problems too with my aircon...
>

I don't know anything about aircon. Maybe someone else here can help with that.

>
I mean, the reboot command supous to shutdown the ups and than just turn on when the power is back, right?
>

I always thought "shutdown" sounds suspicious for that... it doesn't usually mean "turn back on later". Is that a common industry term?

On the network management card (NMC), "reboot" has typically meant "(1) turn off (2) if AC is not present then wait for AC (3) and then turn back on."
Lately we've been transitioning over to using the term "Shutdown with AC Restart" so you might see that in some places like switched outlet groups.

>
But, are there others situations that the ups will keep off when i use the reboot comand?...or other command........?
>

Reboot will never keep the UPS off. The command to do that is "off".

>
And about the SNMP, how can I use that? And with my Smart-UPS 3000 XL?
>

Well, if you're familiar with SNMP, you can enable it on the NMC and use the net-snmp tools for linux to send the commands. You'll need a copy of the [PowerNET MIB|http://www.apc.com/products/resource/include/techspec_index.cfm?base_sku=SFPMIB404].

Then you can take a look at upsAdvControlRebootUps (1.3.6.1.4.1.318.1.1.1.6.2.2)
Values:
1) noRebootUps
2) rebootUps
3) rebootUpsGracefully
4) rebootSyncGroupUps
5) rebootSyncGroupUpsGracefully

As an example, if your NMC has SNMP v1 enabled and allows the public community write-access to the device, then you could do this with the Net-SNMP set of tools:

snmpset -c public -v 1 IP_of_ups 1.3.6.1.4.1.318.1.1.1.6.2.2.0 i 3

I hope that helps.

See Answer In Context

7 Replies 7
BillP
Administrator Administrator
Administrator
0 Likes
0
1180

Re: Shutdown UPS by command line

This reply was originally posted by Angela on APC forums on 4/19/2012


with the AP9631, have you reviewed the command line interface guide here? i don't have much experience with scripting but you can communicate with the telnet or SSH command line interface on the AP9631 if you want and issue commands to the UPS.

http://www.apcmedia.com/salestools/PMAR-8P9G2C_R1_EN.pdf - this relates to version 5.1.7 of firmware (the latest) and its commands. you'd refer to the UPS or device commands.

before you do this though, do you have servers and other equipment attached to these UPSs that you need to shutdown gracefully before the UPS turns off? if so, you should be using powerchute network shutdown in conjunction with the UPS that has an AP9631. for the one using the USB cable, the UPS would gracefully shutdown the device attached to the UPS via that USB cable assuming you have configured it to communicate with the UPS correctly.

maybe you can elaborate what is connected to each UPS and what needs to happen with it before the UPS turns off?

Felipe_apc
Crewman
Crewman
0 Likes
0
1179

Re: Shutdown UPS by command line

This was originally posted on APC forums on 4/19/2012


Hey, thanks for the answer!

Well, heres my entire problem: I need to shutdown a few servers AND the two UPSes when the temperature get high in the room.
(Understood? sorry about the english lol)

BUUUUT, I just have Linux OSes. I have no Windows for the Server or Console PowerChute.

--------

About the AP9631 command lines, there is a command(ups -c off) that just turn the OUTPUT POWER off. Could this be a shutdown command?

BillP
Administrator Administrator
Administrator
0 Likes
0
1180

Re: Shutdown UPS by command line

This reply was originally posted by Angela on APC forums on 4/20/2012


you should be able to install powerchute network shutdown on some linux operating systems that we support and you could do that on an ambient temperature violation.

here is the latest powerchute network shutdown compatibility chart: http://www.apcmedia.com/salestools/SJHN-7AYQNP_R33_EN.pdf

keep in mind, powerchute business edition and network shutdown are different. network shutdown is what you use with a UPS with a network management card.

this software allows you to specify a shutdown on a particular client based on different events, including a temperature violation, and will also be able to turn the UPS off after its done shutting off itself.

here are the options for the ups command on the management card. a graceful shutdown refers to signaling any powerchute network shutdown clients to shut down before the UPS turns its output off. ups -c off will not be graceful and will drop a load on the UPS if attached.

ups -- Initiate UPS Control
ups -c
-r (UPS Runtime Calibration)
-s Start (UPS Selftest)
-st (UPS Status)
-a Start (Test UPS short alarm)

voidstar_apc
Janeway
Janeway
0 Likes
0
1180

Re: Shutdown UPS by command line

This was originally posted on APC forums on 4/20/2012


>
About the AP9631 command lines, there is a command(ups -c off) that just turn the OUTPUT POWER off. Could this be a shutdown command?
>

If you use the reboot command, the UPS will turn off and wait for power to return before turning back on.

Also, if you're familiar with SNMP, you could use that to command the network management card.

Felipe_apc
Crewman
Crewman
0 Likes
0
1180

Re: Shutdown UPS by command line

This was originally posted on APC forums on 4/25/2012


Hey, thanks for the answers!

Do you know where I can get a .rpm for PowerChute Network Shutdown? Or other types that I can download...?

About the ups commands on the management card, when you said "graceful shutdown", did you want to mean "ups -c GraceOff"??

"(...)ups -c off will not be graceful and will drop a load on the UPS if attached(...)" Sorry about the english, but could this be a shutdown? The ups c- off? What means "drop a load"? lol Thanks for the patience!

Felipe_apc
Crewman
Crewman
0 Likes
0
1180

Re: Shutdown UPS by command line

This was originally posted on APC forums on 4/25/2012


Hey, thanks for the answer too!

So, I have problems too with my aircon...
I mean, the reboot command supous to shutdown the ups and than just turn on when the power is back, right?
But, are there others situations that the ups will keep off when i use the reboot comand?...or other command........?

Thanks!

And about the SNMP, how can I use that? And with my Smart-UPS 3000 XL?

voidstar_apc
Janeway
Janeway
0 Likes
0
1180

Re: Shutdown UPS by command line

This was originally posted on APC forums on 4/27/2012


>
Hey, thanks for the answer too!

So, I have problems too with my aircon...
>

I don't know anything about aircon. Maybe someone else here can help with that.

>
I mean, the reboot command supous to shutdown the ups and than just turn on when the power is back, right?
>

I always thought "shutdown" sounds suspicious for that... it doesn't usually mean "turn back on later". Is that a common industry term?

On the network management card (NMC), "reboot" has typically meant "(1) turn off (2) if AC is not present then wait for AC (3) and then turn back on."
Lately we've been transitioning over to using the term "Shutdown with AC Restart" so you might see that in some places like switched outlet groups.

>
But, are there others situations that the ups will keep off when i use the reboot comand?...or other command........?
>

Reboot will never keep the UPS off. The command to do that is "off".

>
And about the SNMP, how can I use that? And with my Smart-UPS 3000 XL?
>

Well, if you're familiar with SNMP, you can enable it on the NMC and use the net-snmp tools for linux to send the commands. You'll need a copy of the [PowerNET MIB|http://www.apc.com/products/resource/include/techspec_index.cfm?base_sku=SFPMIB404].

Then you can take a look at upsAdvControlRebootUps (1.3.6.1.4.1.318.1.1.1.6.2.2)
Values:
1) noRebootUps
2) rebootUps
3) rebootUpsGracefully
4) rebootSyncGroupUps
5) rebootSyncGroupUpsGracefully

As an example, if your NMC has SNMP v1 enabled and allows the public community write-access to the device, then you could do this with the Net-SNMP set of tools:

snmpset -c public -v 1 IP_of_ups 1.3.6.1.4.1.318.1.1.1.6.2.2.0 i 3

I hope that helps.