Cleaning up IAG log files

Applies To: Intelligent Application Gateway (IAG)

The cleanup of Whale Communications Intelligent Application Gateway (IAG) 2007 log files prevents a buildup of old log files that can, in time, fill up the available disk space on IAG. During cleanup, old log files of the following types can be deleted:

  • IAG log files, including event logs, error logs, and trace logs

  • Internet Information Services (IIS) log files

This topic provides an overview of the log cleanup process and describes how to clean up log files, including the following:

  • Configuring log cleanup properties

  • Excluding IIS files from the log cleanup

How the log file cleanup process works

The log file cleanup process starts only when one of the following occurs:

  • The number of log files, including IAG event, error, and trace log files, and IIS log files, exceeds 2,048. This parameter is hard-coded and cannot be changed.

  • The total size of all the IAG event, error, and trace log files, and IIS log files, exceeds the Start Cleanup at value.

Log cleanup is not started if there is a disk overview. In this case, error and trace logs are no longer written to disk, without notification. It is therefore important to configure the Start Cleanup at property, according to the disk capacity

Once the log file cleanup starts, the process is as follows:

  1. Log files are deleted, starting with the oldest files, according to the file modification time (not according to the file’s timestamp).

  2. Files are deleted until the total size of the files left on the disk reaches the value defined in Stop Cleanup at. For each type of file, the cleanup process leaves a number of files undeleted, as determined by the value defined in Number of Undeleted Files. Log cleanup completes as follows:

    • If, after deleting files, the total size of the log file matches (or is less than) the value specified in Stop Cleanup at, then the log file cleanup is complete.

    • If, after deleting files, the total size of the log file matches the value defined in Number of Undeleted Files but the size still exceeds Stop Cleanup at, then the Number of Undeleted Files value is ignored, and deletion continues (starting with the oldest file). Deletion continues until the total size of the log file reaches the value specified in Stop Cleanup at.

The following diagram describes the flow of the log file cleanup mechanism:

Log File Cleanup Mechanism

d3ffe3ae-31ea-47c3-97c9-72d6c5befa01

Configuring log file cleanup parameters

Configure the following log file cleanup parameters:

  • The minimum and maximum amount of disk space allocated to the log files, including IAG event, error, and trace log files, and IIS log files.

  • The number of files you wish to retain.

To configure log file cleanup parameters

  1. In the IAG Configuration console, click Advanced Configuration on the Admin menu.

  2. In Log File Cleanup, change one or more of the following options:

    • Start Cleanup at specifies the total size (in megabytes) of IAG and IIS log files that can be kept on the disk, before IAG starts the log file cleanup process.

    • Stop Cleanup at specifies the total size (in megabytes) of IAG and IIS log files that are kept on the disk after the log file cleanup process.

    • Number of Undeleted Files specifies the maximum number of files retained after the log cleanup process. It includes event, trace, IIS log files (the number of files retained for each individual trace), and error log files (the number of files retained in twice the specified value).

Note

The ratio between undeleted error log files and other log files is hardcoded and cannot be changed.

Excluding IIS log files from the log file cleanup process

If you do not want the IIS logs to be calculated in the computation of the space allocated for log files and do not want IIS log files to be deleted during the log file cleanup process, do the following.

To exclude the IIS log files from the log file cleanup process

  1. On the IAG server, click Start, and type RegEdit to open the Registry Editor.

  2. Access the following registry key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\whlerrsrv\Parameters\

    Tip

    If the Parameters registry key does not exist under …\whlerrsrv</CODE>, you must create it.

  3. Create a new DWORD value: NoIISLogClean.

  4. Change the Value data of NoIISLogClean to 1.

    • Restart the Whale Log Server service.

    The Restart Other Services dialog box is displayed.

    Tip

    When you stop the Whale Log Server service, a number of other dependent services are also stopped. When you use the Restart command, the Whale Log Server service is automatically stopped and restarted, as are all the dependent services. For this reason, it is recommended that you use the Restart command and not the Stop command. If you do stop the service with the Stop command, make sure to manually start the Whale Log Server service and all the dependent services that were stopped.

  5. Click Yes to restart all listed services.

    The Whale Log Server service and all other services in the list are stopped and are then restarted automatically.

    IIS log files will not be computed in the calculation of space defined in the trace.ini configuration file and will not be deleted by the log file cleanup process on IAG.