Message boards : Questions and problems : How exactly exclusive_app works?
Message board moderation
Author | Message |
---|---|
Send message Joined: 29 Apr 17 Posts: 5 |
I need to add my scripts to the list. The following didn't work. <exclusive_app>script_name</exclusive_app> <exclusive_app>script_name.py</exclusive_app> <exclusive_app>python3 /home/.scripts/script_name.py</exclusive_app> <exclusive_app>/usr/bin/python3 /home/.scripts/script_name.py</exclusive_app> I narrowed it down to this https://github.com/BOINC/boinc/blob/b2b83a1150f31ebcf86210587516fa10b03eeb22/client/app.cpp#L310 but I'm not familiar with cpp and it didn't help. It works with geany, chromium, etc. <exclusive_app>geany</exclusive_app> <exclusive_app>chromium</exclusive_app> |
![]() Send message Joined: 29 Aug 05 Posts: 15634 ![]() |
The exclusive applications function works by adding the name of the executable as it shows in top. You only use the name, no path. And BOINC must be set to run based on preferences, when it's set to run always it ignores these exclusive applications. |
![]() Send message Joined: 29 Aug 05 Posts: 15634 ![]() |
I do not see that. Just tested with Notepad, which shows as notepad.exe in Windows 7's Windows Task Manager. First added notepad.exe as an exclusive GPU app, then added Notepad.exe as the exclusive GPU app. 30/04/2017 15:41:03 | | Config: don't use GPUs while notepad.exe is running 30/04/2017 15:41:40 | | Suspending GPU computation - an exclusive app is running 30/04/2017 15:41:40 | SETI@home | [cpu_sched] Preempting 23ap08ab.24443.20931.5.32.253_0 (removed from memory) 30/04/2017 15:41:40 | SETI@home | [task] task_state=QUIT_PENDING for 23ap08ab.24443.20931.5.32.253_0 from request_exit() 30/04/2017 15:41:40 | | request_exit(): PID 4172 has 0 descendants 30/04/2017 15:41:42 | SETI@home | [task] Process for 23ap08ab.24443.20931.5.32.253_0 exited, exit code 0, task state 8 30/04/2017 15:41:42 | SETI@home | [task] task_state=UNINITIALIZED for 23ap08ab.24443.20931.5.32.253_0 from handle_exited_app 30/04/2017 15:42:48 | | Config: don't use GPUs while Notepad.exe is running 30/04/2017 15:43:22 | | Suspending GPU computation - an exclusive app is running 30/04/2017 15:43:22 | SETI@home | [cpu_sched] Preempting 23ap08ab.24443.20931.5.32.253_0 (removed from memory) 30/04/2017 15:43:22 | SETI@home | [task] task_state=QUIT_PENDING for 23ap08ab.24443.20931.5.32.253_0 from request_exit() 30/04/2017 15:43:22 | | request_exit(): PID 8508 has 0 descendants 30/04/2017 15:43:23 | SETI@home | [task] Process for 23ap08ab.24443.20931.5.32.253_0 exited, exit code 0, task state 8 30/04/2017 15:43:23 | SETI@home | [task] task_state=UNINITIALIZED for 23ap08ab.24443.20931.5.32.253_0 from handle_exited_app |
Send message Joined: 29 Apr 17 Posts: 5 |
As I've said, it works with programs like chromium. So for my scripts what name should I use exactly? In top it's: python3 /home/.scripts/script_name.py |
Send message Joined: 5 Oct 06 Posts: 5149 ![]() |
Have you tried simply python3 on its own, without the name of the script the interpreter is currently executing? |
Send message Joined: 29 Apr 17 Posts: 5 |
Yes, I forgot to mention that I tried it, it indeed works, but it doesn't help since I've got loads of other running scripts and programs that use python3 and aren't hampered by boinc. |
![]() Send message Joined: 29 Aug 05 Posts: 15634 ![]() |
I think it only works on actual programs, not on processes running off of those programs. |
Send message Joined: 5 Oct 06 Posts: 5149 ![]() |
Then maybe you could consider something like py2app - "Create standalone Mac OS X applications with Python", as it says on the tin. You would only need to compile the script(s) which interfere with BOINC - then the (unique) name of the resulting application would be your entry in exclusive_app. You could continue to run your other, non-intrusive, scripts in interpretive mode with python3 as now. |
Send message Joined: 29 Apr 17 Posts: 5 |
I'm on linux, nonetheless compiling doesn't work for me. |
Send message Joined: 5 Oct 06 Posts: 5149 ![]() |
I'm on linux ...Sorry, my mind must still have been in the Mac thread next door. |
Send message Joined: 4 Jul 12 Posts: 321 ![]() |
The check is for matching the exact name ignoring case (see: strcasecmp). So you must enter the line exactly as it appears in the proc info. This is gathered internally as parsing the information from "/proc/%s/stat" where %s is the PID of your script. When the script is running check this and get the first 256 characters from the command (see lib/procinfo_unix.cpp#L112 for where it is). The exclusive app feature only stores and compares the first 256 characters. Or it might even be shorter then show in top as I just found out. Using ps I get: $ ps aux |grep 21000 christi+ 21000 0.3 2.2 1670108 364732 ? Sl Apr30 4:05 /usr/lib/chromium/chromium --show-component-extension-options --ignore-gpu-blacklist --no-default-browser-check --disable-pings --media-router=0 --enable-remote-extensions --ppapi-flash-path=/usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so --ppapi-flash-version=24.0.0.194 --ssl-version-min=tls1 Using /proc/PID/stat I get: $ cat /proc/21000/stat 21000 (chromium) S 12070 12015 12015 0 -1 4194304 1909775 62808 2 0 20760 3806 74 50 20 0 47 0 24082074 1710190592 91183 18446744073709551615 94430747762688 94430889350680 140720762739072 0 0 0 0 4096 81923 0 0 0 17 2 0 0 0 0 0 94430889354912 94430894400176 94430912614400 140720762746772 140720762747075 140720762747075 140720762748893 0 So there might be no way to distinguish which python script is running. |
Send message Joined: 29 Apr 17 Posts: 5 |
Solved. Never looked it up before, but python3 is just a link to the actual interpreter python3.6. I just made an additional link and added it to the boinc's exclusive list. The name of the link shouldn't be too long, just as ChristianB said, or it will be cut. I spent an hour trying to understand why the link python3 worked and python3_exclusive_app didn't; it was cut to the python3_exclusi. |
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.