
{"id":11467,"date":"2023-12-08T11:43:33","date_gmt":"2023-12-08T11:43:33","guid":{"rendered":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/"},"modified":"2025-03-25T05:18:32","modified_gmt":"2025-03-25T05:18:32","slug":"log_upload","status":"publish","type":"page","link":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/","title":{"rendered":"Log Upload"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n <html><body><p><br>\n <\/p>\n<div class=\"contentLayout2\">\n<div class=\"columnLayout single\" data-layout=\"single\">\n<div class=\"cell normal\" data-type=\"normal\">\n<div class=\"innerCell\">\n<div class=\"toc-macro client-side-toc-macro conf-macro output-block\" data-headerelements=\"H1,H2,H3,H4,H5,H6,H7\" data-hasbody=\"false\" data-macro-name=\"toc\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"columnLayout single\" data-layout=\"single\">\n<div class=\"cell normal\" data-type=\"normal\">\n<div class=\"innerCell\">\n\n\n<h2 class=\"wp-block-heading wp-main-header\"><span>Introduction<\/span><\/h2>\n\n\n<p><span><span class=\"inline-comment-marker\" data-ref=\"3d8c26c8-250e-4ff9-91e6-9840014fd980\">Logging and Log Upload are critical aspects when considering large-scale RDK deployment. CPE<\/span><span class=\"ui-provider a b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak\"><span class=\"inline-comment-marker\" data-ref=\"3d8c26c8-250e-4ff9-91e6-9840014fd980\">s 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.<\/span><\/span><\/span><\/p>\n<p><span><span class=\"ui-provider a b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak\">Logs play a crucial role in RDK deployments by providing data for deriving field matrices 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.&nbsp;<\/span><\/span><span>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.<\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"columnLayout single\" data-layout=\"single\">\n<div class=\"cell normal\" data-type=\"normal\">\n<div class=\"innerCell\">\n<hr><\/div>\n<\/div>\n<\/div>\n<div class=\"columnLayout single\" data-layout=\"single\">\n<div class=\"cell normal\" data-type=\"normal\">\n<div class=\"innerCell\">\n\n\n<h2 class=\"wp-block-heading wp-main-header\">Architecture<\/h2>\n\n\n<p><strong>RDK Log Upload Mechanism<\/strong><\/p>\n<div class=\"conf-macro output-block\" data-hasbody=\"false\" data-macro-name=\"drawio\">\n<div class=\"drawio-macro\" data-macroid=\"cf2e9891-e3ca-480d-a301-a7faec937382\" data-buildnum=\"9012\" id=\"drawio-macro-content-cf2e9891-e3ca-480d-a301-a7faec937382\"><\/div>\n<div id=\"drawio-macro-data-cf2e9891-e3ca-480d-a301-a7faec937382\"><img decoding=\"async\" src=\"https:\/\/developer.rdkcentral.com\/documentation\/wp-content\/uploads\/sites\/16\/2024\/10\/Log_Upload.png\" alt=\"Log_Upload\" title=\"Log_Upload\"><\/div>\n<\/div>\n<p>Log uploader scripts are 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.<\/p>\n<p>The Uploader is responsible for sending CPE log files to a remote file store. It performs the following:<\/p>\n<ul>\n<li><span>Responds to triggers (i.e. from cron)<\/span><\/li>\n<li><span>Checks local Device Settings for the URL of the file store, the logs it should send, and the repository it should use<\/span><\/li>\n<li><span>Gets connection credentials<\/span><\/li>\n<li><span>Makes a connection to the remote server and sends the files<\/span><\/li>\n<\/ul>\n<h3 id=\"LogUpload-HowCPEsUploadLogsandMetrics\"><span>How CPEs Upload Logs and Metrics<\/span><\/h3>\n<p><span>CPEs check with XConf for their logging and telemetry configuration through a query. Part of their query string includes several (about four) parameters of this particular CPE, such as the MAC address, model, current firmware version, and environment. The XConf server looks at these parameters and runs them through a rules engine that finds the closest targeting rule match to the CPE&rsquo;s profile. Once it finds a match, it retrieves the configuration for that rule. The configuration includes things like an upload schedule, repository URL, upload protocol, path to the file server, protocol indicator, upload time smear, and more. Once the CPE gets the response, it parses it and sets the specified random schedule that delays uploading the files. At that time, the CPE packages up all of its log files, compresses the bundle and uploads the archive to the destination.<\/span><\/p>\n<p>The DCM service, which can be checked using the command <strong>$systemctl status dcm-log<\/strong>, is responsible for log upload in CPE. This service runs as a system service and invokes <strong>\/lib\/rdk\/StartDCM.sh<\/strong> on start-up. The StartDCM.sh script internally calls <strong>\/lib\/rdk\/DCMscript.sh<\/strong> for log upload. Once the logs are prepared, the script <strong>\/lib\/rdk\/uploadSTBLogs.sh<\/strong> takes over the actual uploading task. To monitor the log upload process, you can use the command $tail -f \/opt\/logs\/dcmscript.og.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"columnLayout single\" data-layout=\"single\">\n<div class=\"cell normal\" data-type=\"normal\">\n<div class=\"innerCell\">\n<hr><\/div>\n<\/div>\n<\/div>\n<div class=\"columnLayout single\" data-layout=\"single\">\n<div class=\"cell normal\" data-type=\"normal\">\n<div class=\"innerCell\">\n\n\n<h2 class=\"wp-block-heading wp-main-header\">Configuration Details<\/h2>\n\n\n<p><span>&#8288;To know how XConf <span class=\"inline-comment-marker\" data-ref=\"57416258-70ad-4ad0-a48f-65d6db03450d\">server<\/span>-side configuration and feature validation are done please refer to <\/span><a href=\"\/documentation\/documentation\/device_management\/xconf\/xconf_server_-_user_guide_for_configuration_and_feature_validation\" rel=\"nofollow\">XConf Server &#8211; User guide for configuration and feature validation<\/a> .<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/p><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Logging and Log Upload are critical aspects when considering large-scale RDK deployment. CPEs have [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":0,"parent":11460,"menu_order":2,"comment_status":"open","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-11467","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Log Upload - RDK Documentation Portal | Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Log Upload - RDK Documentation Portal | Documentation\" \/>\n<meta property=\"og:description\" content=\"Introduction Logging and Log Upload are critical aspects when considering large-scale RDK deployment. CPEs have [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/\" \/>\n<meta property=\"og:site_name\" content=\"RDK Documentation Portal | Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-25T05:18:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/developer.rdkcentral.com\/documentation\/wp-content\/uploads\/sites\/16\/2024\/10\/Log_Upload.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/\",\"name\":\"Log Upload - RDK Documentation Portal | Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/developer.rdkcentral.com\/documentation\/wp-content\/uploads\/sites\/16\/2024\/10\/Log_Upload.png\",\"datePublished\":\"2023-12-08T11:43:33+00:00\",\"dateModified\":\"2025-03-25T05:18:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/#primaryimage\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/wp-content\/uploads\/sites\/16\/2024\/10\/Log_Upload.png\",\"contentUrl\":\"https:\/\/developer.rdkcentral.com\/documentation\/wp-content\/uploads\/sites\/16\/2024\/10\/Log_Upload.png\",\"width\":557,\"height\":358},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documentation\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Device Management\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Xconf\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Log Upload\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/\",\"name\":\"RDK Documentation Portal | Documentation\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Log Upload - RDK Documentation Portal | Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/","og_locale":"en_US","og_type":"article","og_title":"Log Upload - RDK Documentation Portal | Documentation","og_description":"Introduction Logging and Log Upload are critical aspects when considering large-scale RDK deployment. CPEs have [&hellip;]","og_url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/","og_site_name":"RDK Documentation Portal | Documentation","article_modified_time":"2025-03-25T05:18:32+00:00","og_image":[{"url":"https:\/\/developer.rdkcentral.com\/documentation\/wp-content\/uploads\/sites\/16\/2024\/10\/Log_Upload.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/","url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/","name":"Log Upload - RDK Documentation Portal | Documentation","isPartOf":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website"},"primaryImageOfPage":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/#primaryimage"},"image":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/#primaryimage"},"thumbnailUrl":"https:\/\/developer.rdkcentral.com\/documentation\/wp-content\/uploads\/sites\/16\/2024\/10\/Log_Upload.png","datePublished":"2023-12-08T11:43:33+00:00","dateModified":"2025-03-25T05:18:32+00:00","breadcrumb":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/#primaryimage","url":"https:\/\/developer.rdkcentral.com\/documentation\/wp-content\/uploads\/sites\/16\/2024\/10\/Log_Upload.png","contentUrl":"https:\/\/developer.rdkcentral.com\/documentation\/wp-content\/uploads\/sites\/16\/2024\/10\/Log_Upload.png","width":557,"height":358},{"@type":"BreadcrumbList","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/log_upload\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":2,"name":"Documentation","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":3,"name":"Device Management","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/"},{"@type":"ListItem","position":4,"name":"Xconf","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/"},{"@type":"ListItem","position":5,"name":"Log Upload"}]},{"@type":"WebSite","@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website","url":"https:\/\/developer.rdkcentral.com\/documentation\/","name":"RDK Documentation Portal | Documentation","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/11467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/comments?post=11467"}],"version-history":[{"count":5,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/11467\/revisions"}],"predecessor-version":[{"id":11523,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/11467\/revisions\/11523"}],"up":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/11460"}],"wp:attachment":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/media?parent=11467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}