mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Not reset-ing the list of pids if they don't change
This commit is contained in:
@@ -362,7 +362,7 @@ func (c *AllocStatusCommand) taskResources(alloc *api.Allocation, stats map[stri
|
||||
memUsage := strconv.Itoa(resource.MemoryMB)
|
||||
if ru, ok := stats[task]; ok && ru != nil && ru.ResourceUsage != nil {
|
||||
if cs := ru.ResourceUsage.CpuStats; cs != nil {
|
||||
cpuUsage = fmt.Sprintf("%v/%v", math.Floor(cs.Ticks), resource.CPU)
|
||||
cpuUsage = fmt.Sprintf("%v/%v", math.Floor(cs.TotalTicks), resource.CPU)
|
||||
}
|
||||
if ms := ru.ResourceUsage.MemoryStats; ms != nil {
|
||||
memUsage = fmt.Sprintf("%v/%v", humanize.Bytes(ms.RSS), resource.MemoryMB)
|
||||
|
||||
Reference in New Issue
Block a user