Sun Java System Web Server 6.1 SP12 Administrator's Guide

Specifying Log File Options

The Administration Server log files record data about the server, including the types of errors encountered and information about server access. Viewing these logs allows you to monitor server activity and troubleshoot problems by providing data like the type of error encountered and the time certain files were accessed.

You can specify the type and format of the data recorded in the Administration Server logs using the Log Preferences page. For instance, you can choose to log data about every client who accesses the Administration Server or you can omit certain clients from the log. In addition, you can choose the Common Logfile Format, which provides a fixed amount of information about the server, or you can create a custom log file format that better meets your requirements.

Access the Administration Server Log Preferences page by clicking the Logging Options link from the Preferences tab.

For more information, see the Logging Options page in the online help, and Chapter 11, Using Log Files.

Viewing Log Files

The Administration Server log files are located in the admin/logs directory in your server's root directory. For example, on a Windows platform, the path to your log files might look like c:\Sun\server6\https-admserv\logs. You can view the error log and the access log using the Sun Java System Web Server console or a text editor.

The Access Log File

The access log records information about requests to and responses from the server.

ProcedureTo view the access log file

  1. Access the Administration Server and choose the Preferences tab.

  2. Click the View Access Log link and click OK.

    For more information, see the View Error Log page in the online help, and Chapter 11, Using Log Files.

The Error Log File

The error log lists all the errors the server has encountered since the log file was created. It also contains informational messages about the server such as when the server was started and users who attempted unsuccessfully to log in to the server.

ProcedureTo view the error log file

  1. Access the Administration Server and choose the Preferences tab.

  2. Click the View Error Log link and click OK.

    For more information, see the View Access Log page in the online help, and Chapter 11, Using Log Files.

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/scheduler.pid
    kill -9 -`cat $PID_FILE`
        - rm $PID_FILE

    Note –

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