Lee Gold
2013-Aug-09 18:29 UTC
[Nut-upsuser] Get Nut to Shutdown Computer After a Few Minutes on Battery
Hi, I tried to do the minimum configuration for Nut. When I stop the on-line power i get terminal message that I'm on battery power and when I plug on-line power back in I get a message that I'm back to on-line power. So things are working/communicating. What I want is: if it's been on battery power for over 5 minutes the PC will shutdown. If powers comes on-line again before the 5 min of battery then things should reset. I tried many web on-line examples and docs. but can't get it working. I would be grateful for help. I would like the most simple, understandable way to do it. I'll cite my files and info below. Thank You so much. Unbuntu 12.04 Server, nut 2.6.3, Cyperpower CP1500AVRLCD, no slaves just the one server PC. nut.conf MODE=standalone ----- ups.conf: [cyberpower-1500] driver = usbhid-ups port = auto ----- upsd.conf: LISTEN 127.0.0.1 3493 LISTEN ::1 3493 ----- upsd.users: [monuser] password = xxxxx allowfrom = local upsmon master ----- re: upsmon.conf Note: I've attempted many things in upsmon.conf but could not get the custom shutdown I want working. I've taken my attempts out except for the one line I added cited below.. I do see many configuration lines in this file uncommented by default in this file, I assume these lines are OK for my system - so the only change I have now to this file is the added line cited. upsmon.conf: MONITOR cyberpower-1500 at localhost 1 monuser takoma master ----- re:upssched.conf CMDSCRIPT /bin/upssched-cmd By default this line was uncommented, I continue to leave it uncommented - I assume if I use "CMDSCRIPT" again later on in the file then this line would be overwritten/superseded, but I'm not sure---just wanted to mention this. I've tried many things - it didn't work. What do I put in this file? I thought adding: PIPEFN /var/run/nut/upssched/upssched.pipe LOCKFN /var/run/nut/upssched/upssched.lock AT ONBATT * START-TIMER onbatt 300 AT ONLINE * CANCEL-TIMER onbatt But I obviously don't know... upssched.conf: ???? Help appreciated. ----------------- -- http://www.fastmail.fm - Faster than the air-speed velocity of an unladen european swallow
Lee Gold
2013-Aug-10 01:25 UTC
[Nut-upsuser] Get Nut to Shutdown Computer After a Few Minutes on Battery
Hi, Also to add to my question: The documentation says I should have a file name upssched-cmd on my system. But there is no file named that on my system. I installed via apt-get install nut if that's relevant. If it turns out I should uninstall everything and install via "make" then I'll do that, it's happened before that the package install doesn't do things right. Either way I would appreciate support please. -- http://www.fastmail.fm - Choose from over 50 domains or use your own
Lee Gold
2013-Aug-10 03:36 UTC
[Nut-upsuser] Solved ( I think) - Get Nut to Shutdown Computer After a Few Minutes on Battery
Hi, I am thankful for this support mail-list and I realize that there was not sufficient time for anyone to respond to my setup question. In any event I just used a bash script to control the shutdown following the instructions at: http://srackham.wordpress.com/2013/02/27/configuring-nut-for-the-eaton-3s-ups-on-ubuntu-linux/ and it worked. So I think it's solved. -- http://www.fastmail.fm - Access your email from home and the web
Possibly Parallel Threads
- How to Simulate UPS on battery?
- KIN-1500AP RM + Windows 2008 64-bit Standard R2 SP1 (nut 2.6.1)
- New improved version of nut-report script
- Misconfiguration of Windows MSI installer 2.6.0-1 with my Powerware 5115 connected via USB port
- UPS does not want to power off itself