UPS configuration

Paul042020

Contributor
Joined
May 4, 2020
Messages
118
Hello everyone,

I am setting up the UPS (Uninterruptible Power Supply) on my NAS.

1] When I did a test, I found the shutdown process quite brutal.
Here are my settings:
mode => switch to battery
timer => 120s
command => empty
UPS shutdown => yes

Initially I left this field empty because I thought that there was a default shutdown command and that it was a field to customize this command.
In fact, a shutdown command seems to have been sent after 120 seconds following the battery switch. The OS seems to have shut down (was it done??) when the UPS cut off all of a sudden. I found this abrupt because the server fans were still running when the UPS shut down. That's why I'm not sure if the OS and the hard drives had time to finish shutting down.

Is there any way to know which shutdown command is sent by the UPS service. Is it the same command as when shutting down the server normally?
The UPS is supposed to shut down after the system is shut down, why did it shut down while the fans were still running?

2] How to change the low battery level which is 30% by default.

Sincerely
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
118
Hello,


I found part of the answer. The command that tells the system to shut down is in /etc/local/nut/upsmon.conf :
SHUTDOWNCMD "/sbin/shutdown -p now"
On several tutorials, it is indicated to enter the following command in Services > UPS > paragraph "Shutdown" > "Shutdown command" fields :
/sbin/shutdown -h now

From the literature:
truenas% man shutdown
[...]
The following options are available:
[...]
-h The system is halted at the specified time.

-p The system is halted and the power is turned off (hardware
support required, otherwise the system is halted) at the
specified time.

I don't see the difference between these two commands.

Is there any point in putting a command in the : Services > UPS > paragraph "Shutdown" > "Shutdown command" fields ?

Regards
 
Joined
Oct 22, 2019
Messages
3,582
I left mine blank and it works fine.

Did you uncheck "Power off UPS"?
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
118
Yes, but I want the ups to turn off after the nas has turned off.
I did some more tests. It still seems that the nas is off when the ups is off, but there are 3 or 4 seconds between the two. So when I saw the fans still running, I think they were still coasting
Concerning the difference of the two orders do you have any idea ?
 
Top