Configuration
Thunder uses a JSON configuration file to modify the its behaviour. By default it looks for a config file in /etc/Thunder/config.json
on Linux, although a custom path can be specified at launch.
When building Thunder, it will generate a default config file based on the options provided to CMake at configure-time using the generic config builder here: https://github.com/rdkcentral/Thunder/blob/master/Source/Thunder/GenericConfig.cmake
This section documents the available options for Thunder. This is different from the plugin-specific configuration which is documented elsewhere.
Note
Any options that are children of a parent option are documented as parent.child
. E.G parentOption.childOption = true
equates to the following JSON
{
"parentOption":{
"childOption":true
}
}
Configuration Options
Option Name | Description | Data Type | Default | Example |
---|---|---|---|---|
model | Friendly name for the device Thunder is running on. Can be overridden with the MODEL_NAME env var |
string | - | My STB |
port | The port Thunder will listen on for HTTP(S) requests. | integer | 80 | 9998 |
binding | The interface Thunder will bind to and listen on. Set to 0.0.0.0 to listen on all available interfaces. |
string | 0.0.0.0 | 127.0.0.1 |
interface | The network interface Thunder will bind on. If empty, will pick the first appropriate interface. | string | - | eth0 |
prefix | URL prefix for the REST/HTTP endpoint | string | Service | |
jsonrpc | URL prefix for the JSON-RPC endpoint | string | jsonrpc | |
persistentpath | Directory to store persistent data in. Each plugin will have an associated directory underneath this corresponding to the callsign of the plugin. |
string | - | /opt/thunder/ |
datapath | Read-only directory plugins can read data from. Each plugin will have an associated directory underneath this corresponding to the callsign of the plugin. |
string | - | usr/share/thunder |
systempath | Directory plugin libraries are installed and available in | string | - | /usr/lib/thunder/ |
volatilepath | Directory to store volatile temporary data. Each plugin will have an associated directory underneath this corresponding to the callsign of the plugin |
string | /tmp | /tmp/ |
proxystubpath | Directory to search for the generated proxy stub libraries | string | - | /usr/lib/thunder/proxystubs |
postmortempath | Directory to store debugging info (worker pool information, debug data) in the event of a plugin or server crash. If breakpad is found during build, will store breakpad mindumps here |
string | /opt/minidumps | /opt/minidumps |
communicator | Socket to listen for COM-RPC messages. Can be a filesystem path on Linux for a Unix domain socket, or a TCP socket. For unix sockets, the file permissions can be specified by adding a | followed by the numeric permissions |
string | /tmp/communicator|0777 | 127.0.0.1:4000 |
redirect | Redirect incoming HTTP requests to the root Thunder URL to this address | string | http://127.0.0.1/Service/Controller/UI | http://127.0.0.1/Service/Controller/UI |
idletime | Amount of time (in seconds) to wait before closing and cleaning up idle client connections. If no activity occurs over a connection for this time Thunder will close it. | integer | 180 | 180 |
softkillcheckwaittime | When killing an out-of-process plugin, the amount of time to wait after sending a SIGTERM signal to the process before checking & trying again | integer | 3 | 3 |
hardkillcheckwaittime | When killing an out-of-process plugin, the amount of time to wait after sending a SIGKILL signal to the process before trying again | integer | 10 | 10 |
legacyinitalize | Enables legacy Plugin initialization behaviour where the Deinitialize() method is not called on if Initialize() fails. For backwards compatibility | bool | false | false |
defaultmessagingcategories | See "Messaging configuration" below | object | - | - |
defaultwarningreportingcategories | See "Warning Reporting Configuration" below | array | - | - |
process.user | The Linux user the Thunder process runs as | string | - | myusr |
process.group | The Linux group the Thunder process runs under | string | - | mygrp |
process.priority | The nice priority of the Thunder process | integer | - | 0 |
process.policy | The linux scheduling priority of the Thunder process. Valid values are: Batch , FIFO , Idle , RoundRobin , Other |
string | - | OTHER |
process.oomadjust | The OOM killer score (see here for more info) | integer | - | 0 |
process.stacksize | The default stack size in bytes for spawned threads. If not set or 0, will use to Linux defaults | integer | - | 4096 |
process.umask | Set the Thunder umask value | integer | - | 077 |
input.locator | If using Thunder input handling. Socket to receive key events over | string | /tmp/keyhandler|0766 | - |
input.type | If using Thunder input handling. Input device type (either device (/dev/uinput ) or virtual (json-rpc api) |
string | Virtual | Device |
input.output | If using Thunder input handling. Whether input events should be re-output for forwarding | bool | true | - |
configs | Directory to search for plugin config files | string | If not set, will default to <thunder-config-directory>/plugins (e.g. /etc/Thunder/plugins) |
/etc/thunder/plugins |
ethernetcard | Deprecated Using the MAC address of this interface, Thunder will generate a unique identifier |
string | - | eth0 |
plugins | Deprecated Array of plugin configurations. Not recommended - each plugin should have its own config file. Normally only used for Controller plugin configuration |
array | - | - |
environments | Array of environment variables to set for the Thunder process. Each item in the array should be an object with key , value , and override properties.Values can be built from path substitutions (e.g. %persistentpath% ) |
array | - | [{"name": "FOO", "value": "BAR", "override": true}] |
exitreasons | Array of plugin exit/deactivation reasons that should result in the postmortem handler being triggered (e.g. to create minidump, dump worker thread status) | array | - | ["Failure","MemoryExceeded","WatchdogExpired"] |
messagingport | By default, the messaging engine sends log/trace messages over a unix socket. Provide a TCP port here to use that port instead if desired | int | - | 3000 |
processcontainers.logging | Path for container logs if using process container. Behaviour will vary depending on container backend | string | - | - |
linkerpluginpaths | Array of additional directories to search for .so files | array | - | - |
observe.proxystubpath | Directory to monitor for new proxy stub libraries. If libraries are added during runtime, Thunder will load these new proxystubs | string | - | /root/thunder/dynamic/proxystubs |
observe.configpath | Directory to monitor for new plugin configuration files. If config files are added during runtime, Thunder will load them | string | - | /root/thunder/dynamic/config |
hibernate.locator | Configuration for the process hibernation feature (alpha) | string | - | - |