Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Shutdown UPS by command line

APC UPS Data Center & Enterprise Solutions Forum

Schneider, APC support forum to share knowledge about installation and configuration for Data Center and Business Power UPSs, Accessories, Software, Services.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results forย 
Showย ย onlyย  | Search instead forย 
Did you mean:ย 
  • Home
  • Schneider Electric Community
  • APC UPS, Critical Power, Cooling and Racks
  • APC UPS Data Center & Enterprise Solutions Forum
  • Shutdown UPS by command line
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
BillP
Administrator BillP Administrator
5060
voidstar_apc
Janeway voidstar_apc
196
Erasmus_apc
Sisko Erasmus_apc
112
TheNotoriousKMP_apc
Sisko TheNotoriousKMP_apc
108
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to APC UPS Data Center & Enterprise Solutions Forum
Solved
Anonymous user
Not applicable

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:56 AM

0 Likes
8
6245
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:56 AM

Shutdown UPS by command line

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)

Labels
  • Labels:
  • UPS Management Devices & PowerChute Software
  • Tags:
  • apc
  • command
  • linux
  • shutdown
  • shutting_down
  • shutting_down_ups
  • terminal
  • ups
Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
voidstar_apc
Janeway voidstar_apc
Janeway

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:55 AM

0 Likes
0
6243
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:55 AM

>
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

Reply

Link copied. Please paste this link to share this article on your social media post.

Replies 8
BillP
Administrator BillP Administrator
Administrator

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:56 AM

0 Likes
0
6244
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:56 AM

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?

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:56 AM

0 Likes
0
6243
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:56 AM

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?

Reply

Link copied. Please paste this link to share this article on your social media post.

BillP
Administrator BillP Administrator
Administrator

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:56 AM

0 Likes
0
6244
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:56 AM

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)

Reply

Link copied. Please paste this link to share this article on your social media post.

voidstar_apc
Janeway voidstar_apc
Janeway

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:56 AM

0 Likes
0
6244
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:56 AM

>
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.

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:55 AM

0 Likes
0
6244
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:55 AM

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!

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:55 AM

0 Likes
0
6244
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:55 AM

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?

Reply

Link copied. Please paste this link to share this article on your social media post.

voidstar_apc
Janeway voidstar_apc
Janeway

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:55 AM

0 Likes
0
6244
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-07-01 01:15 AM . Last Modified: โ€Ž2024-03-06 01:55 AM

>
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.

Reply

Link copied. Please paste this link to share this article on your social media post.

abc123321cba
abc123321cba
Cadet

Posted: โ€Ž2023-02-01 07:40 AM

0 Likes
0
4972
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2023-02-01 07:40 AM

*ssh quick fix - for control of smar-ups with an older mgmt card.

 

Provided you have allready installed [expect] and [sshpass] on your linux machine and having credentials to connect via ssh to youCoolAPC --- do:

 

#!/usr/bin/expect

# i have an older UPS Network Management Card 2 with cypher issues but in a safe env. all is good.

## in passfile you have the password only, nothing more. (*ssh password to your ssh user that is)

 

spawn sshpass -f ./passfile ssh -c aes256-cbc -c 3des-cbc -oHostKeyAlgorithms=+ssh-rsa  [username]@[APC_card_ip]

expect "$ "
send "ups -c sleep\r"
expect "$ "
send "exit\r"

 

## be pacient 30 sec as the script dont have instant effect. In the meantime 1xCupCaffe as you made this work ๐Ÿ™‚

Reply

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

ย 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings ยฉ 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of