Admin server info improvements and minor font tag corrections.
Thanks to Trance.
This commit is contained in:
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -1,79 +1,129 @@
|
||||
<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>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<font color="LEVEL">General:<font><br1>
|
||||
<table width="270" border="0" bgcolor="444444">
|
||||
<tr>
|
||||
<td>OS:</td>
|
||||
<td><font color="00FF00">%os_name%</font></td>
|
||||
</tr>
|
||||
<html>
|
||||
<title>Admin Server Info</title>
|
||||
<body>
|
||||
<center>
|
||||
<table width=270>
|
||||
<tr>
|
||||
<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">Memory:</font>
|
||||
<br1>
|
||||
<table width="270" border="0" bgcolor="444444">
|
||||
<tr>
|
||||
<td>OS version:</td>
|
||||
<td><font color="00FF00">%os_ver%</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Server slots:</td>
|
||||
<td><font color="00FF00">%slots%</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Server UpTime:</td>
|
||||
<td><font color="00FF00">%serverUpTime%</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Server Time:</td>
|
||||
<td><font color="00FF00">%serverTime%</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Game Time:</td>
|
||||
<td><font color="00FF00">%gameTime% (%dayNight%)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pathfinding:</td>
|
||||
<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>
|
||||
<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>
|
||||
<td><font color="00FF00">%os_name%</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OS version:</td>
|
||||
<td><font color="00FF00">%os_ver%</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Server slots:</td>
|
||||
<td><font color="00FF00">%slots%</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Server UpTime:</td>
|
||||
<td><font color="00FF00">%serverUpTime%</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Server Time:</td>
|
||||
<td><font color="00FF00">%serverTime%</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Game Time:</td>
|
||||
<td><font color="00FF00">%gameTime% (%dayNight%)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pathfinding:</td>
|
||||
<td><font color="00FF00">%geodata%</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Varsak:<br>
|
||||
Have you ever looked closely at a dead man's face? The face of a living person constantly changes from one emotion to another. But it's different with dead people. Their face freezes at the moment of death. Some corpses look scared, some look amazed, but there are people who meet death calmly... It seems that you find this topic unpleasant. We will all die some day, so why avoid talking about death?<br>
|
||||
I've been around dead people since I was a child, so death doesn't faze me anymore. I come from a long line of <font color="LEVEL">undertakers<font>. But we haven't had a lot of business since the priests of Einhasad have started burning corpses. Nobody want to bury their dead anymore. It's viewed as an archaic custom, so very few people actually want to do that.<br>
|
||||
I've been around dead people since I was a child, so death doesn't faze me anymore. I come from a long line of <font color="LEVEL">undertakers</font>. But we haven't had a lot of business since the priests of Einhasad have started burning corpses. Nobody want to bury their dead anymore. It's viewed as an archaic custom, so very few people actually want to do that.<br>
|
||||
</body></html>
|
@@ -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>
|
@@ -1,5 +1,5 @@
|
||||
<html><body>Dual Class Master Raina:<br><br>
|
||||
You cannot get Dual Class at the time. Ask another question or return when the time comes.<br>
|
||||
|
||||
(Only characters of <font color="LEVEL">Lv. 85 or higher<font> can get a Dual Class.)
|
||||
(Only characters of <font color="LEVEL">Lv. 85 or higher</font> can get a Dual Class.)
|
||||
</body></html>
|
@@ -2,7 +2,7 @@
|
||||
Here is information about items that can be obtained after finishing mentee's training and in exchange for Mentee's Marks.<br>
|
||||
When you join a clan and complete a clan mission, you can receive Scroll: Enchant Atlas' Earring.<br>
|
||||
<table width=280 border=1 bgcolor="111111">
|
||||
<tr><td width=170 align=center><font color="LEVEL">Mentor's Reward<font></td></tr>
|
||||
<tr><td width=170 align=center><font color="LEVEL">Mentor's Reward</font></td></tr>
|
||||
<tr><td width=170 align=center>R-grade Soulshot</td></tr>
|
||||
<tr><td width=170 align=center>Blessed R-grade Spiritshot</td></tr>
|
||||
<tr><td width=170 align=center>Freya's Ice Rose</td></tr>
|
||||
@@ -16,7 +16,7 @@ When you join a clan and complete a clan mission, you can receive Scroll: Enchan
|
||||
<tr><td width=170 align=center>Atlas' Earring</td></tr>
|
||||
</table><br><br><br>
|
||||
<table width=280 border=1 bgcolor="111111">
|
||||
<tr><td width=160 align=center><font color="LEVEL">Items for Mentee's Marks<font></td></tr>
|
||||
<tr><td width=160 align=center><font color="LEVEL">Items for Mentee's Marks</font></td></tr>
|
||||
<tr><td width=160 align=center>Expert's Mask</td></tr>
|
||||
<tr><td width=160 align=center>Scroll: Enchant Expert's Mask</td></tr>
|
||||
<tr><td width=160 align=center>Freya's Ice Rose</td></tr>
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<html><body>Mentor Guide:<br>
|
||||
You can offer another character to be their Mentor by opening the <font color="LEVEL">Friend Manager<font> and pressing the <font color="LEVEL">+ button<font> in the <font color="LEVEL">Mentorship<font> tab.<br>
|
||||
You can offer another character to be their Mentor by opening the <font color="LEVEL">Friend Manager</font> and pressing the <font color="LEVEL">+ button</font> in the <font color="LEVEL">Mentorship</font> tab.<br>
|
||||
|
||||
For example, after becoming a Mentor in the Mentorship tab you can choose characters that would be your Mentees.<br>
|
||||
|
||||
Not every character can become a Mentor or a Mentee. A character can only become a <font color="LEVEL">Mentor<font> if they had already gone through <font color="LEVEL">Awakening<font> and reached <font color="LEVEL">Lv. 105<font>. A potential <font color="LEVEL">Mentee can't be higher that Lv.104<font>.<br1>
|
||||
Not every character can become a Mentor or a Mentee. A character can only become a <font color="LEVEL">Mentor</font> if they had already gone through <font color="LEVEL">Awakening</font> and reached <font color="LEVEL">Lv. 105</font>. A potential <font color="LEVEL">Mentee can't be higher that Lv.104</font>.<br1>
|
||||
After a Mentee finishes their Mentor can't take on new Mentees for a day. After discontinuing Mentorship for some other reason, a Mentor can't take on new Mentees for two days.<br>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest MentorGuide 33587-01.htm">Back</Button>
|
||||
</body></html>
|
@@ -1,11 +1,11 @@
|
||||
<html><body>Mentor Guide:<br>
|
||||
A mentor can take up to 3 mentees. Every time when a mentee levels up, their mentor gets <font color="LEVEL">Mentee's Marks<font> by mail. These marks can be traded for valuable items.<br>
|
||||
<font color="LEVEL">[The amount of Mentee's Marks for reaching different levels]<font><br1>
|
||||
A mentor can take up to 3 mentees. Every time when a mentee levels up, their mentor gets <font color="LEVEL">Mentee's Marks</font> by mail. These marks can be traded for valuable items.<br>
|
||||
<font color="LEVEL">[The amount of Mentee's Marks for reaching different levels]</font><br1>
|
||||
Lv. 85: 5000 <br1>
|
||||
Lv. 99: 10,000 <br1>
|
||||
Lv. 103: 25,000 <br1>
|
||||
Lv. 105: 60,000 <br>
|
||||
After taking your marks from a letter, don't forget to delete it. If your mailbox is full, you won't be able to receive new items.<br>
|
||||
If both the Mentor and the Mentee are playing at the same time, the former receives <font color="LEVEL">powerful buffs<font> while the latter <font color="LEVEL">gets a bonus to acquired XP/SP<font>.<br>
|
||||
If both the Mentor and the Mentee are playing at the same time, the former receives <font color="LEVEL">powerful buffs</font> while the latter <font color="LEVEL">gets a bonus to acquired XP/SP</font>.<br>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest MentorGuide 33587-01.htm">Back</Button>
|
||||
</body></html>
|
@@ -1,9 +1,9 @@
|
||||
<html><body>Mentor Guide:<br>
|
||||
<font color="LEVEL">1. The mentor buff is called Mentee's Appreciation<font>.<br1>
|
||||
<font color="LEVEL">1. The mentor buff is called Mentee's Appreciation</font>.<br1>
|
||||
It grants acquired XP/ SP +5% to the mentor. Applied only when mentee is logged in.<br>
|
||||
<font color="LEVEL">2. The mentee buff<font>.<br1>
|
||||
<font color="LEVEL">2. The mentee buff</font>.<br1>
|
||||
A mentee taught by a mentor gets 4 buffs of Melody, 3 buffs of Sonatas and 1 buff of Harmony. The buffs are activated when the mentor is logged in and remain 5 min. after his/ her log out.<br>
|
||||
<font color="LEVEL">3. The buff that summons mentor and enhances mentee's stats<font>.<br1>
|
||||
<font color="LEVEL">3. The buff that summons mentor and enhances mentee's stats</font>.<br1>
|
||||
Being a mentor you can teach your mentee useful skills.<br>
|
||||
However, it's very difficult to teach somebody if you are too far away. And so the mentee is granted a skill that allows them to teleport their mentor to themselves.<br>
|
||||
Mentee's Mentor Summon and Mentor's Art of Seduction can be found in the skill window, in the Clan/ Hero/ Mentorship Skills section.<br>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<html><body>High Prefect Drikus:<br>
|
||||
Basically, to become a Monk, your level must be at least 20 and you must pass the Test of the Monk.<br>
|
||||
To take the Test of the Monk, seek the Orc named <font color="LEVEL">Gantaki Zu Urutu of the Orc Village<font>. He will tell you everything you need to know. After you pass the test, come to me and I will change your class. Use the Gatekeeper to go to the Orc Village.<br>
|
||||
To take the Test of the Monk, seek the Orc named <font color="LEVEL">Gantaki Zu Urutu of the Orc Village</font>. He will tell you everything you need to know. After you pass the test, come to me and I will change your class. Use the Gatekeeper to go to the Orc Village.<br>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest ClassTransferTalk 30565-02.html">Back</Button>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>High Prefect Drikus:<br>
|
||||
To become an Orc Raider, the appropriate level and token are required. Your level must be at least 20 to qualify for a class transfer. You also need a token, to prove you have passed the Test of the Orc Raider.<br>
|
||||
However, it seems that your level is not high enough, and you have not yet passed the Test of the Orc Raider. First, work to raise your level to 20 or higher. To take the Test of the Orc Raider, go to <font color="LEVEL">Prefect Karukia of the Orc Village<font>. She will tell you everything you need to know. If you pass the test and come back, I will change your class. To get to the Orc Village, first go to Gludio, then use a Gatekeeper to go to the Orc Village.<br>
|
||||
However, it seems that your level is not high enough, and you have not yet passed the Test of the Orc Raider. First, work to raise your level to 20 or higher. To take the Test of the Orc Raider, go to <font color="LEVEL">Prefect Karukia of the Orc Village</font>. She will tell you everything you need to know. If you pass the test and come back, I will change your class. To get to the Orc Village, first go to Gludio, then use a Gatekeeper to go to the Orc Village.<br>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>High Prefect Drikus:<br>
|
||||
Basically, to be qualified for a Monk, your level must be at least 20 and you must pass the Test of the Monk.<br>
|
||||
However, it seems that your level is not high enough, and you have not yet passed the test of Monk. First, work to raise your level to 20 or higher. To take the Test of the Monk, seek the Orc named <font color="LEVEL">Gandaki Zu Urutu of the Orc village<font>. He will tell you everything you need to know. After you pass the test, come to me and I will change your profession. Use the Gatekeeper to go to the Orc village.<br>
|
||||
However, it seems that your level is not high enough, and you have not yet passed the test of Monk. First, work to raise your level to 20 or higher. To take the Test of the Monk, seek the Orc named <font color="LEVEL">Gandaki Zu Urutu of the Orc village</font>. He will tell you everything you need to know. After you pass the test, come to me and I will change your profession. Use the Gatekeeper to go to the Orc village.<br>
|
||||
</body></html>
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user