Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trouble getting NUT to shutdown (solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2155

PostPosted: Mon Aug 28, 2017 4:40 pm    Post subject: Trouble getting NUT to shutdown (solved) Reply with quote

Or do anything really.

I have a Tripp-Lite 1500 LCD connected via USB to a server, and NUT appears to be communicating:

Code:
# upsc tripplite@127.0.0.1
battery.charge: 21
battery.runtime: 225
battery.type: PbAC
battery.voltage: 25.3
battery.voltage.nominal: 24.0
device.mfr: Tripp Lite
device.model: Tripp Lite UPS
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.parameter.vendorid: 09ae
driver.version: 2.7.3
driver.version.data: TrippLite HID 0.81
driver.version.internal: 0.39
input.frequency: 59.8
input.voltage: 116.9
input.voltage.nominal: 120
output.frequency.nominal: 60
output.voltage: 116.8
output.voltage.nominal: 120
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.load: 33
ups.mfr: Tripp Lite
ups.model: Tripp Lite UPS
ups.power: 0.0
ups.power.nominal: 1500
ups.productid: 2012
ups.status: OL CHRG
ups.timer.reboot: 65535
ups.timer.shutdown: 65535
ups.vendorid: 09ae
ups.watchdog.status: 0


But I'm having issues conducting a shutdown test, where I unplug the UPS, and expect a shutdown from the server. The events are logged:

Code:
Aug 28 12:32:45 projector upsmon[3641]: Power lost
Aug 28 12:35:20 projector upsmon[3641]: System power restored


But when I unplug the server, I don't see anything happen, not even an event displayed on the console. Here is the config from upsmon.conf:

Code:
MONITOR tripplite@127.0.0.1 1 ups ********* master
FINALDELAY 5
MINSUPPLIES 1
POLLFREQ 5
POLLFREWALERT 5
HOSTSYNC 15
DEADTIME 15
SHUTDOWNCMD "/root/shutdown.sh"
NOTIFYMSG ONBATT "Power lost"
NOTIFYMSG SHUTDOWN "System shutdown in 2 minutes"
NOTIFYMSG ONLINE "System power restored"
NOTIFYFLAG ONLINE WALL+SYSLOG
NOTIFYFLAG ONBATT WALL+SYSLOG
NOTIFYFLAG SHUTDOWN WALL+SYSLOG
RUN_AS_USER root


Also, permissions should be set correctly on shutdown.sh:

Code:
# ls -la /root/shutdown.sh
-rwxr-xr-x 1 root root 69 Aug 28 12:22 /root/shutdown.sh


Any help is appreciated.
_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim


Last edited by Bigun on Tue Aug 29, 2017 1:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2155

PostPosted: Tue Aug 29, 2017 1:32 pm    Post subject: Reply with quote

I figured it out. NUT is performing as it should, it starts shutting down based on a threshold the battery reaches, which isn't how some UPS's are designed (high VA but maybe low battery uptime).

I used this site (https://srackham.wordpress.com/2013/02/27/configuring-nut-for-the-eaton-3s-ups-on-ubuntu-linux/) To set a time threshold (after x seconds of power being off, shut things down) instead of a battery threshold.
_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum