Pause BOINC Computation when on Battery Backup?

Message boards : BOINC client : Pause BOINC Computation when on Battery Backup?
Message board moderation

To post messages, you must log in.

AuthorMessage
Jake

Send message
Joined: 30 May 15
Posts: 9
United States
Message 69317 - Posted: 30 Apr 2016, 18:56:13 UTC

Basically just need a hack to link my UPS state to the battery state that BOINC uses when on a laptop.

I have an ubuntu server thats running 24/7 powered through an Uninterruptable Power Supply so the machine can stay running through power outages, the ups is monitored via NUT (Network UPS Tools) which can get the status of the UPS (on AC / on Battery) how would I go about piping this data from NUT into BOINC such that if the power goes out BOINC stops computing to save battery. This is basically the same as how BOINC works on a laptop but since its installed on a desktop it doesn't know to ask NUT of the battery status and therefore keeps computing even though the machine is running on battery.
ID: 69317 · Report as offensive
Jake

Send message
Joined: 30 May 15
Posts: 9
United States
Message 69349 - Posted: 1 May 2016, 15:18:53 UTC

The server runs the "Ubuntu Server" OS which doesn't have a gui so there's no option for dimming of a screen since there is no screen. as far as I know NUT is the only program that knows of the UPS's status and it is currently configured to simply wait for the battery to get low before sending a shutdown signal.
ID: 69349 · Report as offensive
ChristianB
Volunteer developer
Volunteer tester

Send message
Joined: 4 Jul 12
Posts: 321
Germany
Message 69370 - Posted: 2 May 2016, 11:19:24 UTC

Your NUT Tool should be able to start a command when certain events are detected. Can you make it issue
boinccmd --set_run_mode never
in case of battery power and
boinccmd --set_run_mode auto
when AC is back and a certain charging level is reached?
ID: 69370 · Report as offensive
Jake

Send message
Joined: 30 May 15
Posts: 9
United States
Message 69390 - Posted: 3 May 2016, 0:46:39 UTC

Brilliant! I like that idea a lot. As I've just recently wiped and reinstalled my server (did a lot of testing and filled it with programs I didn't need) I'll give this idea a shot once I get NUT reinstalled and working.
ID: 69390 · Report as offensive
Jake

Send message
Joined: 30 May 15
Posts: 9
United States
Message 69393 - Posted: 3 May 2016, 3:12:43 UTC

After much confusion with NUT (by far the hardest thing I've ever installed on a linux system) I finally got it to work flawlessly. I have NUT configured so when the UPS switches to AC or Battery NUT will pass the UPS status to a script I wrote which then decides to stop or start the BOINC processes via the commands you suggested. Thank you for your help, that turned out to be much simpler than I anticipated!
ID: 69393 · Report as offensive

Message boards : BOINC client : Pause BOINC Computation when on Battery Backup?

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.