Updates
 
 
Quick Links
AW Hosting
Network Status
 
Admin Logon
<coming soon>
Search
<coming soon>



Log Save

Purpose - LogSave is a small perl script designed to compliment the ActiveWorlds server software by saving the logs that the server software would normally throw away.

System Requirements - LogSave is written in the Perl scripting language and therefore requires a valid installation of the Perl interpreter. This software is also keyed to a Linux environment. The program should run on any Unix based operating system. The program may or may not run under Windows (try it at your own risk). You can download the most current version of Perl from www.perl.com

Overview - LogSave works by copying the "world.log.old" file to another directory and compressing it. Then the program, at set time intervals, checks for changes in world.log.old. If it finds a change then the log is copied/compressed and the process starts over again.

Downloads - Version 1.0: Download

Installation - Follow the steps below to install LogSave.pl

1. Download LogSave.pl from the link above.

2. Extract the file to the same directory that contains the ActiveWorlds server on your system.

3. Open LogSave.pl in your favorite text editor. Change the variables listed below to the values that are appropriate for you setup. When finished, save and close the file.

    $filename - This is the name of the file to copy/compress/and watch for changes in. When used with the AW server this should always be set to 'world.log.old'.

    $filenamepath - This is the full (absolute) path to the filename listed in $filename. For example: If the AW server is installed to '/etc/awserver/' then this variable would be set to '/etc/awserver/world.log.old'.

    $filedata - The filename listed here is the file used for storing info about and tracking changes in the file listed in $filename. The variable should be set to the full (absolute) path of the file. You can name the data file anything you like. For simplicity I stick to 'world.log.old.logsave'. So, taking our example from earlier: If the AW server was installed to '/etc/awserver/' then an acceptable value for this variable would be '/etc/awserver/world.log.old.logsave'.

    $backupdir - This is the directory to which the saved and compressed logs will be copied to. This can be the absolute path to any directory on the system where you would like to store these logs. I use '/var/log/awserver/'.

    $consoleout - This is a flag variable that turns on and off the console output. Setting this to '1' turns on console output, '0' is off. The debug log flag takes precedence (see below). I recommend leaving console output off.

    $debuglog - This is a flag variable that turns on and off the debug log. Setting this to '1' turns on logging, '0' is off. The debug log flag takes precedence over $consoleout. If both $consoleout and $debuglog are on, only the debug log will be created. If only logging is on then only the log will be created, and if only console output is on then all output will be directed to the console. If neither flag is on then all output will be discarded. Use this with caution, the logs can grow very large.

    $debuglogname - The absolute path to the debug log. This is created only when debug logging is on. This log contains information about the path's used, file names, file info, and status info.

    $debugerrors - The absolute path to the error log. The log is only created when debugging log is on. This log contains errors such a problems encountered when opening a file.

4. Check the permissions on the files. Make sure that the same user owns both the AW server files and the LogSave files.

5. Next we need to setup Cron to run LogSave. To do this, log in as root (or use the 'su' command). Run the following command (where user is the username of the user who owns the LogSave and AW server files):

crontab -eu user

An instance of vi spawns and automatically opens the crontab file for the specified user. Press the "i" key on the keyboard to enter insert mode. On the first blank line type exactly:

0 */1 * * * /etc/awserver/logsave.pl


Where the command on the end is the path to logsave.pl on your system. This line tells the system to run LogSave (to check for a new log) once every hour. When you have typed this press the escape key on the keyboard. Then type ":w" and press enter. Then type ":q" and press enter. You should see a message like "installing new crontab".

For more information on setting up Cron, see RedHat's Cron Tips.

6. LogSave is installed. Enjoy!