Negative total cpu time reported by the node stats REST API, closes #1297.

This commit is contained in:
Shay Banon 2011-09-02 10:13:26 +03:00
parent 8facdb2e3d
commit 63f2e84535
1 changed files with 1 additions and 0 deletions

View File

@ -56,6 +56,7 @@ public class SigarProcessProbe extends AbstractComponent implements ProcessProbe
stats.cpu.percent = (short) (cpu.getPercent() * 100); stats.cpu.percent = (short) (cpu.getPercent() * 100);
stats.cpu.sys = cpu.getSys(); stats.cpu.sys = cpu.getSys();
stats.cpu.user = cpu.getUser(); stats.cpu.user = cpu.getUser();
stats.cpu.total = cpu.getTotal();
} catch (SigarException e) { } catch (SigarException e) {
// ignore // ignore
} }