Skip to content
This repository was archived by the owner on Jun 8, 2024. It is now read-only.

KSysGuardd Communication Protocol

Adrian C. Edwards edited this page Jul 3, 2020 · 2 revisions

The ksysguardd protocol appears to be a rudimentary command-line interface for polling data.

Version

The "server side" of the protocol (the one providing the "command-line interface") starts by printing out a version line (such as ksysguardd 1.2.0) followed by a newline character.

It is currently unknown what versions are available and how they affect the way the server's messages are interpreted.

Prompt

After sending the version information, the server sends a prompt, presumably indicating it is ready to receive a command. It is not known whether clients like KSysGuard will wait to receive this prompt before sending commands (i.e if the prompt was arbitrarily delayed). The prompt should be the text ksysguardd> followed by a trailing space but without a newline.

Clients are now free to send one of the following available commands:

monitors -- List available sensors
<sensor name> -- Get the value of some sensor
<sensor name>? -- Get the metadata of the sensor

Commands

After sending a command, the server should re-send the prompt to indicate it is ready for another command

monitors

This command returns a list of available sensors, one per line, in the following order:

[sensor name] [sensor data type]

Tab characters (\t) may be used as the delimiter between values, although the examples provided in the original documentation also indicate that . characters can also be used as seen below:

ksysguardd> monitors
random.integer

For more information on data types, see the Sensor Data Types page.

<sensor name> (Get command)

Retrieves a value from the sensor. When receiving this command, the server should send one unit-less value that is consistent with the indicated data type, followed by a newline.

<sensor name>? (Info command)

Returns metadata information for a particular sensor in the following order:

[sensor name] [minimum value] [maximum value] [units]

Tab characters (\t) can also be used here to separate values and a newline should follow after the last piece of information, however the examples provided in the original documentation also indicate that . characters can also be used as seen below:

ksysguardd> random?
Random Value.0.100

Some parts of this command, such as the units, and minimum and maximum value appear to be optional. Not all uses of these minimums and maximums are known, but it appears as though they are used to set the initial Y axis scaling of the graphs in KSysGuard