Logging and Log Upload are critical aspects when considering large-scale RDK deployment. CPEs have a space constraint to store device logs for future use so either we store them for a limited number of days in CPE or in cloud servers.
Logs play a crucial role in RDK deployments by providing data for deriving field metrics and assessing the criticality of situations, such as determining whether an issue needs immediate attention or can wait until the next day. Controlled log uploads, ranging from 100% to very small numbers (2-3%) based on device maturity, help manage the volume of data. Configurable upload intervals, typically set to once a day, and the right level of abstraction ensure a balance between available storage space and the logs generated. Additionally, rotate-backup-upload policies are implemented to maintain efficient log management. Log Upload uses XConf as the primary endpoint, allowing the configuration to enable or disable log upload for a device or group of devices. During bootup, the CPE retrieves configuration information from XConf, and based on rules defined in the XConf server, it can control whether a particular device needs to perform log uploads. This setup allows for the sampling of devices from a larger population. The configuration server is responsible for retrieving and delivering settings to any client, and it supports configurable upload methods such as HTTPS, HTTP, and TFTP.
RDK Log Upload Mechanism
Log uploader (/usr/bin/logupload) is responsible for gathering local logs, packaging them, and uploading them to a remote URL. A client-side scheduler would control when it executes, but it could also be activated via immediate triggers from the log upload checker or other local actions.
The Uploader is responsible for sending CPE log files to a remote file store. It performs the following:
https://github.com/rdkcentral/dcm-agent
This section describes what happens after CPE boot, how log upload is triggered (or can be triggered), which endpoint is used, how that endpoint is configured, and how upload execution happens on-device.
1) Boot-time initialization and configuration fetch
dcmd, telemetry, reboot helpers, service plugins).HTTP/HTTPS)Common config sources used at runtime
LogUploadSettings:UploadRepository:URLLogUploadSettings:UploadRepository:uploadProtocolLogUploadSettings:UploadOnReboot/etc/dcm.properties or /opt/dcm.properties (e.g., LOG_SERVER)/tmp/DCMSettings.conf (resolved runtime values)2) How log upload is triggered after boot
After boot, upload may start from any of these trigger paths:
dcmd executes scheduled job (DCM_LOGUPLOAD_SCHED).uploadstblogs_run() with trigger type TRIGGER_SCHEDULED.org.rdk.SystemServices.uploadLogs initiates immediate upload path.Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.Logging.xOpsDMUploadLogsNowuploadstblogs uploadlogsnow (on-demand immediate mode).backup_logs, reboot info, telemetry markers).TRIGGER_REBOOT (subject to timeout guards).3) Which endpoint is reached and how it is chosen
The final upload destination is selected from resolved config:
URL, uploadProtocol)LOG_SERVER) depending on caller pathDevice.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.MTLS.mTlsLogUpload.EnableSo the uploader reaches the cloud URL from DCM/XConf policy (or caller fallback), using configured protocol/security mode.
4) How it executes on-device (what runs)
Regardless of trigger source, execution pattern is:
/tmp/.log-upload.locktar.gz)uploadlogsnow writes /tmp/logUploadStatus.txt5) “Downloads and executes” clarification
In this flow, the device typically downloads configuration, not a new upload executable.
uploadstblogs/logupload path via caller)6) Quick reference table (post-boot perspective)
| Trigger source | Can happen after boot? | Typical interface | Endpoint source |
|---|---|---|---|
| DCM scheduler | Yes (periodic) | uploadstblogs_run() | XConf/DCM URL+protocol |
| MaintenanceManager | Yes | external upload command/script | resolved DCM/runtime config |
| SystemServices API | Yes (on-demand) | API -> upload command path | DCM settings + local runtime config |
| TR69hostif UploadLogsNow | Yes (immediate) | uploadstblogs uploadlogsnow | resolved upload config |
| Reboot flow | Yes (early post-boot) | uploadstblogs_run() | resolved upload config |
7) Runtime monitoring
Use:
tail -f /opt/logs/dcmscript.log
For UploadLogsNow status:
cat /tmp/logUploadStatus.txt
The value set for Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Telemetry.ConfigURL determines where the device will fetch its DCM/Telemetry settings. Those settings, in turn, provide the URL for log upload and other related parameters.
This can be retrieved from xconf server as a response to the RFC query: https://xconf.rdkcentral.com/featureControl/getSettings?<parameters>
For RDK7 release in community devices, this is set from https://github.com/rdkcentral/meta-image-assembler-rdke/blob/main/conf/community-rfc-configs.ini
To know how XConf server-side configuration and feature validation are done please refer to User guide for configuration and feature validation .