Setting Server Log Size

Manually set the server log file size, and the number of rollover archive files to maintain in the serviceability.xml configuration file.

By default:, the server log files grow to 20MB before rolling over, and 12 archived file instances are retained (for a total of 13 files, named hostname-smp-server.log, hostname-smp-server_1.log, hostname-smp-server_2.log, and so forth).Upon reaching the maximum size, the log overwrites the oldest archived file, and a new log is created. Since the log fills up quickly, establish a file size and rollover policy that meets your record-keeping and troubleshooting needs. For example, you might want to keep more and smaller files, and you might want to copy archive files to storage for later analysis before they are overwritten.

You must have sufficient file space to support your decision. To calculate log file system usage, use this formula:
(Max - Min + 2) * Size = System Usage
If you have sufficient file space, SAP recommends:
  • MinIndex = 1; MaxIndex = 9
  • MaxFileSize = 20MB
(9 - 1 + 2) * 20MB = 200MB
  1. From File Manager, navigate to SMP_HOME\Server\log\Server\configuration\ .
  2. Open serviceability.xml in an editor such as Microsoft WordPad.
  3. Set server log file values:
    1. Search for <appender name="LJS_LOG_FILE".
      <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
         <FileNamePattern>log/hostname-smp-server_%i.log</FileNamePattern>
         <MinIndex>1</MinIndex>
         <MaxIndex>12</MaxIndex>
      </rollingPolicy>
      <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
         <MaxFileSize>20MB</MaxFileSize>
      </triggeringPolicy>
      
    2. For rolling policy, set the number of archived file instances. For example, change the <MaxIndex>12</MaxIndex> value from 12 (the default) to 20 to create more archived files.
    3. For triggering policy, set the server log size. For example, change the <MaxFileSize>20MB</MaxFileSize> value from 20MB (the default) to 5MB to create smaller archive files:
    4. Compare the server log system usage requirements:
      Default:
      (12 - 1 + 2) * 20MB = 260MB
      Updated:
      (20 - 1 + 2) * 5MB = 105MB
  4. Save and close the file.
  5. Restart SAP Mobile Platform Server for the changes to take effect.