clearlinux/telemetrics-client

Name: telemetrics-client

Owner: Clear Linux* Project for Intel Architecture

Description: Client telemetry components

Created: 2016-06-24 17:19:45.0

Updated: 2018-05-14 14:42:32.0

Pushed: 2018-05-14 19:13:51.0

Homepage: null

Size: 370

Language: C

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Telemetrics-client

This package provides the front end component of a complete telemetrics solution for Linux-based operating systems. Specifically, the front end component includes:

A telemetrics server implementation that works with this component is available from clearlinux/telemetrics-backend.

Build dependencies
Build and installation
autogen.sh
configure
ke
Set up

There is a config file installed at

/share/defaults/telemetrics/telemetrics.conf

To make modifications, copy that file to

/telemetrics/telemetrics.conf

and modify the /etc version.

Descriptions of config options are listed below in the Usage section.

Starting the daemon

Method 1 (recommended):

temctl start telemd.socket telemd.path

Note: the above invocation technically readies the service for both socket and path activation, so you may not see the daemon start right away.

Method 2:

emctl start telemd.service

Method 3:

md &
Configure the daemon to autostart at boot

Method 1 (recommended):

Enable the socket-activated service and path unit:

emctl enable telemd.socket telemd.path

Method 2:

Enable the service itself, which automatically enables the socket and path units as well:

emctl enable telemd.service
Usage

Once the daemon is running, the telemetrics probes will be ready to use.

Available probes:

The daemon uses the following configuration options from the configuration file:

mkdir -p /var/spool/telemetry
chown -R telemetry:telemetry /var/spool/telemetry
systemctl restart telemd.service
Data reported

The data reported by the telemetry client could be understood as two main sets: metadata and a payload.

The metadata is used to report details of a machine's architecture. The following are the metadata values currently collected (Record Format Version 4):

The payload as mentioned above is reported by probes. The telemetry library adds the metadata to the payload (done programatically when using library API) for more information about probes go here.

Machine id

The machine id reported by the telemetry client is rotated every 3 days for privacy reasons. If you wish to have a static machine id for testing purposes, you can opt in by creating a static machine id file named “opt-in-static-machine-id” under the directory “/etc/telemetrics/“. Where “unique machine ID” is your desired static machine ID:

dir -p /etc/telemetrics
ho "unique machine ID" > /etc/telemetrics/opt-in-static-machine-id

The telemetry daemon reads, at most, the first 32 characters from this file uses it for the machine id. You can put a string like 'my-machine-name' in this file to easily identify your machine. Restart telemd for the machine id changes to take effect by running:

stemctl restart telemd.service

You can switch back to the rotating machine id by deleting the override file and restarting the daemon. You can do a quick test to check that your machine-id has changed by running “hprobe” and verifying that a record has landed on your backend telemetrics server, with the specified machine id.

Event Id

This is a 32 character lowercase hexadecimal string i.e. '5de9de8d5f3c6a7d445d75ba01cc3322'. This header is used to group multiple records by an event id. Before this header every single record could have been thought of an event, however this is not always the case. There are “events” that trigger the creation of multiple records (i.e. updates). The `event_id` header was added for probes with the capability to detect events and group records based on such events. This header was added to

 form) switch.

-e, –event-id Event id to use in the record

gging locally with telemetrics-client
-------------------------------------------

function of the telemetrics-client is to handle the transport of information
rted by a probe to a backend (see ```server``` key in configuration). This
rmation is helpful for developers to debug and fix reported crashes, however
lopers not always have access to the backend in these case users can leverage
ures added for local debugging. The following is a list of steps to enable
l debug:

nabling record retention*: this step configures telemd to keep
es of telemetry records locally. To enable record retention set the value of
mber to restart the daemon after configuration values are updated
telemctl restart```).

reating a record*: run ```hprobe``` command to create a record for the purposes
his step by step guide. Once we have the record or records that you need to
ure locally you can display the data.

isplaying record metadata*: telemd keeps metadata of any valid record,
isplay this data a new option to telemctl was added ```telemctl journal```.
ming that the last record created was the record from previous step `hprobe` we
use `tail -n 1` to print the last created record only, i.e.

$ sudo telemctl journal | tail -n 1 $ org.clearlinux/hello/world Mon 2018-04-02 17:48:01 UTC a19a0d41ba16788881e274b19b8a1be4 5de9de8d5f3c6a7d445d75ba01cc3322 60c014cd-4693-40f1-b334-548cd932949b

headers for the metadata (along with other information) can be printed using the

do telemctl journal -V | head -n 1
assification             Time stamp              Record ID                    Event ID                     Boot ID
do telemctl journal --record_id a19a0d41ba16788881e274b19b8a1be4 --include_record
g.clearlinux/hello/world     Mon 2018-04-02 17:48:01 UTC a19a0d41ba16788881e274b19b8a1be4 5de9de8d5f3c6a7d445d75ba01cc3322 60c014cd-4693-40f1-b334-548cd932949b
llo

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.