From 0ad26822104d5ec2f0ce3a3721c18780a4344e7d Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Fri, 27 Dec 2019 16:53:38 +0100 Subject: [PATCH] Add update and jvm flags to debugpaste --- .../plotsquared/plot/commands/DebugPaste.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java index 7cfc62c69..426b46eaa 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java @@ -22,6 +22,7 @@ import java.lang.management.RuntimeMXBean; import java.nio.file.Files; import java.util.List; import java.util.Map; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; @CommandDeclaration(command = "debugpaste", aliases = "dp", usage = "/plot debugpaste", @@ -66,6 +67,8 @@ public class DebugPaste extends SubCommand { b.append("\n\n# YAY! Now, let's see what we can find in your JVM\n"); Runtime runtime = Runtime.getRuntime(); RuntimeMXBean rb = ManagementFactory.getRuntimeMXBean(); + b.append("Uptime: ").append(TimeUnit.MINUTES.convert(rb.getUptime(), TimeUnit.MILLISECONDS) + " minutes").append('\n'); + b.append("JVM Flags: ").append(rb.getInputArguments()).append('\n'); b.append("Free Memory: ").append(runtime.freeMemory() / 1024 / 1024 + " MB").append('\n'); b.append("Max Memory: ").append(runtime.maxMemory() / 1024 / 1024 + " MB").append('\n'); b.append("Java Name: ").append(rb.getVmName()).append('\n');