Admin server info improvements and minor font tag corrections.

Thanks to Trance.
This commit is contained in:
MobiusDevelopment
2021-11-12 02:33:59 +00:00
parent e8b65912f4
commit 2988292540
328 changed files with 4620 additions and 2294 deletions

View File

@@ -12,15 +12,15 @@
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Owner:</td>
<td><font color="LEVEL">%ownerName%<font></td>
<td><font color="LEVEL">%ownerName%</font></td>
</tr>
<tr>
<td>Clan:</td>
<td><font color="LEVEL">%ownerClan%<font></td>
<td><font color="LEVEL">%ownerClan%</font></td>
</tr>
<tr>
<td>Castle Side:</td>
<td><font color="LEVEL">%castleSide%<font></td>
<td><font color="LEVEL">%castleSide%</font></td>
</tr>
<tr>
<td>Siege Info:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Antharas<font><br>
<font color="LEVEL">Antharas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Baium<font><br>
<font color="LEVEL">Baium</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Core<font><br>
<font color="LEVEL">Core</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Orfen<font><br>
<font color="LEVEL">Orfen</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Queen ant<font><br>
<font color="LEVEL">Queen ant</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Valakas<font><br>
<font color="LEVEL">Valakas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -1,14 +1,99 @@
<html><title>Admin Server Info</title><body>
<html>
<title>Admin Server Info</title>
<body>
<center>
<table width=270>
<tr>
<td width=45><button value="Main" action="bypass -h admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180><center>Server Info</center></td>
<td width=45><button value="Back" action="bypass -h admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=45><button value="Main" action="bypass admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180>
<center>Server Info</center>
</td>
<td width=45><button value="Back" action="bypass admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
<br>
<font color="LEVEL">General:<font><br1>
<font color="LEVEL">Memory:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem%</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem%</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Threads:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Live:</td>
<td><font color="00FF00">%live%</font></td>
</tr>
<tr>
<td>Non-Daemon:</td>
<td><font color="00FF00">%nondaemon%</font></td>
</tr>
<tr>
<td>Daemon:</td>
<td><font color="00FF00">%daemon%</font></td>
</tr>
<tr>
<td>Peak:</td>
<td><font color="00FF00">%peak%</font></td>
</tr>
<tr>
<td>Total started:</td>
<td><font color="00FF00">%totalstarted%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Garbage Collector:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Type:</td>
<td><font color="00FF00">%gcol%</font></td>
</tr>
<tr>
<td>Count:</td>
<td><font color="00FF00">%colcount%</font></td>
</tr>
<tr>
<td>Time:</td>
<td><font color="00FF00">%coltime%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">General:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>OS:</td>
@@ -39,41 +124,6 @@
<td><font color="00FF00">%geodata%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Memory:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem% MB</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem% MB</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem% MB</font></td>
</tr>
</table>
</center>
</body></html>
</body>
</html>

View File

@@ -1,6 +1,6 @@
<html><body>Marksman Basil:<br>
May you be blessed as you depart on your journey!<br>This is an exciting time, but take care that you do not forget your roots. We will always remember you!<br>
When you go below the <FONT>Cave of Souls</FONT>, Kamael Village will appear.<br>
When you go below the <font color="LEVEL">Cave of Souls</font>, Kamael Village will appear.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_TerritoryStatus">See information on permanent residence and tax rates.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest.</Button>
</body></html>

View File

@@ -16,6 +16,11 @@
*/
package handlers.admincommandhandlers;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryUsage;
import java.lang.management.ThreadMXBean;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
@@ -40,6 +45,8 @@ import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
public class AdminServerInfo implements IAdminCommandHandler
{
private static final SimpleDateFormat SDF = new SimpleDateFormat("hh:mm a");
private static final MemoryMXBean MEMORY_MX_BEAN = ManagementFactory.getMemoryMXBean();
private static final ThreadMXBean THREAD_MX_BEAN = ManagementFactory.getThreadMXBean();
private static final String[] ADMIN_COMMANDS =
{
@@ -51,9 +58,15 @@ public class AdminServerInfo implements IAdminCommandHandler
{
if (command.equals("admin_serverinfo"))
{
final MemoryUsage heapMemoryUsage = MEMORY_MX_BEAN.getHeapMemoryUsage();
final long freeMemory = heapMemoryUsage.getMax() - heapMemoryUsage.getUsed();
final int threadCount = THREAD_MX_BEAN.getThreadCount();
final int daemonCount = THREAD_MX_BEAN.getThreadCount();
final int nonDaemonCount = threadCount - daemonCount;
final int peakCount = THREAD_MX_BEAN.getPeakThreadCount();
final long totalCount = THREAD_MX_BEAN.getTotalStartedThreadCount();
final NpcHtmlMessage html = new NpcHtmlMessage();
final Runtime runTime = Runtime.getRuntime();
final int mb = 1024 * 1024;
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/serverinfo.htm"));
html.replace("%os_name%", System.getProperty("os.name"));
html.replace("%os_ver%", System.getProperty("os.version"));
@@ -67,9 +80,20 @@ public class AdminServerInfo implements IAdminCommandHandler
html.replace("%offlineTrade%", getPlayersCount("OFF_TRADE"));
html.replace("%onlineGM%", getPlayersCount("GM"));
html.replace("%onlineReal%", getPlayersCount("ALL_REAL"));
html.replace("%usedMem%", (runTime.maxMemory() / mb) - (((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb));
html.replace("%freeMem%", ((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb);
html.replace("%totalMem%", Runtime.getRuntime().maxMemory() / 1048576);
html.replace("%usedMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed() / 0x100000) + " Mb");
html.replace("%freeMem%", (freeMemory / 0x100000) + " Mb");
html.replace("%totalMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getMax() / 0x100000) + " Mb");
html.replace("%live%", threadCount);
html.replace("%nondaemon%", nonDaemonCount);
html.replace("%daemon%", daemonCount);
html.replace("%peak%", peakCount);
html.replace("%totalstarted%", totalCount);
for (GarbageCollectorMXBean gcBean : ManagementFactory.getGarbageCollectorMXBeans())
{
html.replace("%gcol%", gcBean.getName());
html.replace("%colcount%", gcBean.getCollectionCount());
html.replace("%coltime%", gcBean.getCollectionTime());
}
activeChar.sendPacket(html);
}
return true;

View File

@@ -12,15 +12,15 @@
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Owner:</td>
<td><font color="LEVEL">%ownerName%<font></td>
<td><font color="LEVEL">%ownerName%</font></td>
</tr>
<tr>
<td>Clan:</td>
<td><font color="LEVEL">%ownerClan%<font></td>
<td><font color="LEVEL">%ownerClan%</font></td>
</tr>
<tr>
<td>Castle Side:</td>
<td><font color="LEVEL">%castleSide%<font></td>
<td><font color="LEVEL">%castleSide%</font></td>
</tr>
<tr>
<td>Siege Info:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Antharas<font><br>
<font color="LEVEL">Antharas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Baium<font><br>
<font color="LEVEL">Baium</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Core<font><br>
<font color="LEVEL">Core</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Orfen<font><br>
<font color="LEVEL">Orfen</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Queen ant<font><br>
<font color="LEVEL">Queen ant</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Valakas<font><br>
<font color="LEVEL">Valakas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -1,14 +1,99 @@
<html><title>Admin Server Info</title><body>
<html>
<title>Admin Server Info</title>
<body>
<center>
<table width=270>
<tr>
<td width=45><button value="Main" action="bypass -h admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180><center>Server Info</center></td>
<td width=45><button value="Back" action="bypass -h admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=45><button value="Main" action="bypass admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180>
<center>Server Info</center>
</td>
<td width=45><button value="Back" action="bypass admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
<br>
<font color="LEVEL">General:<font><br1>
<font color="LEVEL">Memory:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem%</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem%</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Threads:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Live:</td>
<td><font color="00FF00">%live%</font></td>
</tr>
<tr>
<td>Non-Daemon:</td>
<td><font color="00FF00">%nondaemon%</font></td>
</tr>
<tr>
<td>Daemon:</td>
<td><font color="00FF00">%daemon%</font></td>
</tr>
<tr>
<td>Peak:</td>
<td><font color="00FF00">%peak%</font></td>
</tr>
<tr>
<td>Total started:</td>
<td><font color="00FF00">%totalstarted%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Garbage Collector:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Type:</td>
<td><font color="00FF00">%gcol%</font></td>
</tr>
<tr>
<td>Count:</td>
<td><font color="00FF00">%colcount%</font></td>
</tr>
<tr>
<td>Time:</td>
<td><font color="00FF00">%coltime%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">General:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>OS:</td>
@@ -39,41 +124,6 @@
<td><font color="00FF00">%geodata%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Memory:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem% MB</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem% MB</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem% MB</font></td>
</tr>
</table>
</center>
</body></html>
</body>
</html>

View File

@@ -1,6 +1,6 @@
<html><body>Marksman Basil:<br>
May you be blessed as you depart on your journey!<br>This is an exciting time, but take care that you do not forget your roots. We will always remember you!<br>
When you go below the <FONT>Cave of Souls</FONT>, Kamael Village will appear.<br>
When you go below the <font color="LEVEL">Cave of Souls</font>, Kamael Village will appear.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_TerritoryStatus">See information on permanent residence and tax rates.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest.</Button>
</body></html>

View File

@@ -16,6 +16,11 @@
*/
package handlers.admincommandhandlers;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryUsage;
import java.lang.management.ThreadMXBean;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
@@ -40,6 +45,8 @@ import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
public class AdminServerInfo implements IAdminCommandHandler
{
private static final SimpleDateFormat SDF = new SimpleDateFormat("hh:mm a");
private static final MemoryMXBean MEMORY_MX_BEAN = ManagementFactory.getMemoryMXBean();
private static final ThreadMXBean THREAD_MX_BEAN = ManagementFactory.getThreadMXBean();
private static final String[] ADMIN_COMMANDS =
{
@@ -51,9 +58,15 @@ public class AdminServerInfo implements IAdminCommandHandler
{
if (command.equals("admin_serverinfo"))
{
final MemoryUsage heapMemoryUsage = MEMORY_MX_BEAN.getHeapMemoryUsage();
final long freeMemory = heapMemoryUsage.getMax() - heapMemoryUsage.getUsed();
final int threadCount = THREAD_MX_BEAN.getThreadCount();
final int daemonCount = THREAD_MX_BEAN.getThreadCount();
final int nonDaemonCount = threadCount - daemonCount;
final int peakCount = THREAD_MX_BEAN.getPeakThreadCount();
final long totalCount = THREAD_MX_BEAN.getTotalStartedThreadCount();
final NpcHtmlMessage html = new NpcHtmlMessage();
final Runtime runTime = Runtime.getRuntime();
final int mb = 1024 * 1024;
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/serverinfo.htm"));
html.replace("%os_name%", System.getProperty("os.name"));
html.replace("%os_ver%", System.getProperty("os.version"));
@@ -67,9 +80,20 @@ public class AdminServerInfo implements IAdminCommandHandler
html.replace("%offlineTrade%", getPlayersCount("OFF_TRADE"));
html.replace("%onlineGM%", getPlayersCount("GM"));
html.replace("%onlineReal%", getPlayersCount("ALL_REAL"));
html.replace("%usedMem%", (runTime.maxMemory() / mb) - (((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb));
html.replace("%freeMem%", ((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb);
html.replace("%totalMem%", Runtime.getRuntime().maxMemory() / 1048576);
html.replace("%usedMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed() / 0x100000) + " Mb");
html.replace("%freeMem%", (freeMemory / 0x100000) + " Mb");
html.replace("%totalMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getMax() / 0x100000) + " Mb");
html.replace("%live%", threadCount);
html.replace("%nondaemon%", nonDaemonCount);
html.replace("%daemon%", daemonCount);
html.replace("%peak%", peakCount);
html.replace("%totalstarted%", totalCount);
for (GarbageCollectorMXBean gcBean : ManagementFactory.getGarbageCollectorMXBeans())
{
html.replace("%gcol%", gcBean.getName());
html.replace("%colcount%", gcBean.getCollectionCount());
html.replace("%coltime%", gcBean.getCollectionTime());
}
activeChar.sendPacket(html);
}
return true;

View File

@@ -12,15 +12,15 @@
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Owner:</td>
<td><font color="LEVEL">%ownerName%<font></td>
<td><font color="LEVEL">%ownerName%</font></td>
</tr>
<tr>
<td>Clan:</td>
<td><font color="LEVEL">%ownerClan%<font></td>
<td><font color="LEVEL">%ownerClan%</font></td>
</tr>
<tr>
<td>Castle Side:</td>
<td><font color="LEVEL">%castleSide%<font></td>
<td><font color="LEVEL">%castleSide%</font></td>
</tr>
<tr>
<td>Siege Info:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Antharas<font><br>
<font color="LEVEL">Antharas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Baium<font><br>
<font color="LEVEL">Baium</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Core<font><br>
<font color="LEVEL">Core</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Orfen<font><br>
<font color="LEVEL">Orfen</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Queen ant<font><br>
<font color="LEVEL">Queen ant</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Valakas<font><br>
<font color="LEVEL">Valakas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -1,14 +1,99 @@
<html><title>Admin Server Info</title><body>
<html>
<title>Admin Server Info</title>
<body>
<center>
<table width=270>
<tr>
<td width=45><button value="Main" action="bypass -h admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180><center>Server Info</center></td>
<td width=45><button value="Back" action="bypass -h admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=45><button value="Main" action="bypass admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180>
<center>Server Info</center>
</td>
<td width=45><button value="Back" action="bypass admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
<br>
<font color="LEVEL">General:<font><br1>
<font color="LEVEL">Memory:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem%</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem%</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Threads:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Live:</td>
<td><font color="00FF00">%live%</font></td>
</tr>
<tr>
<td>Non-Daemon:</td>
<td><font color="00FF00">%nondaemon%</font></td>
</tr>
<tr>
<td>Daemon:</td>
<td><font color="00FF00">%daemon%</font></td>
</tr>
<tr>
<td>Peak:</td>
<td><font color="00FF00">%peak%</font></td>
</tr>
<tr>
<td>Total started:</td>
<td><font color="00FF00">%totalstarted%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Garbage Collector:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Type:</td>
<td><font color="00FF00">%gcol%</font></td>
</tr>
<tr>
<td>Count:</td>
<td><font color="00FF00">%colcount%</font></td>
</tr>
<tr>
<td>Time:</td>
<td><font color="00FF00">%coltime%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">General:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>OS:</td>
@@ -39,41 +124,6 @@
<td><font color="00FF00">%geodata%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Memory:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem% MB</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem% MB</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem% MB</font></td>
</tr>
</table>
</center>
</body></html>
</body>
</html>

View File

@@ -1,6 +1,6 @@
<html><body>Marksman Basil:<br>
May you be blessed as you depart on your journey!<br>This is an exciting time, but take care that you do not forget your roots. We will always remember you!<br>
When you go below the <FONT>Cave of Souls</FONT>, Kamael Village will appear.<br>
When you go below the <font color="LEVEL">Cave of Souls</font>, Kamael Village will appear.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_TerritoryStatus">See information on permanent residence and tax rates.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest.</Button>
</body></html>

View File

@@ -16,6 +16,11 @@
*/
package handlers.admincommandhandlers;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryUsage;
import java.lang.management.ThreadMXBean;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
@@ -40,6 +45,8 @@ import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
public class AdminServerInfo implements IAdminCommandHandler
{
private static final SimpleDateFormat SDF = new SimpleDateFormat("hh:mm a");
private static final MemoryMXBean MEMORY_MX_BEAN = ManagementFactory.getMemoryMXBean();
private static final ThreadMXBean THREAD_MX_BEAN = ManagementFactory.getThreadMXBean();
private static final String[] ADMIN_COMMANDS =
{
@@ -51,9 +58,15 @@ public class AdminServerInfo implements IAdminCommandHandler
{
if (command.equals("admin_serverinfo"))
{
final MemoryUsage heapMemoryUsage = MEMORY_MX_BEAN.getHeapMemoryUsage();
final long freeMemory = heapMemoryUsage.getMax() - heapMemoryUsage.getUsed();
final int threadCount = THREAD_MX_BEAN.getThreadCount();
final int daemonCount = THREAD_MX_BEAN.getThreadCount();
final int nonDaemonCount = threadCount - daemonCount;
final int peakCount = THREAD_MX_BEAN.getPeakThreadCount();
final long totalCount = THREAD_MX_BEAN.getTotalStartedThreadCount();
final NpcHtmlMessage html = new NpcHtmlMessage();
final Runtime runTime = Runtime.getRuntime();
final int mb = 1024 * 1024;
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/serverinfo.htm"));
html.replace("%os_name%", System.getProperty("os.name"));
html.replace("%os_ver%", System.getProperty("os.version"));
@@ -67,9 +80,20 @@ public class AdminServerInfo implements IAdminCommandHandler
html.replace("%offlineTrade%", getPlayersCount("OFF_TRADE"));
html.replace("%onlineGM%", getPlayersCount("GM"));
html.replace("%onlineReal%", getPlayersCount("ALL_REAL"));
html.replace("%usedMem%", (runTime.maxMemory() / mb) - (((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb));
html.replace("%freeMem%", ((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb);
html.replace("%totalMem%", Runtime.getRuntime().maxMemory() / 1048576);
html.replace("%usedMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed() / 0x100000) + " Mb");
html.replace("%freeMem%", (freeMemory / 0x100000) + " Mb");
html.replace("%totalMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getMax() / 0x100000) + " Mb");
html.replace("%live%", threadCount);
html.replace("%nondaemon%", nonDaemonCount);
html.replace("%daemon%", daemonCount);
html.replace("%peak%", peakCount);
html.replace("%totalstarted%", totalCount);
for (GarbageCollectorMXBean gcBean : ManagementFactory.getGarbageCollectorMXBeans())
{
html.replace("%gcol%", gcBean.getName());
html.replace("%colcount%", gcBean.getCollectionCount());
html.replace("%coltime%", gcBean.getCollectionTime());
}
activeChar.sendPacket(html);
}
return true;

View File

@@ -1,3 +1,3 @@
<html><body>Namo:<br>
While it's not too meaningful in itself to lay down boundaries in <font color="LEVEL">Dragon Valley<font>, its a necessary step of the investigation. So for now, I want to send you to the less dangerous region to reduce the numbers of dragons and Undead there. On the west side of Dragon Valley, you'll find <font color="LEVEL">Mesmer Dragon, Gargoyle Dragon, Black Dragon, Esmerald Dragon, Sand Dragon, Dragonblood Captain, Dragonblood Minion, Cave Servant Archer, Cave Servant Warrior, Metal Cave Servant, Iron Cave Servant</font> and <font color="LEVEL">Headless Knight</font>. You need to slay <font color="LEVEL">200</font> of them. While you eliminate the threats that get in the way of the investigation, we will strive to identify the cause and come you with a plan.<br>
While it's not too meaningful in itself to lay down boundaries in <font color="LEVEL">Dragon Valley</font>, its a necessary step of the investigation. So for now, I want to send you to the less dangerous region to reduce the numbers of dragons and Undead there. On the west side of Dragon Valley, you'll find <font color="LEVEL">Mesmer Dragon, Gargoyle Dragon, Black Dragon, Esmerald Dragon, Sand Dragon, Dragonblood Captain, Dragonblood Minion, Cave Servant Archer, Cave Servant Warrior, Metal Cave Servant, Iron Cave Servant</font> and <font color="LEVEL">Headless Knight</font>. You need to slay <font color="LEVEL">200</font> of them. While you eliminate the threats that get in the way of the investigation, we will strive to identify the cause and come you with a plan.<br>
</body></html>

View File

@@ -1,4 +1,4 @@
<html><body>Namo:<br>
I may have exaggerated a bit, but what you have to do is very simple. Dispose of the dragons and undead in the <font color="LEVEL">east of Dragon Valley<font> to get an idea of what's going on.<br>
We can get an idea of the situation by slaying <font color="LEVEL">200 Prey Drakes, Beast Drakes, Dust Drakes, Vampiric Drakes, Bloody Grave Warriors, Dark Grave Warriors, Drak Grave Wizards, and Dark Grave Humans Knights.<font>
I may have exaggerated a bit, but what you have to do is very simple. Dispose of the dragons and undead in the <font color="LEVEL">east of Dragon Valley</font> to get an idea of what's going on.<br>
We can get an idea of the situation by slaying <font color="LEVEL">200 Prey Drakes, Beast Drakes, Dust Drakes, Vampiric Drakes, Bloody Grave Warriors, Dark Grave Warriors, Drak Grave Wizards, and Dark Grave Humans Knights.</font>
</body></html>

View File

@@ -12,15 +12,15 @@
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Owner:</td>
<td><font color="LEVEL">%ownerName%<font></td>
<td><font color="LEVEL">%ownerName%</font></td>
</tr>
<tr>
<td>Clan:</td>
<td><font color="LEVEL">%ownerClan%<font></td>
<td><font color="LEVEL">%ownerClan%</font></td>
</tr>
<tr>
<td>Castle Side:</td>
<td><font color="LEVEL">%castleSide%<font></td>
<td><font color="LEVEL">%castleSide%</font></td>
</tr>
<tr>
<td>Siege Info:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Antharas<font><br>
<font color="LEVEL">Antharas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Baium<font><br>
<font color="LEVEL">Baium</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Core<font><br>
<font color="LEVEL">Core</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Orfen<font><br>
<font color="LEVEL">Orfen</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Queen ant<font><br>
<font color="LEVEL">Queen ant</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Valakas<font><br>
<font color="LEVEL">Valakas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -1,14 +1,99 @@
<html><title>Admin Server Info</title><body>
<html>
<title>Admin Server Info</title>
<body>
<center>
<table width=270>
<tr>
<td width=45><button value="Main" action="bypass -h admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180><center>Server Info</center></td>
<td width=45><button value="Back" action="bypass -h admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=45><button value="Main" action="bypass admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180>
<center>Server Info</center>
</td>
<td width=45><button value="Back" action="bypass admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
<br>
<font color="LEVEL">General:<font><br1>
<font color="LEVEL">Memory:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem%</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem%</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Threads:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Live:</td>
<td><font color="00FF00">%live%</font></td>
</tr>
<tr>
<td>Non-Daemon:</td>
<td><font color="00FF00">%nondaemon%</font></td>
</tr>
<tr>
<td>Daemon:</td>
<td><font color="00FF00">%daemon%</font></td>
</tr>
<tr>
<td>Peak:</td>
<td><font color="00FF00">%peak%</font></td>
</tr>
<tr>
<td>Total started:</td>
<td><font color="00FF00">%totalstarted%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Garbage Collector:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Type:</td>
<td><font color="00FF00">%gcol%</font></td>
</tr>
<tr>
<td>Count:</td>
<td><font color="00FF00">%colcount%</font></td>
</tr>
<tr>
<td>Time:</td>
<td><font color="00FF00">%coltime%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">General:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>OS:</td>
@@ -39,41 +124,6 @@
<td><font color="00FF00">%geodata%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Memory:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem% MB</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem% MB</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem% MB</font></td>
</tr>
</table>
</center>
</body></html>
</body>
</html>

View File

@@ -1,6 +1,6 @@
<html><body>Marksman Basil:<br>
May you be blessed as you depart on your journey!<br>This is an exciting time, but take care that you do not forget your roots. We will always remember you!<br>
When you go below the <FONT>Cave of Souls</FONT>, Kamael Village will appear.<br>
When you go below the <font color="LEVEL">Cave of Souls</font>, Kamael Village will appear.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_TerritoryStatus">See information on permanent residence and tax rates.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest.</Button>
</body></html>

View File

@@ -16,6 +16,11 @@
*/
package handlers.admincommandhandlers;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryUsage;
import java.lang.management.ThreadMXBean;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
@@ -40,6 +45,8 @@ import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
public class AdminServerInfo implements IAdminCommandHandler
{
private static final SimpleDateFormat SDF = new SimpleDateFormat("hh:mm a");
private static final MemoryMXBean MEMORY_MX_BEAN = ManagementFactory.getMemoryMXBean();
private static final ThreadMXBean THREAD_MX_BEAN = ManagementFactory.getThreadMXBean();
private static final String[] ADMIN_COMMANDS =
{
@@ -51,9 +58,15 @@ public class AdminServerInfo implements IAdminCommandHandler
{
if (command.equals("admin_serverinfo"))
{
final MemoryUsage heapMemoryUsage = MEMORY_MX_BEAN.getHeapMemoryUsage();
final long freeMemory = heapMemoryUsage.getMax() - heapMemoryUsage.getUsed();
final int threadCount = THREAD_MX_BEAN.getThreadCount();
final int daemonCount = THREAD_MX_BEAN.getThreadCount();
final int nonDaemonCount = threadCount - daemonCount;
final int peakCount = THREAD_MX_BEAN.getPeakThreadCount();
final long totalCount = THREAD_MX_BEAN.getTotalStartedThreadCount();
final NpcHtmlMessage html = new NpcHtmlMessage();
final Runtime runTime = Runtime.getRuntime();
final int mb = 1024 * 1024;
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/serverinfo.htm"));
html.replace("%os_name%", System.getProperty("os.name"));
html.replace("%os_ver%", System.getProperty("os.version"));
@@ -67,9 +80,20 @@ public class AdminServerInfo implements IAdminCommandHandler
html.replace("%offlineTrade%", getPlayersCount("OFF_TRADE"));
html.replace("%onlineGM%", getPlayersCount("GM"));
html.replace("%onlineReal%", getPlayersCount("ALL_REAL"));
html.replace("%usedMem%", (runTime.maxMemory() / mb) - (((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb));
html.replace("%freeMem%", ((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb);
html.replace("%totalMem%", Runtime.getRuntime().maxMemory() / 1048576);
html.replace("%usedMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed() / 0x100000) + " Mb");
html.replace("%freeMem%", (freeMemory / 0x100000) + " Mb");
html.replace("%totalMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getMax() / 0x100000) + " Mb");
html.replace("%live%", threadCount);
html.replace("%nondaemon%", nonDaemonCount);
html.replace("%daemon%", daemonCount);
html.replace("%peak%", peakCount);
html.replace("%totalstarted%", totalCount);
for (GarbageCollectorMXBean gcBean : ManagementFactory.getGarbageCollectorMXBeans())
{
html.replace("%gcol%", gcBean.getName());
html.replace("%colcount%", gcBean.getCollectionCount());
html.replace("%coltime%", gcBean.getCollectionTime());
}
activeChar.sendPacket(html);
}
return true;

View File

@@ -1,3 +1,3 @@
<html><body>Namo:<br>
While it's not too meaningful in itself to lay down boundaries in <font color="LEVEL">Dragon Valley<font>, its a necessary step of the investigation. So for now, I want to send you to the less dangerous region to reduce the numbers of dragons and Undead there. On the west side of Dragon Valley, you'll find <font color="LEVEL">Mesmer Dragon, Gargoyle Dragon, Black Dragon, Esmerald Dragon, Sand Dragon, Dragonblood Captain, Dragonblood Minion, Cave Servant Archer, Cave Servant Warrior, Metal Cave Servant, Iron Cave Servant</font> and <font color="LEVEL">Headless Knight</font>. You need to slay <font color="LEVEL">200</font> of them. While you eliminate the threats that get in the way of the investigation, we will strive to identify the cause and come you with a plan.<br>
While it's not too meaningful in itself to lay down boundaries in <font color="LEVEL">Dragon Valley</font>, its a necessary step of the investigation. So for now, I want to send you to the less dangerous region to reduce the numbers of dragons and Undead there. On the west side of Dragon Valley, you'll find <font color="LEVEL">Mesmer Dragon, Gargoyle Dragon, Black Dragon, Esmerald Dragon, Sand Dragon, Dragonblood Captain, Dragonblood Minion, Cave Servant Archer, Cave Servant Warrior, Metal Cave Servant, Iron Cave Servant</font> and <font color="LEVEL">Headless Knight</font>. You need to slay <font color="LEVEL">200</font> of them. While you eliminate the threats that get in the way of the investigation, we will strive to identify the cause and come you with a plan.<br>
</body></html>

View File

@@ -1,4 +1,4 @@
<html><body>Namo:<br>
I may have exaggerated a bit, but what you have to do is very simple. Dispose of the dragons and undead in the <font color="LEVEL">east of Dragon Valley<font> to get an idea of what's going on.<br>
We can get an idea of the situation by slaying <font color="LEVEL">200 Prey Drakes, Beast Drakes, Dust Drakes, Vampiric Drakes, Bloody Grave Warriors, Dark Grave Warriors, Drak Grave Wizards, and Dark Grave Humans Knights.<font>
I may have exaggerated a bit, but what you have to do is very simple. Dispose of the dragons and undead in the <font color="LEVEL">east of Dragon Valley</font> to get an idea of what's going on.<br>
We can get an idea of the situation by slaying <font color="LEVEL">200 Prey Drakes, Beast Drakes, Dust Drakes, Vampiric Drakes, Bloody Grave Warriors, Dark Grave Warriors, Drak Grave Wizards, and Dark Grave Humans Knights.</font>
</body></html>

View File

@@ -12,15 +12,15 @@
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Owner:</td>
<td><font color="LEVEL">%ownerName%<font></td>
<td><font color="LEVEL">%ownerName%</font></td>
</tr>
<tr>
<td>Clan:</td>
<td><font color="LEVEL">%ownerClan%<font></td>
<td><font color="LEVEL">%ownerClan%</font></td>
</tr>
<tr>
<td>Castle Side:</td>
<td><font color="LEVEL">%castleSide%<font></td>
<td><font color="LEVEL">%castleSide%</font></td>
</tr>
<tr>
<td>Siege Info:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Antharas<font><br>
<font color="LEVEL">Antharas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Baium<font><br>
<font color="LEVEL">Baium</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Core<font><br>
<font color="LEVEL">Core</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Orfen<font><br>
<font color="LEVEL">Orfen</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Queen ant<font><br>
<font color="LEVEL">Queen ant</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Valakas<font><br>
<font color="LEVEL">Valakas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -1,14 +1,99 @@
<html><title>Admin Server Info</title><body>
<html>
<title>Admin Server Info</title>
<body>
<center>
<table width=270>
<tr>
<td width=45><button value="Main" action="bypass -h admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180><center>Server Info</center></td>
<td width=45><button value="Back" action="bypass -h admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=45><button value="Main" action="bypass admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180>
<center>Server Info</center>
</td>
<td width=45><button value="Back" action="bypass admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
<br>
<font color="LEVEL">General:<font><br1>
<font color="LEVEL">Memory:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem%</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem%</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Threads:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Live:</td>
<td><font color="00FF00">%live%</font></td>
</tr>
<tr>
<td>Non-Daemon:</td>
<td><font color="00FF00">%nondaemon%</font></td>
</tr>
<tr>
<td>Daemon:</td>
<td><font color="00FF00">%daemon%</font></td>
</tr>
<tr>
<td>Peak:</td>
<td><font color="00FF00">%peak%</font></td>
</tr>
<tr>
<td>Total started:</td>
<td><font color="00FF00">%totalstarted%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Garbage Collector:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Type:</td>
<td><font color="00FF00">%gcol%</font></td>
</tr>
<tr>
<td>Count:</td>
<td><font color="00FF00">%colcount%</font></td>
</tr>
<tr>
<td>Time:</td>
<td><font color="00FF00">%coltime%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">General:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>OS:</td>
@@ -39,41 +124,6 @@
<td><font color="00FF00">%geodata%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Memory:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem% MB</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem% MB</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem% MB</font></td>
</tr>
</table>
</center>
</body></html>
</body>
</html>

View File

@@ -1,6 +1,6 @@
<html><body>Marksman Basil:<br>
May you be blessed as you depart on your journey!<br>This is an exciting time, but take care that you do not forget your roots. We will always remember you!<br>
When you go below the <FONT>Cave of Souls</FONT>, Kamael Village will appear.<br>
When you go below the <font color="LEVEL">Cave of Souls</font>, Kamael Village will appear.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_TerritoryStatus">See information on permanent residence and tax rates.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest.</Button>
</body></html>

View File

@@ -16,6 +16,11 @@
*/
package handlers.admincommandhandlers;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryUsage;
import java.lang.management.ThreadMXBean;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
@@ -40,6 +45,8 @@ import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
public class AdminServerInfo implements IAdminCommandHandler
{
private static final SimpleDateFormat SDF = new SimpleDateFormat("hh:mm a");
private static final MemoryMXBean MEMORY_MX_BEAN = ManagementFactory.getMemoryMXBean();
private static final ThreadMXBean THREAD_MX_BEAN = ManagementFactory.getThreadMXBean();
private static final String[] ADMIN_COMMANDS =
{
@@ -51,9 +58,15 @@ public class AdminServerInfo implements IAdminCommandHandler
{
if (command.equals("admin_serverinfo"))
{
final MemoryUsage heapMemoryUsage = MEMORY_MX_BEAN.getHeapMemoryUsage();
final long freeMemory = heapMemoryUsage.getMax() - heapMemoryUsage.getUsed();
final int threadCount = THREAD_MX_BEAN.getThreadCount();
final int daemonCount = THREAD_MX_BEAN.getThreadCount();
final int nonDaemonCount = threadCount - daemonCount;
final int peakCount = THREAD_MX_BEAN.getPeakThreadCount();
final long totalCount = THREAD_MX_BEAN.getTotalStartedThreadCount();
final NpcHtmlMessage html = new NpcHtmlMessage();
final Runtime runTime = Runtime.getRuntime();
final int mb = 1024 * 1024;
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/serverinfo.htm"));
html.replace("%os_name%", System.getProperty("os.name"));
html.replace("%os_ver%", System.getProperty("os.version"));
@@ -67,9 +80,20 @@ public class AdminServerInfo implements IAdminCommandHandler
html.replace("%offlineTrade%", getPlayersCount("OFF_TRADE"));
html.replace("%onlineGM%", getPlayersCount("GM"));
html.replace("%onlineReal%", getPlayersCount("ALL_REAL"));
html.replace("%usedMem%", (runTime.maxMemory() / mb) - (((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb));
html.replace("%freeMem%", ((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb);
html.replace("%totalMem%", Runtime.getRuntime().maxMemory() / 1048576);
html.replace("%usedMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed() / 0x100000) + " Mb");
html.replace("%freeMem%", (freeMemory / 0x100000) + " Mb");
html.replace("%totalMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getMax() / 0x100000) + " Mb");
html.replace("%live%", threadCount);
html.replace("%nondaemon%", nonDaemonCount);
html.replace("%daemon%", daemonCount);
html.replace("%peak%", peakCount);
html.replace("%totalstarted%", totalCount);
for (GarbageCollectorMXBean gcBean : ManagementFactory.getGarbageCollectorMXBeans())
{
html.replace("%gcol%", gcBean.getName());
html.replace("%colcount%", gcBean.getCollectionCount());
html.replace("%coltime%", gcBean.getCollectionTime());
}
activeChar.sendPacket(html);
}
return true;

View File

@@ -1,3 +1,3 @@
<html><body>Namo:<br>
While it's not too meaningful in itself to lay down boundaries in <font color="LEVEL">Dragon Valley<font>, its a necessary step of the investigation. So for now, I want to send you to the less dangerous region to reduce the numbers of dragons and Undead there. On the west side of Dragon Valley, you'll find <font color="LEVEL">Mesmer Dragon, Gargoyle Dragon, Black Dragon, Esmerald Dragon, Sand Dragon, Dragonblood Captain, Dragonblood Minion, Cave Servant Archer, Cave Servant Warrior, Metal Cave Servant, Iron Cave Servant</font> and <font color="LEVEL">Headless Knight</font>. You need to slay <font color="LEVEL">200</font> of them. While you eliminate the threats that get in the way of the investigation, we will strive to identify the cause and come you with a plan.<br>
While it's not too meaningful in itself to lay down boundaries in <font color="LEVEL">Dragon Valley</font>, its a necessary step of the investigation. So for now, I want to send you to the less dangerous region to reduce the numbers of dragons and Undead there. On the west side of Dragon Valley, you'll find <font color="LEVEL">Mesmer Dragon, Gargoyle Dragon, Black Dragon, Esmerald Dragon, Sand Dragon, Dragonblood Captain, Dragonblood Minion, Cave Servant Archer, Cave Servant Warrior, Metal Cave Servant, Iron Cave Servant</font> and <font color="LEVEL">Headless Knight</font>. You need to slay <font color="LEVEL">200</font> of them. While you eliminate the threats that get in the way of the investigation, we will strive to identify the cause and come you with a plan.<br>
</body></html>

View File

@@ -1,4 +1,4 @@
<html><body>Namo:<br>
I may have exaggerated a bit, but what you have to do is very simple. Dispose of the dragons and undead in the <font color="LEVEL">east of Dragon Valley<font> to get an idea of what's going on.<br>
We can get an idea of the situation by slaying <font color="LEVEL">200 Prey Drakes, Beast Drakes, Dust Drakes, Vampiric Drakes, Bloody Grave Warriors, Dark Grave Warriors, Drak Grave Wizards, and Dark Grave Humans Knights.<font>
I may have exaggerated a bit, but what you have to do is very simple. Dispose of the dragons and undead in the <font color="LEVEL">east of Dragon Valley</font> to get an idea of what's going on.<br>
We can get an idea of the situation by slaying <font color="LEVEL">200 Prey Drakes, Beast Drakes, Dust Drakes, Vampiric Drakes, Bloody Grave Warriors, Dark Grave Warriors, Drak Grave Wizards, and Dark Grave Humans Knights.</font>
</body></html>

View File

@@ -12,15 +12,15 @@
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Owner:</td>
<td><font color="LEVEL">%ownerName%<font></td>
<td><font color="LEVEL">%ownerName%</font></td>
</tr>
<tr>
<td>Clan:</td>
<td><font color="LEVEL">%ownerClan%<font></td>
<td><font color="LEVEL">%ownerClan%</font></td>
</tr>
<tr>
<td>Castle Side:</td>
<td><font color="LEVEL">%castleSide%<font></td>
<td><font color="LEVEL">%castleSide%</font></td>
</tr>
<tr>
<td>Siege Info:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Antharas<font><br>
<font color="LEVEL">Antharas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Baium<font><br>
<font color="LEVEL">Baium</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Core<font><br>
<font color="LEVEL">Core</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Orfen<font><br>
<font color="LEVEL">Orfen</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Queen ant<font><br>
<font color="LEVEL">Queen ant</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Valakas<font><br>
<font color="LEVEL">Valakas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -1,14 +1,99 @@
<html><title>Admin Server Info</title><body>
<html>
<title>Admin Server Info</title>
<body>
<center>
<table width=270>
<tr>
<td width=45><button value="Main" action="bypass -h admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180><center>Server Info</center></td>
<td width=45><button value="Back" action="bypass -h admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=45><button value="Main" action="bypass admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180>
<center>Server Info</center>
</td>
<td width=45><button value="Back" action="bypass admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
<br>
<font color="LEVEL">General:<font><br1>
<font color="LEVEL">Memory:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem%</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem%</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Threads:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Live:</td>
<td><font color="00FF00">%live%</font></td>
</tr>
<tr>
<td>Non-Daemon:</td>
<td><font color="00FF00">%nondaemon%</font></td>
</tr>
<tr>
<td>Daemon:</td>
<td><font color="00FF00">%daemon%</font></td>
</tr>
<tr>
<td>Peak:</td>
<td><font color="00FF00">%peak%</font></td>
</tr>
<tr>
<td>Total started:</td>
<td><font color="00FF00">%totalstarted%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Garbage Collector:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Type:</td>
<td><font color="00FF00">%gcol%</font></td>
</tr>
<tr>
<td>Count:</td>
<td><font color="00FF00">%colcount%</font></td>
</tr>
<tr>
<td>Time:</td>
<td><font color="00FF00">%coltime%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">General:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>OS:</td>
@@ -39,41 +124,6 @@
<td><font color="00FF00">%geodata%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Memory:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem% MB</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem% MB</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem% MB</font></td>
</tr>
</table>
</center>
</body></html>
</body>
</html>

View File

@@ -1,6 +1,6 @@
<html><body>Marksman Basil:<br>
May you be blessed as you depart on your journey!<br>This is an exciting time, but take care that you do not forget your roots. We will always remember you!<br>
When you go below the <FONT>Cave of Souls</FONT>, Kamael Village will appear.<br>
When you go below the <font color="LEVEL">Cave of Souls</font>, Kamael Village will appear.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_TerritoryStatus">See information on permanent residence and tax rates.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest.</Button>
</body></html>

View File

@@ -16,6 +16,11 @@
*/
package handlers.admincommandhandlers;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryUsage;
import java.lang.management.ThreadMXBean;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
@@ -40,6 +45,8 @@ import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
public class AdminServerInfo implements IAdminCommandHandler
{
private static final SimpleDateFormat SDF = new SimpleDateFormat("hh:mm a");
private static final MemoryMXBean MEMORY_MX_BEAN = ManagementFactory.getMemoryMXBean();
private static final ThreadMXBean THREAD_MX_BEAN = ManagementFactory.getThreadMXBean();
private static final String[] ADMIN_COMMANDS =
{
@@ -51,9 +58,15 @@ public class AdminServerInfo implements IAdminCommandHandler
{
if (command.equals("admin_serverinfo"))
{
final MemoryUsage heapMemoryUsage = MEMORY_MX_BEAN.getHeapMemoryUsage();
final long freeMemory = heapMemoryUsage.getMax() - heapMemoryUsage.getUsed();
final int threadCount = THREAD_MX_BEAN.getThreadCount();
final int daemonCount = THREAD_MX_BEAN.getThreadCount();
final int nonDaemonCount = threadCount - daemonCount;
final int peakCount = THREAD_MX_BEAN.getPeakThreadCount();
final long totalCount = THREAD_MX_BEAN.getTotalStartedThreadCount();
final NpcHtmlMessage html = new NpcHtmlMessage();
final Runtime runTime = Runtime.getRuntime();
final int mb = 1024 * 1024;
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/serverinfo.htm"));
html.replace("%os_name%", System.getProperty("os.name"));
html.replace("%os_ver%", System.getProperty("os.version"));
@@ -67,9 +80,20 @@ public class AdminServerInfo implements IAdminCommandHandler
html.replace("%offlineTrade%", getPlayersCount("OFF_TRADE"));
html.replace("%onlineGM%", getPlayersCount("GM"));
html.replace("%onlineReal%", getPlayersCount("ALL_REAL"));
html.replace("%usedMem%", (runTime.maxMemory() / mb) - (((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb));
html.replace("%freeMem%", ((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb);
html.replace("%totalMem%", Runtime.getRuntime().maxMemory() / 1048576);
html.replace("%usedMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed() / 0x100000) + " Mb");
html.replace("%freeMem%", (freeMemory / 0x100000) + " Mb");
html.replace("%totalMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getMax() / 0x100000) + " Mb");
html.replace("%live%", threadCount);
html.replace("%nondaemon%", nonDaemonCount);
html.replace("%daemon%", daemonCount);
html.replace("%peak%", peakCount);
html.replace("%totalstarted%", totalCount);
for (GarbageCollectorMXBean gcBean : ManagementFactory.getGarbageCollectorMXBeans())
{
html.replace("%gcol%", gcBean.getName());
html.replace("%colcount%", gcBean.getCollectionCount());
html.replace("%coltime%", gcBean.getCollectionTime());
}
activeChar.sendPacket(html);
}
return true;

View File

@@ -1,3 +1,3 @@
<html><body>Namo:<br>
While it's not too meaningful in itself to lay down boundaries in <font color="LEVEL">Dragon Valley<font>, its a necessary step of the investigation. So for now, I want to send you to the less dangerous region to reduce the numbers of dragons and Undead there. On the west side of Dragon Valley, you'll find <font color="LEVEL">Mesmer Dragon, Gargoyle Dragon, Black Dragon, Esmerald Dragon, Sand Dragon, Dragonblood Captain, Dragonblood Minion, Cave Servant Archer, Cave Servant Warrior, Metal Cave Servant, Iron Cave Servant</font> and <font color="LEVEL">Headless Knight</font>. You need to slay <font color="LEVEL">200</font> of them. While you eliminate the threats that get in the way of the investigation, we will strive to identify the cause and come you with a plan.<br>
While it's not too meaningful in itself to lay down boundaries in <font color="LEVEL">Dragon Valley</font>, its a necessary step of the investigation. So for now, I want to send you to the less dangerous region to reduce the numbers of dragons and Undead there. On the west side of Dragon Valley, you'll find <font color="LEVEL">Mesmer Dragon, Gargoyle Dragon, Black Dragon, Esmerald Dragon, Sand Dragon, Dragonblood Captain, Dragonblood Minion, Cave Servant Archer, Cave Servant Warrior, Metal Cave Servant, Iron Cave Servant</font> and <font color="LEVEL">Headless Knight</font>. You need to slay <font color="LEVEL">200</font> of them. While you eliminate the threats that get in the way of the investigation, we will strive to identify the cause and come you with a plan.<br>
</body></html>

View File

@@ -1,4 +1,4 @@
<html><body>Namo:<br>
I may have exaggerated a bit, but what you have to do is very simple. Dispose of the dragons and undead in the <font color="LEVEL">east of Dragon Valley<font> to get an idea of what's going on.<br>
We can get an idea of the situation by slaying <font color="LEVEL">200 Prey Drakes, Beast Drakes, Dust Drakes, Vampiric Drakes, Bloody Grave Warriors, Dark Grave Warriors, Drak Grave Wizards, and Dark Grave Humans Knights.<font>
I may have exaggerated a bit, but what you have to do is very simple. Dispose of the dragons and undead in the <font color="LEVEL">east of Dragon Valley</font> to get an idea of what's going on.<br>
We can get an idea of the situation by slaying <font color="LEVEL">200 Prey Drakes, Beast Drakes, Dust Drakes, Vampiric Drakes, Bloody Grave Warriors, Dark Grave Warriors, Drak Grave Wizards, and Dark Grave Humans Knights.</font>
</body></html>

View File

@@ -12,15 +12,15 @@
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Owner:</td>
<td><font color="LEVEL">%ownerName%<font></td>
<td><font color="LEVEL">%ownerName%</font></td>
</tr>
<tr>
<td>Clan:</td>
<td><font color="LEVEL">%ownerClan%<font></td>
<td><font color="LEVEL">%ownerClan%</font></td>
</tr>
<tr>
<td>Castle Side:</td>
<td><font color="LEVEL">%castleSide%<font></td>
<td><font color="LEVEL">%castleSide%</font></td>
</tr>
<tr>
<td>Siege Info:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Antharas<font><br>
<font color="LEVEL">Antharas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Baium<font><br>
<font color="LEVEL">Baium</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Core<font><br>
<font color="LEVEL">Core</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Fafurion<font><br>
<font color="LEVEL">Fafurion</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Orfen<font><br>
<font color="LEVEL">Orfen</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Queen ant<font><br>
<font color="LEVEL">Queen ant</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Valakas<font><br>
<font color="LEVEL">Valakas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -12,11 +12,11 @@
<table width="270" align=center border="0" bgcolor="444444">
<tr>
<td>Player Name:</td>
<td><font color="00FF00">%targetName%<font></td>
<td><font color="00FF00">%targetName%</font></td>
</tr>
<tr>
<td>Player Points:</td>
<td><font color="00FF00">%points%<font></td>
<td><font color="00FF00">%points%</font></td>
</tr>
</table>
<br>

View File

@@ -1,14 +1,99 @@
<html><title>Admin Server Info</title><body>
<html>
<title>Admin Server Info</title>
<body>
<center>
<table width=270>
<tr>
<td width=45><button value="Main" action="bypass -h admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180><center>Server Info</center></td>
<td width=45><button value="Back" action="bypass -h admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=45><button value="Main" action="bypass admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180>
<center>Server Info</center>
</td>
<td width=45><button value="Back" action="bypass admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
<br>
<font color="LEVEL">General:<font><br1>
<font color="LEVEL">Memory:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem%</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem%</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Threads:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Live:</td>
<td><font color="00FF00">%live%</font></td>
</tr>
<tr>
<td>Non-Daemon:</td>
<td><font color="00FF00">%nondaemon%</font></td>
</tr>
<tr>
<td>Daemon:</td>
<td><font color="00FF00">%daemon%</font></td>
</tr>
<tr>
<td>Peak:</td>
<td><font color="00FF00">%peak%</font></td>
</tr>
<tr>
<td>Total started:</td>
<td><font color="00FF00">%totalstarted%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Garbage Collector:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Type:</td>
<td><font color="00FF00">%gcol%</font></td>
</tr>
<tr>
<td>Count:</td>
<td><font color="00FF00">%colcount%</font></td>
</tr>
<tr>
<td>Time:</td>
<td><font color="00FF00">%coltime%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">General:</font>
<br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>OS:</td>
@@ -39,41 +124,6 @@
<td><font color="00FF00">%geodata%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Players:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Total players count:</td>
<td><font color="00FF00">%onlineAll%</font></td>
</tr>
<tr>
<td>Offline trade count:</td>
<td><font color="00FF00">%offlineTrade%</font></td>
</tr>
<tr>
<td>Online GM count:</td>
<td><font color="00FF00">%onlineGM%</font></td>
</tr>
<tr>
<td>Real player count:</td>
<td><font color="00FF00">%onlineReal%</font></td>
</tr>
</table>
<br>
<font color="LEVEL">Memory:<font><br1>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Used Memory:</td>
<td><font color="00FF00">%usedMem% MB</font></td>
</tr>
<tr>
<td>Free Memory:</td>
<td><font color="00FF00">%freeMem% MB</font></td>
</tr>
<tr>
<td>Total Memory:</td>
<td><font color="00FF00">%totalMem% MB</font></td>
</tr>
</table>
</center>
</body></html>
</body>
</html>

View File

@@ -1,6 +1,6 @@
<html><body>Marksman Basil:<br>
May you be blessed as you depart on your journey!<br>This is an exciting time, but take care that you do not forget your roots. We will always remember you!<br>
When you go below the <FONT>Cave of Souls</FONT>, Kamael Village will appear.<br>
When you go below the <font color="LEVEL">Cave of Souls</font>, Kamael Village will appear.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_TerritoryStatus">See information on permanent residence and tax rates.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest.</Button>
</body></html>

View File

@@ -16,6 +16,11 @@
*/
package handlers.admincommandhandlers;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryUsage;
import java.lang.management.ThreadMXBean;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
@@ -40,6 +45,8 @@ import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
public class AdminServerInfo implements IAdminCommandHandler
{
private static final SimpleDateFormat SDF = new SimpleDateFormat("hh:mm a");
private static final MemoryMXBean MEMORY_MX_BEAN = ManagementFactory.getMemoryMXBean();
private static final ThreadMXBean THREAD_MX_BEAN = ManagementFactory.getThreadMXBean();
private static final String[] ADMIN_COMMANDS =
{
@@ -51,9 +58,15 @@ public class AdminServerInfo implements IAdminCommandHandler
{
if (command.equals("admin_serverinfo"))
{
final MemoryUsage heapMemoryUsage = MEMORY_MX_BEAN.getHeapMemoryUsage();
final long freeMemory = heapMemoryUsage.getMax() - heapMemoryUsage.getUsed();
final int threadCount = THREAD_MX_BEAN.getThreadCount();
final int daemonCount = THREAD_MX_BEAN.getThreadCount();
final int nonDaemonCount = threadCount - daemonCount;
final int peakCount = THREAD_MX_BEAN.getPeakThreadCount();
final long totalCount = THREAD_MX_BEAN.getTotalStartedThreadCount();
final NpcHtmlMessage html = new NpcHtmlMessage();
final Runtime runTime = Runtime.getRuntime();
final int mb = 1024 * 1024;
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/serverinfo.htm"));
html.replace("%os_name%", System.getProperty("os.name"));
html.replace("%os_ver%", System.getProperty("os.version"));
@@ -67,9 +80,20 @@ public class AdminServerInfo implements IAdminCommandHandler
html.replace("%offlineTrade%", getPlayersCount("OFF_TRADE"));
html.replace("%onlineGM%", getPlayersCount("GM"));
html.replace("%onlineReal%", getPlayersCount("ALL_REAL"));
html.replace("%usedMem%", (runTime.maxMemory() / mb) - (((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb));
html.replace("%freeMem%", ((runTime.maxMemory() - runTime.totalMemory()) + runTime.freeMemory()) / mb);
html.replace("%totalMem%", Runtime.getRuntime().maxMemory() / 1048576);
html.replace("%usedMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed() / 0x100000) + " Mb");
html.replace("%freeMem%", (freeMemory / 0x100000) + " Mb");
html.replace("%totalMem%", (MEMORY_MX_BEAN.getHeapMemoryUsage().getMax() / 0x100000) + " Mb");
html.replace("%live%", threadCount);
html.replace("%nondaemon%", nonDaemonCount);
html.replace("%daemon%", daemonCount);
html.replace("%peak%", peakCount);
html.replace("%totalstarted%", totalCount);
for (GarbageCollectorMXBean gcBean : ManagementFactory.getGarbageCollectorMXBeans())
{
html.replace("%gcol%", gcBean.getName());
html.replace("%colcount%", gcBean.getCollectionCount());
html.replace("%coltime%", gcBean.getCollectionTime());
}
activeChar.sendPacket(html);
}
return true;

View File

@@ -1,3 +1,3 @@
<html><body>Namo:<br>
While it's not too meaningful in itself to lay down boundaries in <font color="LEVEL">Dragon Valley<font>, its a necessary step of the investigation. So for now, I want to send you to the less dangerous region to reduce the numbers of dragons and Undead there. On the west side of Dragon Valley, you'll find <font color="LEVEL">Mesmer Dragon, Gargoyle Dragon, Black Dragon, Esmerald Dragon, Sand Dragon, Dragonblood Captain, Dragonblood Minion, Cave Servant Archer, Cave Servant Warrior, Metal Cave Servant, Iron Cave Servant</font> and <font color="LEVEL">Headless Knight</font>. You need to slay <font color="LEVEL">200</font> of them. While you eliminate the threats that get in the way of the investigation, we will strive to identify the cause and come you with a plan.<br>
While it's not too meaningful in itself to lay down boundaries in <font color="LEVEL">Dragon Valley</font>, its a necessary step of the investigation. So for now, I want to send you to the less dangerous region to reduce the numbers of dragons and Undead there. On the west side of Dragon Valley, you'll find <font color="LEVEL">Mesmer Dragon, Gargoyle Dragon, Black Dragon, Esmerald Dragon, Sand Dragon, Dragonblood Captain, Dragonblood Minion, Cave Servant Archer, Cave Servant Warrior, Metal Cave Servant, Iron Cave Servant</font> and <font color="LEVEL">Headless Knight</font>. You need to slay <font color="LEVEL">200</font> of them. While you eliminate the threats that get in the way of the investigation, we will strive to identify the cause and come you with a plan.<br>
</body></html>

View File

@@ -1,4 +1,4 @@
<html><body>Namo:<br>
I may have exaggerated a bit, but what you have to do is very simple. Dispose of the dragons and undead in the <font color="LEVEL">east of Dragon Valley<font> to get an idea of what's going on.<br>
We can get an idea of the situation by slaying <font color="LEVEL">200 Prey Drakes, Beast Drakes, Dust Drakes, Vampiric Drakes, Bloody Grave Warriors, Dark Grave Warriors, Drak Grave Wizards, and Dark Grave Humans Knights.<font>
I may have exaggerated a bit, but what you have to do is very simple. Dispose of the dragons and undead in the <font color="LEVEL">east of Dragon Valley</font> to get an idea of what's going on.<br>
We can get an idea of the situation by slaying <font color="LEVEL">200 Prey Drakes, Beast Drakes, Dust Drakes, Vampiric Drakes, Bloody Grave Warriors, Dark Grave Warriors, Drak Grave Wizards, and Dark Grave Humans Knights.</font>
</body></html>

View File

@@ -12,15 +12,15 @@
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Owner:</td>
<td><font color="LEVEL">%ownerName%<font></td>
<td><font color="LEVEL">%ownerName%</font></td>
</tr>
<tr>
<td>Clan:</td>
<td><font color="LEVEL">%ownerClan%<font></td>
<td><font color="LEVEL">%ownerClan%</font></td>
</tr>
<tr>
<td>Castle Side:</td>
<td><font color="LEVEL">%castleSide%<font></td>
<td><font color="LEVEL">%castleSide%</font></td>
</tr>
<tr>
<td>Siege Info:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Antharas<font><br>
<font color="LEVEL">Antharas</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Baium<font><br>
<font color="LEVEL">Baium</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Core<font><br>
<font color="LEVEL">Core</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

View File

@@ -9,7 +9,7 @@
</table>
<br>
<br>
<font color="LEVEL">Fafurion<font><br>
<font color="LEVEL">Fafurion</font><br>
<table width="270" border="0" bgcolor="444444">
<tr>
<td>Status:</td>

Some files were not shown because too many files have changed in this diff Show More