mirror of
https://e.coding.net/circlecloud/CTZServer.git
synced 2024-12-27 17:18:47 +00:00
add runTime...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
parent
db4d35dc05
commit
56ed87cb1a
@ -3,6 +3,7 @@ package cn.citycraft.CTZServer.commands;
|
||||
import cn.citycraft.CTZServer.CTZServer;
|
||||
import cn.citycraft.CTZServer.ServerThread;
|
||||
import cn.citycraft.utils.StringUtil;
|
||||
import cn.citycraft.utils.SystemUtil;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
|
||||
public class CommandGc extends BaseCommand {
|
||||
@ -18,6 +19,7 @@ public class CommandGc extends BaseCommand {
|
||||
Runtime rt = Runtime.getRuntime();
|
||||
if (label.equalsIgnoreCase("gc"))
|
||||
rt.gc();
|
||||
CTZServer.print("运行时间: " + StringUtil.formatDate(SystemUtil.getRunTime()));
|
||||
CTZServer.print("最大内存: " + StringUtil.b2mb(rt.maxMemory()));
|
||||
CTZServer.print("使用内存: " + StringUtil.b2mb(rt.totalMemory()));
|
||||
CTZServer.print("空闲内存: " + StringUtil.b2mb(rt.freeMemory()));
|
||||
|
Loading…
Reference in New Issue
Block a user