Does BOINC respond to kill signals?

Message boards : Questions and problems : Does BOINC respond to kill signals?
Message board moderation

To post messages, you must log in.

AuthorMessage
Peter Humphrey

Send message
Joined: 25 Nov 13
Posts: 30
United Kingdom
Message 69485 - Posted: 6 May 2016, 10:38:19 UTC

I'd like to use /usr/sbin/logrotate to rotate stderrdae.txt and stdoutdae.txt, but it seems that boinc_client ignores signal USR1. At least, nothing was written to stdoutdae.txt when I tried sending it (as root).

This is Gentoo running kernel 4.4.6 and BOINC 7.6.31.

Is there a way to rotate these text files, and maybe job logs, without the sledgehammer approach of stopping and restarting boinc_client?
ID: 69485 · Report as offensive
SekeRob2

Send message
Joined: 6 Jul 10
Posts: 585
Italy
Message 69487 - Posted: 6 May 2016, 11:44:58 UTC - in response to Message 69485.  
Last modified: 6 May 2016, 11:45:49 UTC

The client can be configured to store X number of log lines or a max size. When full it creates a copy to stdoutdae.old and empties stdoutdae.txt. The .old you can do anything with while the client is running.
Coelum Non Animum Mutant, Qui Trans Mare Currunt
ID: 69487 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 14781
Netherlands
Message 69488 - Posted: 6 May 2016, 13:18:09 UTC - in response to Message 69485.  

... nothing was written to stdoutdae.txt when I tried sending it (as root).

I think you'll have to use boinc --redirectio under Linux to get it to write the event log to stdoutdae.txt (when running as not the user that installed it?)

As Sekerob said, increase the size of the file(s) using the right options in cc_config.xml:

<max_stderr_file_size>N</max_stderr_file_size>
    Specify the maximum size of the standard error log file (stderrdae.txt); default is 2 MB.
<max_stdout_file_size>N</max_stdout_file_size>
    Specify the maximum size of the standard out log file (stdoutdae.txt); default is 2 MB.
    Sample: <max_stdout_file_size>3145728</max_stdout_file_size> equals 3 MB.
    NB: A Client restart may be needed to have changes take effect!

It's not really needed to increase the size of stderrdae.txt, unless you have a lot of client errors - crashes of the client and such. It's really only needed to increase the size of stdoutdae.txt

I run mine at 19.2MB using:
<max_stdout_file_size>20119200</max_stdout_file_size>

ID: 69488 · Report as offensive
Peter Humphrey

Send message
Joined: 25 Nov 13
Posts: 30
United Kingdom
Message 69490 - Posted: 6 May 2016, 15:07:30 UTC - in response to Message 69487.  

Interesting - thank you. I hadn't come across that explanation of how it works before.

I've set
<max_stderr_file_size>1000</max_stderr_file_size>
and
<max_stdout_file_size>512000</max_stdout_file_size>

I can't see how to limit the number of lines, though, other than the number shown in the manager's log display.

Thanks again!
ID: 69490 · Report as offensive
Profile KSMarksPsych
Avatar

Send message
Joined: 30 Oct 05
Posts: 1239
United States
Message 69491 - Posted: 6 May 2016, 18:02:11 UTC

At one point I wrote a log rotate script for Fedora. I'll see if I can dig it up in my email.
Kathryn :o)
ID: 69491 · Report as offensive
Profile KSMarksPsych
Avatar

Send message
Joined: 30 Oct 05
Posts: 1239
United States
Message 69493 - Posted: 6 May 2016, 18:09:07 UTC - in response to Message 69491.  
Last modified: 6 May 2016, 18:09:49 UTC

At one point I wrote a log rotate script for Fedora. I'll see if I can dig it up in my email.



I think this is it. I don't guarantee it in any way shape or form. It hasn't be touched in years.

# Log Rotation for BOINC Daemon Logs
#
# See http://boinc.berkeley.edu/ for more
# information about BOINC
#
# Kathryn Marks
# kathryn . boinc @ gmail . com
#
# Created: October 6, 2007
# Last Modified: October 15, 2007
#

#
# Daemon is stoppped and then restarted after the logs are rotated.
# All results will fall back to the last checkpoint if it exists on restart.
# Any result that does not checkpoint will start from scratch.
#

# Global Parameters

missingok
compress
delaycompres
notifempty
nomail

# Log Specific Parameters

# Normal usage
# For boinc.log, rotate weekly and keep about 2 months worth

# Testing
# For boinc.log, rotate daily and keep about 2 weeks worth

/home/boinc/boinc.log
{
# weekly
daily
# rotate 8
rotate 14
create 664 boinc boinc
sharedscripts
prerotate
/etc/init.d/boinc stop
endscript
postrotate
/etc/init.d/boinc start
endscript
}

# For normal use
# For error.log, rotate monthly and keep about 2 months worth

# For testing
# For error.log rotate weekly and keep about 1 month worth

/home/boinc/error.log
{
# monthly
weekly
# rotate 2
rotate 4
create 664 boinc boinc
sharedscripts
prerotate
/etc/init.d/boinc stop
endscript
postrotate
/etc/init.d/boinc start
endscript
}

# EOF
Kathryn :o)
ID: 69493 · Report as offensive
Peter Humphrey

Send message
Joined: 25 Nov 13
Posts: 30
United Kingdom
Message 69505 - Posted: 7 May 2016, 14:58:53 UTC - in response to Message 69493.  

Thanks, Kathryn, but I was hoping to avoid stopping the client and restarting it.
ID: 69505 · Report as offensive

Message boards : Questions and problems : Does BOINC respond to kill signals?

Copyright © 2021 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.