com.webos.rdxd

API Summary

Remote diagnostics daemon to accept/generate crash, analytic and overview reports.

Overview of the API

rdxd is a daemon that gathers and passes analytics and crash information to processing services. Processing services can be configured via JSON configuration files (in /etc/rdxd.d directory) to be called when appropriate report type arrived. Remote diagnostics daemon either accepts reports from external sources (crashd, PmLogDaemon) or generates reports internally (overview report on daemon start).

Note: This API should be used solely by developers and testing components for development/testing purposes.

Methods

getLogSettings

Description

Gets the current settings for crash and analytic reports upload.

Note: No pre-post requirements for calling this method.

Parameters

None

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Always returns true.

analyticsLogRequiredBoolean

Indicates whether the analytics report is uploaded to processing services. Possible values are:

  • true - upload analytics report.
  • false - do not upload the analytics report.
crashLogRequiredBoolean

Indicates whether the crash report is uploaded to processing services. Possible values are:

  • true - upload crash report.
  • false - do not upload the crash report.

Example

# luna-send -n 1 -f luna://com.webos.rdxd/getLogSettings '{}'

Sample response:

{

    "returnValue": "true",

    "analyticsLog": "true",

    "crashLog": "false"

}

setLogSettings

Description

Specifies whether the analytics and crash reports are to be uploaded to processing services.

Note: No pre-post requirements for calling this method.

Parameters

Name

Required

Type

Description

analyticsLogRequiredBoolean

Indicates whether the analytics report is to be uploaded to processing services. Possible values are:

  • true - upload analytics report.
  • false - do not upload the analytics report.
crashLogRequiredBoolean

Indicates whether the crash report is to be uploaded to processing services. Possible values are:

  • true - upload crash report.
  • false - do not upload the crash report.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

analyticsLogOptionalBoolean

Indicates whether the analytics report is to be uploaded to processing services. Possible values are:

  • true - upload analytic report.
  • false - do not upload the analytics report.
crashLogOptionalBoolean

Indicates whether the crash report is to be uploaded to processing services. Possible values are:

  • true - upload crash report.
  • false - do not upload the crash report.

Error Codes Reference

Error Code

Error Text

Error Description

-1parameter not found

Schema validation failed - call does not contain all required parameters or some parameters of invalid type.

Example

Sample code to upload the analytics log...

# luna-send -n 1 -f luna://com.webos.rdxd/setLogSettings '{
      "analyticsLog": true,
      "crashLog": false
}'

makeReport

Description

Generate a crash report for the given report parameters and pass it for further processing to all services registered to crash report processing.

Use this method to generate crash report using custom parameters and optional crash dump file (for testing/development purposes)

Pre-post requirements - specified crash dump file should exist and allow read access to it contents.

Parameters

Name

Required

Type

Description

detailRequiredString

Details of the crash to be added in the summary of the report.

(Example: crash location, backtrace information)

causeOptionalString

Event that triggers the crash report. This usually provides information on which component crashed and at what location this crash happened. The default value is "manual report".
(Example: QtWebPluginProcess crashes at location /usr/lib/libumedia_api.so.1)

componentOptionalString

Component originating the crash. The default value is empty string.

(Example: QtWebPluginProcess.)

reportPathOptionalString

Full path to file to be used as crash dump for generated crash report.

reportNameOptionalString

Original file name for passed crash dump file, usually in format ProcessName.PID.

(Example: QtWebProcessEngine.1234)

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error Codes Reference

Error Code

Error Text

Error Description

Noneno detail in payload

No crash detail specified in method call.

2Upload switch is disabled for crash reports

Upload option is disabled for crash reports.

3EULA is not accepted

EULA is not accepted or disallowed sending of additional data.

2Crash report does not exist

Passed custom crash dump file does not exist.

2Could not copy crash report into temporary location

Failed to copy passed crash dump file into temporary directory.

2Could not make unique temporary file

Failed to make unique temporary file for crash report.

2Could not make sysinfo dump

Failed to generate dump of dynamic system state.

Noneunknown error

Unknown error occured while executing method.

Example

Sample code to make a report...

# luna-send -n 1 -f luna://com.webos.rdxd/makeReport '{
      "detail": "report"
}'

makeLogReport

Description

Generate an analytic report for the given report file and pass it for further processing to all services registered to analytic report processing.

Use this method to generate analytic report using custom report file (for testing/development purposes)

Pre-post requirements - report file should exist and allow read access to it contents.

Parameters

Name

Required

Type

Description

filepathRequiredString

Filename (with the entire path) of the custom analytic log file. This file is used to generate analytics report.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error Codes Reference

Error Code

Error Text

Error Description

NoneCould not extract filepath

File path not specified in method call.

NoneEULA has not accepted yet, analytics reports will not be created

EULA is not accepted or disallowed sending of additional data.

NoneDevmode is enabled, analytics reports will not be generated

Developers mode is enabled.

NoneUpload switch is disabled for analytic reports

Upload option is disabled for analytic reports.

NoneSpecified file does not exist

Passed file path does not exist.

NoneCould not copy report into temporary location

Service could not copy passed file into temporary location.

Noneunknown error

Unknown error occured while executing method.

Example

Precondition: In the config service, set the value for "system.collectDevLogs" to false.

# luna-send -n 1 luna://com.webos.service.config/setConfigs '{"configs":{"system.collectDevLogs": false}}'

 

Sample code to make log report with defined file-path

# luna-send -n 1 -f luna://com.webos.rdxd/makeLogReport '{"filepath": "/path/to/file"}'

Contents