diff --git a/source/tools/monitor/unity/collector/container/cg_cpuacct_stat.lua b/source/tools/monitor/unity/collector/container/cg_cpuacct_stat.lua index 1d6ec301b38a66989d4c2782d497bcfe5ebeff90..a5d5ab07ed4c03f5c30191557a7e1598634c76e8 100644 --- a/source/tools/monitor/unity/collector/container/cg_cpuacct_stat.lua +++ b/source/tools/monitor/unity/collector/container/cg_cpuacct_stat.lua @@ -52,10 +52,10 @@ function CgCpuacctStat:proc(elapsed, lines) name = cell[1] local prev = self.values[c] local now = tonumber(cell[num]) - local rate = tonumber(((now - prev)*100.0) / self.hostCpuSum) + local rate = (100.00*tonumber((now - prev)))/ tonumber(self.hostCpuSum) values[c] = { name = name, - value = tonumber(rate) + value = rate } self.values[c] = now self.conTotal = self.conTotal + (now - prev)