Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

WIP

Table of Contents

Intro

As a Field Triage Engineer and Developer responsible for debugging field issues, having the ability to collect diagnostic/ debug data from the device without requiring SSH access would be beneficial. The Triage Engineer can use WebPA communication to initiate the data reporting process and retrieve the report from the S3 log service

...

Code Block
themeRDark
titleInstructions of upload server
collapsetrue
sudo apt install apache2 
sudo a2enmod dav dav_fs

# have the below content in /etc/apache2/sites-available/upload.conf
<VirtualHost *:8080>
    ServerAdmin admin@example.com
    DocumentRoot /srv/upload

    <Directory /srv/upload>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
        DAV On
    </Directory>

</VirtualHost>

sudo a2ensite upload.conf
sudo mkdir /srv/upload && sudo chown www-data:www-data /srv/upload

# add the ports to listen  in /etc/apache2/ports.conf
Listen 0.0.0.0:80
Listen 0.0.0.0:8080
<IfModule ssl_module>
	Listen 443
</IfModule>
<IfModule mod_gnutls.c>
	Listen 443
</IfModule>

#Start Apache2 server 
 sudo systemctl enable apache2 
 sudo systemctl start apache2
 chtslbcp515@chtslbcp515-Latitude-3400:~$ sudo netstat -lputnu |     grep apa
 tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1038/apache2        
 tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN              1038/apache2 

2. Assign the upload server URL to UPSTREAM_RRD_URL in /lib/rdk/uploadRRDLogs.sh

3. Testing logs

Code Block
~# dmcli eRT setv Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.IssueType string "Device.Uptime"
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
Execution succeed.

root@Filogic-GW:~# cat /rdklogs/logs/remote-debugger.log.0 
220428-17:44:16.829555 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6844] [isRRDEnabled:112]:RFC is enabled, starting remote-debugger
220428-17:44:16.889345 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [RRDEventThreadFunc:44]:Waiting for for TR69/RBUS Events... 
260122-19:38:52.063885 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6889] [_remoteDebuggerEventHandler:322]: Received event for RRD_SET_ISSUE_EVENT Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.IssueType 
260122-19:38:52.063962 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6889] [pushIssueTypesToMsgQueue:395]: SUCCESS: Message sending Done, ID=0 MSG=Device.Uptime Size=13 Type=1 AppendMode=0! 
260122-19:38:52.064019 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [getIssueInfo:191]:  Received Main Node= Device, SubNode= Uptime
260122-19:38:52.064049 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [processIssueTypeInStaticProfile:296]: Checking Static Profile... 
260122-19:38:52.067965 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [processIssueTypeInStaticProfile:312]: Issue Data Node: Device and Sub-Node: Uptime found in Static JSON File /etc/rrd/remote_debugger.json... 
260122-19:38:52.068239 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [executeCommands:350]: No MACRO found, proceeding with commands:"uptime" 
260122-19:38:52.068315 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [executeCommands:376]: Executing following commands using systemd-run:
 ""uptime""
260122-19:38:52.069350 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [executeCommands:390]: Starting remote_debugger_Device.Uptime service success...
260122-19:38:52.168889 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [executeCommands:396]: Using journalctl to log command output...
260122-19:38:52.169811 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [executeCommands:404]: journalctl remote_debugger_Device.Uptime service success...
260122-19:38:52.176470 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [executeCommands:414]: Sleeping with timeout 10 sec before stopping service...
260122-19:39:02.176595 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [executeCommands:418]: Stopping remote_debugger_Device.Uptime service...
260122-19:39:02.189241 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [uploadDebugoutput:46]: Starting Upload Debug output Script: /lib/rdk/uploadRRDLogs.sh... 
2026-01-22T19:39:02.339Z: /lib/rdk/uploadRRDLogs.sh: Executing uploadRRDLogs.sh script to upload Debug info of ISSUETYPE=DEVICE_UPTIME
2026-01-22T19:39:02.345Z: /lib/rdk/uploadRRDLogs.sh: Using upstream RRD URL: http://10.2.166.120:8080/upload
2026-01-22T19:39:02.350Z: /lib/rdk/uploadRRDLogs.sh: Checking /tmp/rrd/Device-DebugReport-2026-01-22-19-38-52 size and contents
2026-01-22T19:39:02.357Z: /lib/rdk/uploadRRDLogs.sh: Creating 020100B65218_DEVICE_UPTIME_2026-01-22-19-39-02PM_RRD_DEBUG_LOGS.tgz tarfile from Debug Commands output
2026-01-22T19:39:02.367Z: /lib/rdk/uploadRRDLogs.sh: Invoking uploadRDKBLogs.sh script to upload 020100B65218_DEVICE_UPTIME_2026-01-22-19-39-02PM_RRD_DEBUG_LOGS.tgz file
2026-01-22T19:39:02.941Z: /lib/rdk/uploadRRDLogs.sh: RRD DEVICE_UPTIME Debug Information Report upload Success
2026-01-22T19:39:02.946Z: /lib/rdk/uploadRRDLogs.sh: Removing uploaded report 020100B65218_DEVICE_UPTIME_2026-01-22-19-39-02PM_RRD_DEBUG_LOGS.tgz
260122-19:39:02.949497 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [checkIssueNodeInfo:552]: RRD Upload Script Execution Success...
260122-19:39:02.949609 [mod=REMOTEDEBUGGER, lvl=INFO] [tid=6937] [RRDEventThreadFunc:44]:Waiting for for TR69/RBUS Events... 
root@Filogic-GW:~# 

...