Skip to content

Stats API

Method Name Request Type Response Type Description
GetStats StatsRequest StatsResponse Get process statistics
GetSysinfo StatsRequest SysinfoResponse Get host system information

Load stats over different time frames

Field Type Label Description
Load1Min float
Load5Min float
Load15Min float

Memory stats info

Field Type Label Description
Total uint64
Free uint64
Available uint64
Cached uint64

Statistics for a singular process

Field Type Label Description
Name string
User float
Sys float
ResSetSize uint64

Cummulative process stats

Field Type Label Description
CpuProcesses ProcessStat repeated
MemProcesses ProcessStat repeated
Total uint64
Running uint64
UserCycles uint64
SysCycles uint64
TotalCycles uint64

Empty stats request message

Combined stats response message

Field Type Label Description
Memory MemoryStats
Load LoadStats
Process ProcessStats
Field Type Label Description
GhafVersion string
SecureBoot bool optional
DiskEncrypted bool optional
.proto Type Notes Go Type
double float64
float float32
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64
uint32 Uses variable-length encoding. uint32
uint64 Uses variable-length encoding. uint64
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64
sfixed32 Always four bytes. int32
sfixed64 Always eight bytes. int64
bool bool
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string
bytes May contain any arbitrary sequence of bytes. []byte