diff --git a/src/main/java/org/codelibs/fess/timer/SystemMonitorTarget.java b/src/main/java/org/codelibs/fess/timer/SystemMonitorTarget.java index 67836571b..0445ee3e0 100644 --- a/src/main/java/org/codelibs/fess/timer/SystemMonitorTarget.java +++ b/src/main/java/org/codelibs/fess/timer/SystemMonitorTarget.java @@ -90,14 +90,14 @@ public class SystemMonitorTarget implements TimeoutTarget { final Mem mem = jvmStats.getMem(); buf.append("\"memory\":{"); buf.append("\"heap\":{"); - append(buf, "used", () -> mem.getHeapUsed().bytesAsInt()).append(','); - append(buf, "committed", () -> mem.getHeapCommitted().bytesAsInt()).append(','); - append(buf, "max", () -> mem.getHeapMax().bytesAsInt()).append(','); + append(buf, "used", () -> mem.getHeapUsed().getBytes()).append(','); + append(buf, "committed", () -> mem.getHeapCommitted().getBytes()).append(','); + append(buf, "max", () -> mem.getHeapMax().getBytes()).append(','); append(buf, "percent", () -> mem.getHeapUsedPercent()); buf.append("},"); buf.append("\"non_heap\":{"); - append(buf, "used", () -> mem.getNonHeapUsed().bytesAsInt()).append(','); - append(buf, "committed", () -> mem.getNonHeapCommitted().bytesAsInt()); + append(buf, "used", () -> mem.getNonHeapUsed().getBytes()).append(','); + append(buf, "committed", () -> mem.getNonHeapCommitted().getBytes()); buf.append('}'); buf.append("},"); final List bufferPools = jvmStats.getBufferPools(); @@ -106,8 +106,8 @@ public class SystemMonitorTarget implements TimeoutTarget { final StringBuilder b = new StringBuilder(); b.append('"').append(StringEscapeUtils.escapeJson(p.getName())).append("\":{"); append(b, "count", () -> p.getCount()).append(','); - append(b, "used", () -> p.getUsed().bytesAsInt()).append(','); - append(b, "capacity", () -> p.getTotalCapacity().bytesAsInt()).append('}'); + append(b, "used", () -> p.getUsed().getBytes()).append(','); + append(b, "capacity", () -> p.getTotalCapacity().getBytes()).append('}'); return b.toString(); }).collect(Collectors.joining(","))); buf.append("},");