Message boards : BOINC client : Pause BOINC Computation when on Battery Backup?
Message board moderation
Author | Message |
---|---|
Send message Joined: 30 May 15 Posts: 9 ![]() |
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. |
Send message Joined: 30 May 15 Posts: 9 ![]() |
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. |
Send message Joined: 4 Jul 12 Posts: 321 ![]() |
Your NUT Tool should be able to start a command when certain events are detected. Can you make it issue boinccmd --set_run_mode neverin case of battery power and boinccmd --set_run_mode autowhen AC is back and a certain charging level is reached? |
Send message Joined: 30 May 15 Posts: 9 ![]() |
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. |
Send message Joined: 30 May 15 Posts: 9 ![]() |
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! |
Copyright © 2025 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.