Fix wrong memory limit, add total memory, add cpu and memory consumed by core itself to node resources

This commit is contained in:
Ingo Oppermann
2024-07-25 21:13:49 +02:00
parent e54bb4ee7c
commit d391e274d7
7 changed files with 40 additions and 1 deletions

View File

@@ -22,8 +22,11 @@ type ClusterNodeResources struct {
NCPU float64 // Number of CPU on this node
CPU float64 // Current CPU load, 0-100*ncpu
CPULimit float64 // Defined CPU load limit, 0-100*ncpu
CPUCore float64 // Current CPU load of the core itself, 0-100*ncpu
Mem uint64 // Currently used memory in bytes
MemLimit uint64 // Defined memory limit in bytes
MemTotal uint64 // Total available memory in bytes
MemCore uint64 // Current used memory of the core itself in bytes
Error error
}
@@ -145,8 +148,11 @@ func (c *cluster) About() (ClusterAbout, error) {
NCPU: nodeAbout.Resources.NCPU,
CPU: nodeAbout.Resources.CPU,
CPULimit: nodeAbout.Resources.CPULimit,
CPUCore: nodeAbout.Resources.CPUCore,
Mem: nodeAbout.Resources.Mem,
MemLimit: nodeAbout.Resources.MemLimit,
MemTotal: nodeAbout.Resources.MemTotal,
MemCore: nodeAbout.Resources.MemCore,
Error: nodeAbout.Resources.Error,
},
}