I'm running boinc over a large number of computers (more than one hundred) so I have written some useful scripts to install/manage and check seti status.

Tools

logged_daemon.sh Daemon shell script to start/stop boinc based on user/computer activity
Version : February 2020
How it works :
- Run as a daemon (start at boot with systemd)
- Check if boinc can be launch (boinc port is available, free ram, disk space, graphic card status)
- send email on warning (disk space, temperature, load, user activity...) - debug.txt file
- daemon.log (boinc output) and daemon.err (boinc error) if started using systemd service
- Check user/computer activity every 5 seconds
- Works with petri's binary
Requirement : xprintdle (optional) (Ubuntu : apt-get install daemon xprintidle)
Features :
- Check (local and remote) user activity from various parameters : screenlock, xprintidle, process name
- Check computer activity from load, free vram available, reboot date, nvidia driver status...
- Check other criteria as public holiday, hour, external temperature...
- Set cpu computing according to resource available (free ram for gpu and load for cpu)
- Run cpu2gpu.pl if available before tuesday's outage to fill the cache (or if no more gpu tasks)
- Support for several nvidia CG card
How to use :
- Edit hour.txt to specify when boinc will run (default is 1:8, from 1am to 8am). 8:8 for alltime. Use '1' to '24' for hour string.
- Check debug.txt to see output from the script
- To add more debug in debug.txt, edit param.txt and set value '1' rather than '0'
- You can use logged.service to start at boot
- Works only on linux with nvidia cards
- Stoping boinc may take few seconds, time to close seti process, so people can 'feel' a slow responding computer and see boinc tasks for a short period of time
- This script doesn't take account noise from fan activity (which can annoy people if they are next to their computer but don't use it)

check_seti.pl Perl script to display list of computers running seti
Version : February 2020
How it works :
- Read the list of computer from a database or a CSV file
- Connect to each computer via rsh to query seti status
- Send an email
Requirement : rsh to send remote shell command (exchange public key to allow connexion without password), MIME::Lite (to send email), DBI (to connect to a database (optional)) and cpu2gpu.pl (optional)
Reports : - Summary
- Hourly summary
- Machine with process defunct
- Computer available for processing : Restart required
- Computers with CPU/GPU free power remaining
- Computers with Radeon/Nvidia GPU
- Computer's name | total seti / cpu seti running | [ cpu+gpu wu running] | Graphic card | unroll value | [cpu/gpu/ap] wu available | user logged | screenlock enable date | remote user
- Computers running AP task
How to use :
- Input CSV file should used the following format :
"Hostname","Cpu","Gpu"
(ex : "Saturn","Core i5-4690","GeForce GTX 750 Ti")
to retrieve gpu : lspci | grep VGA | cut -d'[' -f2 | cut -d']' -f1
to retrieve cpu : cat /proc/cpuinfo | grep 'model name' | uniq | cut -d':' -f2
- Change email address to send/receive email
- Specify the number of gpu wu running at the same time for each of your grapic card
- Add some gpu or/and cpu filtering if needed
- Add user filtering if needed
- add this script in your crontab
- Works only on linux

logged.service Logged systemd service to launch logged_daemon.sh at boot time
Version : March 2018
How it works :
- Put this file in /etc/systemd/system/
- Change the path to your logged_daemon.sh script (the full path should have the read flag)
- run systemctl daemon-reload, systemctl enable logged and systemctl start logged to start it.
Requirement : Systemd system
- On Fedora, remove the sh -c '' in ExecStart or the daemon will be launch twice - Works only on linux

cpu2gpu.pl Perl script to convert cpu to gpu tasks (or reverse)
Version : December 2019
Change : - fix an issue with GPU AP / - exclude wu with state=3 / - Add information about AP using GPU
How it works :
This is a two step process
First step it to load xml tree from app_info.xml and change cpu value to gpu value
Next step require two passes :
- first to find already processed and active wu to be skip, which cpu version/plan class and platform are being used also find suspended tasks
- change <version_num> from cpu to gpu in <workunit> area
- change <version_num> <platform> and add <plan_class> in <result> area
Thanks to petri which gave me the conversion recipie
Requirement : XML::Simple (perl XML parser) (Ubuntu : apt-get install libxml-simple-perl)
How to use :
- Change the $path according to your system where BOINC is installed
- Suspend tasks you want to move if you want to move only selected tasks (default is to move all tasks)
- Stop boinc, make sure no more wu are running
- Run cpu2gpu.pl (add -r for reverse) (see -h for help)
- Restart boinc. You should have now only GPU tasks with the current cpu wu running
- Check tasks have been moved using : 'cpu2gpu.pl -i' (DONT FORGET THE -i flag !)
Boinc will contact the server to retreive new cpu tasks, if not, wait until the next update or force it.
Dont stop boinc while downloading new wu or it will produce ghost wu !!!
If you are have several graphic cards, best is to move GPU to CPU first (-r flag) as you'll receive more wu, i.e 100 by GPU, then you can convert the extra CPU tasks to GPU using cpu2gpu.pl

If you are using a daemon to launch boinc, stop it or it will respawn the process.
You can use the script cpu2gpu_restart.sh to stop, run cpu2gpu and start back boinc in a crontab (see below).
Hints : use cpu2gpu.pl -u to simulate
The script try to extract app and version from your app_info.xml, try to keep your file clean or cpu2gpu can be confused and get wrong information.
In case of problem , send me your app_info.xml and client_state.xml files.
Alternate tool : GUPPI Rescheduler

Alternate trick : You can hack the boinc code to tell the software you have more graphic card than you really have.


cpu2gpu_restart.sh Shell script to stop boinc, launch cpu2gpu and restart
Version : June 2018
How it works :
- Read gui_rpc_auth.cfg to extract password data
Two step process :
* First is to convert GPU to CPU tasks
- Kill boinc/boincmgr
- Run cpu2gpu.pl -r
- Restart boinc
- Force boinc update to retrieve new GPU wu
* You can repeat first step if you have a fast graphic card (one step is enough for GTX 1050, two for GTX 1070, three for GTX 1080)
* Last is to convert back CPU tasks to GPU
- Stop boinc again
- Run cpu2gpu.pl
- Start back boinc
- Force boinc update to retrieve new CPU wu
- Stop when wu limit is found (1000)
If you are using the logged daemon, boinc process will restart so you should set LOGGED_DEAMON in order to kill the daemon
Requirement : cpu2gpu.pl (and sudo if you are using the logged daemon (logged_daemon.sh))
How to use :
- Change PREFIX to your BOINC directory and CPU2GPU to your cpu2gpu.pl location
- Set LOGGED_DAEMON if you are using the logged daemon (to avoid the daemon to start back processing)
- Define how many time you want to run cpu2gpu.pl (PASS_NB)
- How many graphic card you are using (CARD_NUMBER)
- set RUN_MODE to always/never if you want to process wu while the script is running
- Add an entry in your crontab to run one hour before outage :
00 13 * * 2 /home/domisse/BOINC/cpu2gpu_restart.sh
the script is run at 1pm on tuesday (2 = tuesday)