From e8e3bbeada40d6db98c4e51fe7e4573f718f41d7 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Sat, 25 Feb 2017 13:36:23 -0800 Subject: [PATCH] Fix pointer dereference for stats --- command/alloc_status.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/alloc_status.go b/command/alloc_status.go index b2c98404e..aaf1f0dbd 100644 --- a/command/alloc_status.go +++ b/command/alloc_status.go @@ -417,7 +417,7 @@ func (c *AllocStatusCommand) outputTaskResources(alloc *api.Allocation, task str if stats != nil { if ru, ok := stats.Tasks[task]; ok && ru != nil && ru.ResourceUsage != nil { if cs := ru.ResourceUsage.CpuStats; cs != nil { - cpuUsage = fmt.Sprintf("%v/%v", math.Floor(cs.TotalTicks), resource.CPU) + cpuUsage = fmt.Sprintf("%v/%v", math.Floor(cs.TotalTicks), cpuUsage) } if ms := ru.ResourceUsage.MemoryStats; ms != nil { memUsage = fmt.Sprintf("%v/%v", humanize.IBytes(ms.RSS), memUsage)