Log switching

A system administrator can enable log switching to have Service Manager write log information to a new file when the current log file reaches a pre-defined size limit

Log switching is particularly useful for systems that run continuously and do not have downtime for system administrators to back up or delete logs. If you do not enable log switching, Service Manager will add all log messages to the one log file defined in the initialization file.

Configure log switching by the maximum log size

Applies to User Roles:

System Administrator

To configure log switching by the maximum log size, follow these steps:

  1. Stop the Service Manager server.
  2. Open the sm.ini file in a text editor.

    This file is in your Service Manager RUN directory.

  3. Type the following system parameter:

    System parameter Description
    maxlogsize: n For n, type the maximum log size in bytes you want Service Manager to use as the log size threshold. The default value is 5MB. Service Manager switches the log when the log size reaches the maximum size defined by this parameter.

    Caution You must have configured the numberoflogfiles parameter to enable log switching.

  4. Save your changes.
  5. Restart Service Manager.

    Service Manager uses your new log file settings.

Enable log switching

Applies to User roles: System Administrator

To enable log switching, follow these steps:

  1. Stop the Service Manager server.
  2. Open the sm.ini file in a text editor.

    This file is in your Service Manager RUN directory.

  3. Type the following system parameter.

    System parameter Description
    numberoflogfiles: n

    For n, type the number of log files you want Service Manager to maintain. The minimum value is 0 (disables log switching) and the maximum value is 100. The default value is 0. If the specified number exceeds the maximum value, Service Manager uses a value of 7.

    Service Manager switches the log when the log size reaches the maximum size defined by the maxlogsize parameter. When this happens, the current log file is archived to the log file ending with 1, and the existing log files are renamed to the next higher number, so that the archive log file n+1 always contains older data than archive file n.

  4. Save your changes.
  5. Restart Service Manager.

    Service Manager uses your new log file settings.

Disable log switching

Applies to User roles: System Administrator

To disable log switching, follow these steps:

  1. Stop the Service Manager server.
  2. Open the sm.ini file in a text editor.

    This file is in your Service Manager RUN directory.

  3. Locate the numberoflogfiles parameter, and set its value to "0".

  4. Save your changes.
  5. Restart Service Manager.

    Service Manager uses your new log file settings.

 

Related topics

Server log file