mirror of
https://github.com/datarhei/core.git
synced 2025-10-25 08:50:38 +08:00
Add GPU resources
This commit is contained in:
@@ -24,15 +24,26 @@ type AboutVersion struct {
|
||||
|
||||
// AboutResources holds information about the current resource usage
|
||||
type AboutResources struct {
|
||||
IsThrottling bool `json:"is_throttling"` // Whether this core is currently throttling
|
||||
NCPU float64 `json:"ncpu"` // Number of CPU on this node
|
||||
CPU float64 `json:"cpu_used"` // Current CPU load, 0-100*ncpu
|
||||
CPULimit float64 `json:"cpu_limit"` // Defined CPU load limit, 0-100*ncpu
|
||||
CPUCore float64 `json:"cpu_core"` // Current CPU load of the core itself, 0-100*ncpu
|
||||
Mem uint64 `json:"memory_used_bytes"` // Currently used memory in bytes
|
||||
MemLimit uint64 `json:"memory_limit_bytes"` // Defined memory limit in bytes
|
||||
MemTotal uint64 `json:"memory_total_bytes"` // Total available memory in bytes
|
||||
MemCore uint64 `json:"memory_core_bytes"` // Current used memory of the core itself in bytes
|
||||
IsThrottling bool `json:"is_throttling"` // Whether this core is currently throttling
|
||||
NCPU float64 `json:"ncpu"` // Number of CPU on this node
|
||||
CPU float64 `json:"cpu_used"` // Current CPU load, 0-100*ncpu
|
||||
CPULimit float64 `json:"cpu_limit"` // Defined CPU load limit, 0-100*ncpu
|
||||
CPUCore float64 `json:"cpu_core"` // Current CPU load of the core itself, 0-100*ncpu
|
||||
Mem uint64 `json:"memory_used_bytes"` // Currently used memory in bytes
|
||||
MemLimit uint64 `json:"memory_limit_bytes"` // Defined memory limit in bytes
|
||||
MemTotal uint64 `json:"memory_total_bytes"` // Total available memory in bytes
|
||||
MemCore uint64 `json:"memory_core_bytes"` // Current used memory of the core itself in bytes
|
||||
GPU []AboutGPUResources `json:"gpu"` // GPU resources
|
||||
}
|
||||
|
||||
type AboutGPUResources struct {
|
||||
Mem uint64 `json:"memory_used_bytes"` // Currently used memory in bytes
|
||||
MemLimit uint64 `json:"memory_limit_bytes"` // Defined memory limit in bytes
|
||||
MemTotal uint64 `json:"memory_total_bytes"` // Total available memory in bytes
|
||||
Usage float64 `json:"usage_general"` // Current general usage, 0-100
|
||||
UsageLimit float64 `json:"usage_limit"` // Defined general usage limit, 0-100
|
||||
Encoder float64 `json:"usage_encoder"` // Current encoder usage, 0-100
|
||||
Decoder float64 `json:"usage_decoder"` // Current decoder usage, 0-100
|
||||
}
|
||||
|
||||
// MinimalAbout is the minimal information about the API
|
||||
|
||||
Reference in New Issue
Block a user