It is currently 20. Oct 2017, 09:07

Tools: Calendar Calendar   Games Games   Gallery Gallery   Downloads Downloads   

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
AuthorMessage
 Post subject: /diskless/crunchxx/boinc/BOINC/boinc.log
PostPosted: 25. Apr 2009, 19:57 
User avatar

Joined: 03.2009
Posts: 66
Location: Republic of Texas, Central
Gender: Male
There seems to be no log file rolling going on for the file boinc.log. So each diskless client's log file is just growing daily. I'd like to correct this as I'm getting a bit tight on space on the drive that is mounted at /diskless on the server.

Can anyone point me to a "how to" to set up file rollover (like syslog does) or tell me how to make the log file rename to .old like it does in the Ubuntu/Debian BOINC installation?

_________________
- da shu @ the BOINC farm, SkipsJunk, Guru Mountain
- BoincDV is on-line! Click HERE
Phillip Warren Anderson works on my RAM & CPU problems


Offline
 Profile  
 
 Post subject: Re: /diskless/crunchxx/boinc/BOINC/boinc.log
PostPosted: 26. Apr 2009, 13:51 

Joined: 11.2008
Posts: 138
Gender: None specified
This would do the job :
cp /home/boinc/BOINC/boinc.log /home/boinc/BOINC/boinc.log.old
> /home/boinc/BOINC/boinc.log

I will implement this in the next release...


Offline
 Profile  
 
 Post subject: Re: /diskless/crunchxx/boinc/BOINC/boinc.log
PostPosted: 26. Apr 2009, 20:16 
User avatar

Joined: 03.2009
Posts: 66
Location: Republic of Texas, Central
Gender: Male
Dotsch wrote:
This would do the job :
cp /home/boinc/BOINC/boinc.log /home/boinc/BOINC/boinc.log.old
> /home/boinc/BOINC/boinc.log

I will implement this in the next release...


Yes, I know I can do that manually.

I'm looking for a way to CRON it or to have the log file roller create boinc.log.0, boinc.log.1 and only keep 1 or 2 of the backup logs. A CRON script to tar the boinc.log to boinc.log.tar.gz daily would work for me also. I'll see what I can figure out how to put my command lines into a .sh and get it into a scheduler.

_________________
- da shu @ the BOINC farm, SkipsJunk, Guru Mountain
- BoincDV is on-line! Click HERE
Phillip Warren Anderson works on my RAM & CPU problems


Offline
 Profile  
 
 Post subject: Re: /diskless/crunchxx/boinc/BOINC/boinc.log
PostPosted: 28. Apr 2009, 00:57 
User avatar

Joined: 03.2009
Posts: 66
Location: Republic of Texas, Central
Gender: Male
I think I found what I was after HERE. Will post back entries if I get it to work.

UPDATE: The posts following are probably "no duh" to you old hands at Linux but for us noobs this isn't quite so obvious. I did the following posts to help others, like myself, who are relatively new converts to Linux and also to solicit comments from you experience Linux folks in case I've made some errors in approach.

WARNING: As of today I am still testing the following config file changes and it'll be at least a couple more days before I really see the old log files roll off like I think they will. Use at your own risk.

Skip

_________________
- da shu @ the BOINC farm, SkipsJunk, Guru Mountain
- BoincDV is on-line! Click HERE
Phillip Warren Anderson works on my RAM & CPU problems


Last edited by Skip Da Shu on 28. Apr 2009, 03:17, edited 3 times in total.

Offline
 Profile  
 
 Post subject: /home/boinc/BOINC/boinc.log control for Dotsch/UX server
PostPosted: 28. Apr 2009, 01:49 
User avatar

Joined: 03.2009
Posts: 66
Location: Republic of Texas, Central
Gender: Male
To control the boinc.log in your Dotsch_UX server create using the editor of your choice this file

Code:
sudo gedit /etc/logrotate.d/boinc

Copy into that file the following and save it:

Code:
/home/boinc/BOINC/boinc.log {
  missingok
  notifempty
}

The above will result in it keeping 4 uncompressed weekly logfiles using mostly defaults.


Nothing wrong with this one... just need to run:
Code:
sudo logrotate -f /etc/logrotate.conf
to kickstart it after config file changes.

_________________
- da shu @ the BOINC farm, SkipsJunk, Guru Mountain
- BoincDV is on-line! Click HERE
Phillip Warren Anderson works on my RAM & CPU problems


Last edited by Skip Da Shu on 1. May 2009, 09:10, edited 6 times in total.

Offline
 Profile  
 
 Post subject: Re: /diskless/crunchxx/boinc/BOINC/boinc.log
PostPosted: 28. Apr 2009, 01:57 
User avatar

Joined: 03.2009
Posts: 66
Location: Republic of Texas, Central
Gender: Male
For the diskless clients I'd think a bit more aggressive logging would be in order but that's your own call. Below is how I set mine. Modify the frequency of rotating or the number retained to your desires.

For FUTURE diskless clients you will need to update the following (if you are using i386 arch change ".x64" to ".i386", update both if using both):

Code:
sudo gedit /diskless/master.x64/etc/logrotate.d/boinc

Then copy the below code into the file and save it.

Code:
/home/boinc/BOINC/boinc.log {
   rotate 3         # default is to keep 4 iterations of the log file
   daily            # default is weekly
   compress         # compress is not the default, i'm using it on diskless clients only
   missingok        # ignore missing logfile
   notifempty       # don't rotate an empty one, default is to rotate empty files
}

This should keep 3 daily logs with the backups being compressed with gzip.

To apply this to EXISTING diskless clients create the SAME file for each of them. I'd suggest doing the above first and then copying. Such as:

Code:
sudo cp -vp /diskless/master.x64/etc/logrotate.d/boinc /diskless/YOUR-CLIENT-NAME-HERE/etc/logrotate.d/

Repeat the above for EACH client changing only the "YOUR-CLIENT-NAME-HERE".

Actual examples (crunch34 is my server):
Code:
boinc@crunch34:~$ sudo cp -vp /diskless/master.x64/etc/logrotate.d/boinc /diskless/crunch29/etc/logrotate.d/
`/diskless/master.x64/etc/logrotate.d/boinc' -> `/diskless/crunch29/etc/logrotate.d/boinc'

Code:
boinc@crunch34:~$ sudo cp -vp /diskless/master.x64/etc/logrotate.d/boinc /diskless/crunch30/etc/logrotate.d/
`/diskless/master.x64/etc/logrotate.d/boinc' -> `/diskless/crunch30/etc/logrotate.d/boinc'

Code:
boinc@crunch34:~$ sudo cp -vp /diskless/master.x64/etc/logrotate.d/boinc /diskless/crunch31/etc/logrotate.d/
`/diskless/master.x64/etc/logrotate.d/boinc' -> `/diskless/crunch31/etc/logrotate.d/boinc'


I found the problem! It's two things...
1) it doesn't like the comments to the right of the command/parm lines in the 'boinc' file at the top, so remove those.
2) Logrotate needs a kick in the ... to get going with changes. run this:

Code:
sudo logrotate -f /etc/logrotate.conf


BTW, I'm just about done with a script to copy config file changes like this out of the master.xxx directory to all the existing clients. With Dotsch's OK I'll post it in the forums next week.

_________________
- da shu @ the BOINC farm, SkipsJunk, Guru Mountain
- BoincDV is on-line! Click HERE
Phillip Warren Anderson works on my RAM & CPU problems


Last edited by Skip Da Shu on 1. May 2009, 09:15, edited 4 times in total.

Offline
 Profile  
 
 Post subject: System Defaults for logging
PostPosted: 28. Apr 2009, 03:12 
User avatar

Joined: 03.2009
Posts: 66
Location: Republic of Texas, Central
Gender: Male
Haven't had enough of this yet? Feeling frisky?

Well there's a file called logrotate.conf that is in the /etc directory that controls what the defaults are for anything entered into the logrotate.d directory. This is supposed to define the defaults as they apply to applications and utilities.

IF you think you want all the logs to follow some different set of defaults you can modify those in this file. I'm experimenting now with it on a diskless client with it set as:
Code:
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
# changed to 2 weeks for diskless clients, SRG 2009/04
rotate 2

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
# uncommented for diskless clients, SRG 2009/04
compress

# packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
    missingok
    monthly
    create 0664 root utmp
    rotate 1
}

/var/log/btmp {
    missingok
    monthly
    create 0660 root utmp
    rotate 1
}

Obviously if I wanted this to apply to all clients I would have to again go thru the steps from earlier... update the file in the 'master' and then copy it out to each existing diskless clients.

Also IF this were in place on all the diskless clients the boinc file in logrotate.d could be simplified as with the above settings "compress" is now a default. If you only wanted to keep 2 days of boinc.log you could also remove that entry and let it pick up the above default.


System log files have a different configuration file and are not quite as clear cut as the logrotate.conf file. I quote from the link I provided back up in one of the early posts in this thread...
Quote:
On Ubuntu Computers, System logs are managed by the /etc/syslog.conf file which is read by the daily cron job script /etc/cron.daily/sysklogd that will rotate any log files specified in syslog.conf.

_________________
- da shu @ the BOINC farm, SkipsJunk, Guru Mountain
- BoincDV is on-line! Click HERE
Phillip Warren Anderson works on my RAM & CPU problems


Offline
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour [ DST ]


 Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
 
cron