Message boards : BOINC client : BOINC does not write in logs
Message board moderation
Author | Message |
---|---|
Send message Joined: 21 May 16 Posts: 37 |
Hi, I am the Fedora's BOINC co-maintainer. We just upgraded BOINC client to 7.6.x from 7.4.x and I am trying to figure out why BOINC does not write logs. I attach boinc-client.service and logrotate.d/boinc-client /usr/lib/systemd/system/boinc-client.service [Unit] Description=Berkeley Open Infrastructure Network Computing Client Documentation=man:boinc(1) After=network-online.target [Service] Type=forking Nice=10 User=boinc PermissionsStartOnly=yes WorkingDirectory=/var/lib/boinc ExecStartPre=/usr/bin/touch /var/log/boinc.log /var/log/boincerr.log ExecStartPre=/bin/chown boinc:boinc /var/log/boinc.log /var/log/boincerr.log ExecStart=/usr/bin/boinc_client --daemon --start_delay 1 ExecStop=/usr/bin/boinccmd --quit ExecReload=/usr/bin/boinccmd --read_cc_config ExecStopPost=/bin/rm -f /var/lib/boinc/lockfile IOSchedulingClass=idle [Install] WantedBy=multi-user.target /etc/logrotate.d/boinc-client /var/log/boinc.log /var/log/boincerr.log { missingok notifempty copytruncate compress delaycompress nomail } |
Send message Joined: 29 Aug 05 Posts: 15574 |
# log files Source. |
Send message Joined: 21 May 16 Posts: 37 |
# log files The situation is the same /usr/lib/systemd/system/boinc-client.service [Unit] Description=Berkeley Open Infrastructure Network Computing Client Documentation=man:boinc(1) After=network-online.target [Service] Type=forking Nice=10 User=boinc Group=boinc PermissionsStartOnly=yes WorkingDirectory=/var/lib/boinc ExecStartPre=/usr/bin/touch /var/log/boinc.log /var/log/boinc_err.log ExecStartPre=/bin/chown boinc:boinc /var/log/boinc.log /var/log/boinc_err.log ExecStart=/usr/bin/boinc_client --daemon --start_delay 1 ExecStop=/usr/bin/boinccmd --quit ExecReload=/usr/bin/boinccmd --read_cc_config ExecStopPost=/bin/rm -f /var/lib/boinc/lockfile IOSchedulingClass=idle Environment="LOGFILE=/var/log/boinc.log" Environment="ERRORLOG=/var/log/boinc_err.log" [Install] WantedBy=multi-user.target # ls -latr /var/log/boinc* -rw-r--r--. 1 boinc boinc 0 21 mag 15.58 /var/log/boinc.log -rw-r--r--. 1 boinc boinc 0 21 mag 15.58 /var/log/boinc_err.log A entry from top 25657 boinc 39 19 76756 36704 2088 R 64,7 0,2 9:49.40 wcgrid_mcm1_7.3 |
Send message Joined: 4 Jul 12 Posts: 321 |
It works on Debian. You can take a look at the systemd service file there: https://anonscm.debian.org/cgit/pkg-boinc/boinc.git/tree/debian/boinc-client.service |
Send message Joined: 21 May 16 Posts: 37 |
It works on Debian. You can take a look at the systemd service file there: https://anonscm.debian.org/cgit/pkg-boinc/boinc.git/tree/debian/boinc-client.service I am often in contact with the Debian maintainer and he told me that that configuration was taken from Fedora old script file (BOINC 7.2.x) The systemd script file I pasted here is an evolution of the older one, that avoids BOINC from running SELinux-unconfined (See https://bugzilla.redhat.com/show_bug.cgi?id=1303070 ) Anyway we are fixing the logs problem, see https://bugzilla.redhat.com/show_bug.cgi?id=1339002 Anyway I am still curious about why BOINC uses its working directory as logs directory[/url] |
Send message Joined: 4 Jul 12 Posts: 321 |
Because BOINC was written with the idea that it runs in it's own directory under the users home directory. Is /var/log a universal place on Linux or would we need to provide a build/configuration option so that could be changed by the distribution maintainer? I also see some other problems with the systemd script right now that are mainly needed for debuging. Sometimes I want to start the Client with some extra commandline parameters. These were easily added to the init.d script but are not easily added to the systemd file. The relevant flags are broken right now and I have to directly edit the configuration file to activate the flag. Regards Christian |
Send message Joined: 21 May 16 Posts: 37 |
I would need to know, in BOINC source code, where is the code that initializes and fills the logs. So that I could write a patch file (for Fedora) that makes BOINC write logs into /var/log/ directory, avoiding the package maintainer to have to mess up with symbolic links, etc. I have done a quick search with "grep" but I haven't found much useful stuff |
Send message Joined: 4 Jul 12 Posts: 321 |
Here are some pointers in the right direction: When starting the Client with the --redirectio option the Client redirects stdout and stderr to files that are specified in client/main.cpp For the actual path check lib/diagnostics.cpp I would like to encourage you to not focus on the Fedora use case but create a patch that works for other Distributions too and can be incorporated into the upstream BOINC source. To discuss this further please open a Pull Request on the BOINC github repository. |
Send message Joined: 21 May 16 Posts: 37 |
Thank you, I will start working on it as soon as possible |
Send message Joined: 5 Mar 08 Posts: 272 |
You might want to look at Debian bug 815214 that I raised for Stretch. It seems under Stretch their init script is totally different to the prior release (Jessie) and stuffs up the log files. The solution that was implemented is in my opinion wrong. You may also want to chat with Gianfranco as he is the Debian BOINC maintainer. MarkJ |
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.