Sun Java System Web Server 6.1 SP12 Administrator's Guide

Archiving Log Files

You can set up a process by which your log files are automatically archived. At a certain time, or after a specified interval, Sun Java System Web Server rotates your access logs. Sun Java System Web Server saves the old log files and stamps the saved file with a name that includes the date and time they were saved.

For example, you can set up a schedule for your files to rotate every hour, and Sun Java System Web Server saves and names the file “access.199907152400,” where “name|year|month|day|24-hour time” is concatenated together into a single character string. The exact format of the access log archive file varies depending upon which type of log rotation you schedule.

Access log rotation is initialized at server startup. If rotation is activated, the Sun Java System Web Server creates a time-stamped access log file and rotation starts at server startup.

Once the rotation starts, the Sun Java System Web Server creates a new time stamped access log file when there is a request that needs to be logged in the access log file and it occurs after the previously-scheduled “next rotate time.”

Using Schedulerd Control-based Log Rotation (UNIX/Linux)

You can configure several features of your Sun Java System Web Server to operate automatically and set to begin at specific times. The schedulerd control daemon checks the computer clock and then spawns processes at certain times. (These settings are stored in the schedulerd file.)

This schedulerd control daemon controls cron tasks for your Sun Java System Web Server and can be activated and deactivated from the Administration Server. The tasks performed by the cron process depends on various servers. (Note that on Windows platforms, the scheduling occurs within the individual servers.)

Some of the tasks controlled by the schedulerd control daemon include scheduling collection maintenance and archiving log files. Restart the schedulerd control daemon when you change the settings for scheduled tasks.

ProcedureTo restart, start, or stop the schedulerd control daemon

  1. Access the Administration Server and choose the Global Settings tab.

  2. Click the Cron Control link.

  3. Click Start, Stop, or Restart to change the schedulerd controls.

    For starting schedulerd daemon from the CLI, run the following commands:

      > ADMSERV_ROOT=$SERVER_ROOT/https-admserv/config
      > export ADMSERV_ROOT
      > cd $SERVER_ROOT/bin/https/bin
     > ./schedulerd -d <server_root>

    For example:

      > ADMSERV_ROOT=/export2/iws61sp1/https-admserv/config
      > export ADMSERV_ROOT
      > cd /export2/iws61sp1/bin/https/bin
      > ./schedulerd -d /export2/iws61sp1
      > server scheduler daemon started# 

    For stopping schedulerd from the command-line, kill the schedulerd process and remove the pid file as shown below:

    export PID_FILE=/opt/SUNWwbsvr/https-admserv/logs/
    kill -9 -`cat $PID_FILE`
        - rm $PID_FILE

    Note –

    Whenever you add a task to the schedulerd daemon, you must restart the daemon