7 October 2016

The getheartbeatdata command can query Corrade's heartbeat data.

CommandRequired ParametersRequired Corrade PermissionsExample
getheartbeatdatagroup, password, datagrooming
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // get the average CPU and RAM usage
            "command", "getheartbeatdata",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "data", wasListToCSV(
                [
                    "AverageCPUUsage",
                    "AverageRAMUsage"
                ]
            ),
            "callback", wasURLEscape(URL)
        ]
    )
);

Corrade heartbeats have a one minute periodicity meaning that the averages are computed cumulatively over 1 minute intervals.

Structure

The data that can be queried is the following:

ParameterDescription
HistoryLengthThe heartbeat history length maintained by Corrade for RAM and CPU.
StartTimeThe date and time when Corrade was started.
AverageCPUUsageThe average CPU usage across all heartbeats.
AverageRAMUsageThe average RAM usage across all heartbeats (in bytes).
AverageThreadsUsageThe average threads usage across all heartbeats.
CPUAverageUsageHistoryA list of CPU usage snapshots of length HistoryLength.
RAMAverageUsageHistoryA list of RAM usage snapshots of length HistoryLength.
ThreadsAverageUsageHistoryA list of thread usage snapshots of length HistoryLength.
NETAverageUsageHistoryA list of network usage snapshots of length HistoryLength.
UptimeThe Corrade uptime (in format [-][d.]hh:mm:ss[.fffffff]).
VersionThe Corrade version.
ExecutingCommandsThe number of currently executing commands.
ManifestingRLVBehavioursThe number of currently manifesting RLV behaviors.
ProcessedCommandsThe number of processed commands.
ProcessedRLVBehavioursThe number of processed RLV behaviors.

Notes