cli: for systems with cgroups v2, fix alloation resource utilization showing 0 memory used
This commit is contained in:
parent
894e61f4dd
commit
6621bb9db5
|
@ -964,7 +964,11 @@ func getActualResources(client *api.Client, runningAllocs []*api.Allocation, nod
|
|||
}
|
||||
|
||||
cpu += stats.ResourceUsage.CpuStats.TotalTicks
|
||||
mem += stats.ResourceUsage.MemoryStats.RSS
|
||||
if stats.ResourceUsage.MemoryStats.Usage > 0 {
|
||||
mem += stats.ResourceUsage.MemoryStats.Usage
|
||||
} else {
|
||||
mem += stats.ResourceUsage.MemoryStats.RSS
|
||||
}
|
||||
}
|
||||
|
||||
resources := make([]string, 2)
|
||||
|
|
Loading…
Reference in New Issue