From 27f769f6ac8c009c8f9d1b6de07cbb839a7f825a Mon Sep 17 00:00:00 2001 From: Carlos <28845529+mesacarlos@users.noreply.github.com> Date: Sat, 28 Nov 2020 19:31:58 +0100 Subject: [PATCH] Fixed ram usage being incorrect --- client/index.html | 21 ++++++++----------- .../websocket/command/RamUsageCommand.java | 2 +- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/client/index.html b/client/index.html index 3de1e16..b57af6f 100644 --- a/client/index.html +++ b/client/index.html @@ -153,9 +153,6 @@
-
- Please provide a valid servername. -
@@ -267,7 +264,7 @@ @@ -277,15 +274,15 @@ - - + + - - - - - - + + + + + + diff --git a/src/es/mesacarlos/webconsole/websocket/command/RamUsageCommand.java b/src/es/mesacarlos/webconsole/websocket/command/RamUsageCommand.java index 7e67cec..39be3cf 100644 --- a/src/es/mesacarlos/webconsole/websocket/command/RamUsageCommand.java +++ b/src/es/mesacarlos/webconsole/websocket/command/RamUsageCommand.java @@ -14,7 +14,7 @@ public class RamUsageCommand implements WSCommand { long free = r.freeMemory() / 1024 / 1024; long max = r.maxMemory() / 1024 / 1024; - long used = max - free; + long used = r.totalMemory() / 1024 / 1024 - free; wsServer.sendToClient(conn, new RamUsage(