LogRotate :

 Once the folder size (/rdklogs/logs/) reaches 1536(around 1.5M), these logs will be moved to /nvram/logbackup and make them tar and pushed into local tftp log server.

Logs folder size will be periodically monitored (/rdklogs/logs folder) for upload.

rdklogs/logs will be periodically checked for the maximum size set for the logs to be uploaded.(“rdkbLogMonitor.sh” script file monitor this functionality)

In RDK-B maximum size of log directory is set to 1.5MB. This value is chosen based on storage constraints for the target platform. Can be changed to any value based on storage availability.

/rdklogs/logs will contain entire logs from boot-up till the first time upload.

Then the /rdklogs/logs/ log files will be compressed and renamed as mentioned below to enable server to fetch the logs based on MAC address of unit : <WAN Interface mac>_LOGS_<Timestamp>.tgz

During boot-up, rdkbLogMonitor.service calls rdkblogmonitor.sh for executing the logrotation feature in Turris.

Note:

1. Please edit the below line in /etc/device.properties,

                             TFTP_SERVER_IP = "local tftp server ip"

2. Please run the below command (or) reboot the Turris box

                              systemctl restart rdkbLogMonitor

3. Below steps for assigning Maximum size for log directory based on storage constraints for the target platform,

                            Add "MAXSIZE = "VALUE" " in /etc/device.properties and then reboot your Turris board (or) restart the rdkbLogMonitor service.

    

Limitation

  • This feature will support only tftp protocol for log upload and not by http and by other means.
  • nvram2Supported feature in not enabled. Once that is enabled. It will maintain log rotation log files as independent file under /nvram2/logs folder structure. Compressed tar will be created under /nvram2/logs instead of nvram/logbackup  and uploaded to TFTP server. When nvram2Supported flag in disabled state then it will follow above flow of log rotation.
  • No labels