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.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-28 10:16 AM . Last Modified: 2024-03-15 06:00 AM
System:
Mac Mini Late 2014, macOS Mojave 10.14.6
APC SMT750IC, Firmware v 03.8, connected through APC USB Cable for communication with Mac Mini
Dear Supporters and Readers
I know that with macOS the binary "shutdown" doesn't truly work as supposed and declared in the "man" file.
Contrary to the statement in the "man" file, that with this command "shutdown -u", it says it does wait 5 minutes for the UPS to remove the mains power to get a "dirty shut down" to be able to automatically restart after mains returns, it doesn't wait that time.
So I have to build the hole process of quitting the different applications and handle the unmounting of the external drives.
During this test I figured out, that if the USB cable between the APC and the Mac Mini is connected at the time the UPS does tell the Mac Mini that the UPS runs on battery, the Mac Mini wont restart after the mains power from the UPS returns.If the USB cable is NOT connected and doesn't communicate with the Mac Mini, he will restart after the mains from the UPS returns.
So either the APC does send some hidden commands to the Mac Mini which affect this behavior or the macOS does behave outside of any normal human logic.
My settings for the UPS are as follows:
pmset -g ups
UPS settings:
haltlevel off 0
haltafter off 1
haltremain off 1
So the macOS own shutdown process shouldn't have any influence.
On the other hand, in the past, APC did have also a macOS version of its Power Chute application but since several years it's no more supported and as much as I know it also doesn't communicate over USB.
I did also try the OpenSource application "apcupsd" but also with this there are several timing problems as it does use some dummy USB driver to grab the signals from the APC and to communicate with it.
This kind of communication, modebus or plain USB is very very unstable and most of the time not usable.
Happened with several MacMini computers.
If anyone has a suggestion, helping information or a running system to explain how to get it to work, I'm happy toe hear from you.
At APC employees reading here, is there a way to send the shutdown command to the APC to remove mains power on command from within a bash script?
Thank you in advance
Regards
Thomas
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-28 10:16 AM . Last Modified: 2024-03-15 06:00 AM
I do answer my question myself.
I did not set the right settings with pmset for the UPS itself.
If the flag "autorestart 1" is set with the Energy Management of the System Extensions, this belongs ONLY for AC Power but NOT for UPS Battery Power.
To set this for the UPS Battery Power as well, you have to do it in the terminal with the command "sudo pmset -u autorestart 1"
To check other settings for energy behavior, use "pmset -g custom"and of course consult the man page for pmset or have a look here. https://www.dssw.co.uk/reference/pmset.html
With the help of the Mac OS Application Power Manager from https://www.dssw.co.uk/powermanager/ you can create specific shutdown rules for UPS status and Mac OS behaviour.
Hope that helps others.
Regards
Thomas
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-28 10:16 AM . Last Modified: 2024-03-15 06:00 AM
I do answer my question myself.
I did not set the right settings with pmset for the UPS itself.
If the flag "autorestart 1" is set with the Energy Management of the System Extensions, this belongs ONLY for AC Power but NOT for UPS Battery Power.
To set this for the UPS Battery Power as well, you have to do it in the terminal with the command "sudo pmset -u autorestart 1"
To check other settings for energy behavior, use "pmset -g custom"and of course consult the man page for pmset or have a look here. https://www.dssw.co.uk/reference/pmset.html
With the help of the Mac OS Application Power Manager from https://www.dssw.co.uk/powermanager/ you can create specific shutdown rules for UPS status and Mac OS behaviour.
Hope that helps others.
Regards
Thomas
Link copied. Please paste this link to share this article on your social media post.
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.