Old 23rd October 2002, 16:15   #1
richiec79
Junior Member
 
Join Date: Jan 2001
Location: NYC
Posts: 23
Send a message via AIM to richiec79
Daily/Weekly W3C Logging Options

Any chance of having an option to break up the logging files to either daily or weekly logs - the current way of just putting them in one massive file is meaning i've got to (briefly) take the server down so i can archive the logs and run stats on them.

Or am I missing something? Is there already a way to do this?

Thanks.
richiec79 is offline   Reply With Quote
Old 30th October 2002, 08:36   #2
li1997
Member
 
Join Date: Nov 2000
Location: Narragansett, RI, USA
Posts: 78
Send a message via AIM to li1997
If you are on Win32 find someone who is using Apache on Win32 and grab a copy of rotatelog.exe. You can use this in the same way that Apache does.

If you are on unix/linux you should try a shell script such as:

code:

#!/bin/sh
gzip -c /usr/local/shoutcast/sc_w3c.log > /usr/local/shoutcast/sc_w3c-`date '+%Y%m%d'`.log.gz



You can then call this script whenever you want via cron.

-L"k"
li1997 is offline   Reply With Quote
Old 30th October 2002, 13:52   #3
richiec79
Junior Member
 
Join Date: Jan 2001
Location: NYC
Posts: 23
Send a message via AIM to richiec79
How exactly does rotatelog.exe work then??
richiec79 is offline   Reply With Quote
Old 5th November 2002, 06:35   #4
li1997
Member
 
Join Date: Nov 2000
Location: Narragansett, RI, USA
Posts: 78
Send a message via AIM to li1997
directly from the command line output from rotatelogs (with small SC edits):

Usage: rotatelogs.exe <logfile> <rotation time in seconds> [offset minutes from UTC] or <rotation size in megabytes>

Config like this:

W3CLog="|rotatelogs.exe /some/where 86400"

or

W3CLog="|rotatelogs.exe /some/where 5M"

The generated name will be /some/where.nnnn where nnnn is the system time at which the log nominally starts (N.B. if using a rotation time, the time will always be a multiple of the rotation time, so you can synchronize cron scripts with it). At the end of each rotation time or when the file size is reached a new log is started.

Like I said before though - this is all guesstimation...

-L"k"

Quote:
Originally posted by richiec79
How exactly does rotatelog.exe work then??
li1997 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump