Skip to content

evlaV/steamos-log-submitter

Repository files navigation

SteamOS Log Submitter

Generic infrastructure for log submission to Valve's servers

Design

SteamOS Log Submitter (or SLS for short) is designed to run periodically via systemd to collect logs from various sources and submit them to their respective services maintained by Valve. As each different type of log collected may require a different flow to be submitted, SLS includes helpers that know what the various types of logs its looking for are, how they should be prepared for submission, and how to submit them. Each category of log gathered has its own helper and its own pending, uploaded, and failed directories.

SLS has two distinct phases, which each helper hooks into:

  1. Collect
  2. Submit

Collection is optional and is used to ingest logs from various different sources into the pending directory. Since many logging sources can be configured to just output the logs into the pending directory, many helpers do nothing in this phase.

Submission iterates over the logs in the pending directory and attempts to upload them one at a time. Any logs that are successfully uploaded get moved to the uploaded directory, and any that fail either stay in the pending directory to be retried later, or are moved to the failed directory in the case of a permanent failure. All three directories get pruned, but the uploaded directory has a much shorter time-to-live for the files since they've already been submitted and only remain for local reference if needed.

Configuration

SteamOS Log Submitter has three different configuration files, loaded in order:

  1. "Base" configuration
  2. "User" configuration
  3. "Local" configuration

The "base" configuration is shipped with SLS and should not be modified. The "user" configuration can be modified manually by the end-user and its path is specified in the "base" configuration, either by setting the UID for the associated Steam user on the local computer, or by a manual path. By default, it looks for the Steam directory for UID 1000. The "local" configuration is stored in SLS's /var directory and is used for keeping track of state, generally by some helpers. As such, it should not be modified directly.

The root configuration section is called sls. Some relevant keys include:

  • enable: on to enable SLS, off to disable it entirely
  • collect: on to enable the collection phase, off to disable it
  • submit: on to enable the submission phase, off to disable it

Each helper gets its own section in the config file, denoted by the helpers.[name] section, where [name] is the name of the helper, e.g. helpers.kdump would be the configuration section for the kdump helper. A specific helper can be enabled or disabled manually by setting enable to on or off in its respective section.

Included helpers

The following helpers are included with SLS:

  • gpu: submits traces from GPU crashes.
  • kdump: submits kernel panic traces gathered by kdump.
  • minidump: submits minidumps generated by applications crashing locally.
  • journal: submits journal logs from SteamOS-related systemd units that are failing to run.
  • sysinfo: collects and submits information about various sytem information, including which peripherals are used on the device.

License

SteamOS Log Submitter is licensed under the LGPL, version 2.1 or newer. See the included LICENSE.txt file for the text of LGPL 2.1.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •