Currently, the OpenSAF trace file size is limited to 5 MB, and the number of backups to nine. If a longer trace is needed, we would need to make the file size and / or number of backups configurable.
Solution:
To make the trace file size and number of backups configurable we are introducing the transportd.conf like below. This file was read in startup of transportd and logwriter will be configured with below values. If we want to change these values dynamically the transportd.conf was read in SIGUSR2 handling and propagated to newly created streams and logwriter objects. Already created streams and log writer objects are not touched
# This file contains configuration for the Transportd service # See the file osaf/services/infrastructure/dtm/README for more configuration options. # # TRANSPORT_MAX_LOG_FILESIZE: The maximum size of the log file. The size value should # be in MB's i.e if you give 6 then it is treated as 6 MB. By default value will be # 5 MB TRANSPORT_MAX_LOG_FILESIZE=5 # # TRANSPORT_NO_OF_BACKUP_LOG_FILES: Number of backup files to maintain. Log rotation will # be done based on this value. Default value will be 9 # i.e totally 10 log files will be maintain. TRANSPORT_NO_OF_BACKUP_LOG_FILES=9
Diff:
Pushed to the repo using the below commit. PR document has to be updated for this change I will update it.
commit 4ef784cb003573376727e4f4539129326d3e4ab2
Author: syam-talluri syam.talluri@oracle.com
Date: Fri Mar 16 15:15:12 2018 +0530