Configuring the rotation of trace files

August 21, 2023

ID 76616

You can configure the settings of rotation of trace files, such as maximum trace file size and number of trace files to be saved. When these limits are exceeded, the old trace files are overwritten with new trace files. The trace file rotation settings make it possible to limit the volume of memory that can be taken up by the trace log.

To configure the trace file rotation settings:

  1. Export the program's general settings to an XML file using the command:

    # /opt/kaspersky/klms/bin/klms-control --get-app-settings -f <file name>

  2. Open the XML file to edit the settings.
  3. Specify the trace file rotation settings. To do so, specify the values of the following settings in the <tracerSettings> section:
    1. Specify one of the following values in the <rotationPeriod> subsection:
      • NoRotation. Old trace files are overwritten with new trace files when the values of the <rotationFileSize> setting or the <maxFileCount> setting are exceeded.
      • Monthly. Old trace files are overwritten with new trace files monthly when the values of the <rotationFileSize> setting or the <maxFileCount> setting are exceeded.
      • Weekly. Old trace files are overwritten with new trace files weekly when the values of the <rotationFileSize> setting or the <maxFileCount> setting are exceeded.
      • Daily. Old trace files are overwritten with new trace files daily when the values of the <rotationFileSize> setting or the <maxFileCount> setting are exceeded.
      • Hourly. Old trace files are overwritten with new trace files hourly when the values of the <rotationFileSize> setting or the <maxFileCount> setting are exceeded.

      The default value is NoRotation.

    2. In the <rotationFileSize> subsection, specify the maximum size of the trace file (in bytes). When this limit is exceeded, the old trace file is overwritten with a new trace file.

      By default, the value is set to 100 MB.

    3. In the <maxFileCount> subsection, specify the maximum number of trace files that can be stored at any one time. When the number of trace files exceeds this limit, the trace files are overwritten with new files.

      By default, the value is set to 10.

  4. Save the changes made.
  5. Import the program's general settings from an XML file using the command:

    # /opt/kaspersky/klms/bin/klms-control --set-app-settings -f <file name>

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.