Small changes on server startup messages.
This commit is contained in:
@@ -188,8 +188,6 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
long serverLoadStart = System.currentTimeMillis();
|
long serverLoadStart = System.currentTimeMillis();
|
||||||
|
|
||||||
_log.info(getClass().getSimpleName() + ": Used memory: " + getUsedMemoryMB() + "MB");
|
|
||||||
|
|
||||||
if (!IdFactory.getInstance().isInitialized())
|
if (!IdFactory.getInstance().isInitialized())
|
||||||
{
|
{
|
||||||
_log.severe(getClass().getSimpleName() + ": Could not read object IDs from DB. Please check your data.");
|
_log.severe(getClass().getSimpleName() + ": Could not read object IDs from DB. Please check your data.");
|
||||||
@@ -281,12 +279,17 @@ public class GameServer
|
|||||||
ClanEntryManager.getInstance();
|
ClanEntryManager.getInstance();
|
||||||
|
|
||||||
printSection("Geodata");
|
printSection("Geodata");
|
||||||
|
long geodataMemory = getUsedMemoryMB();
|
||||||
GeoData.getInstance();
|
GeoData.getInstance();
|
||||||
|
|
||||||
if (Config.PATHFINDING > 0)
|
if (Config.PATHFINDING > 0)
|
||||||
{
|
{
|
||||||
PathFinding.getInstance();
|
PathFinding.getInstance();
|
||||||
}
|
}
|
||||||
|
geodataMemory -= getUsedMemoryMB();
|
||||||
|
if (geodataMemory < 0)
|
||||||
|
{
|
||||||
|
geodataMemory = 0;
|
||||||
|
}
|
||||||
|
|
||||||
printSection("NPCs");
|
printSection("NPCs");
|
||||||
SkillLearnData.getInstance();
|
SkillLearnData.getInstance();
|
||||||
@@ -422,13 +425,11 @@ public class GameServer
|
|||||||
_deadDetectThread = null;
|
_deadDetectThread = null;
|
||||||
}
|
}
|
||||||
System.gc();
|
System.gc();
|
||||||
// maxMemory is the upper limit the jvm can use, totalMemory the size of
|
final long totalMem = Runtime.getRuntime().maxMemory() / 1048576;
|
||||||
// the current allocation pool, freeMemory the unused memory in the allocation pool
|
_log.info(getClass().getSimpleName() + ": Started, using " + getUsedMemoryMB() + " of " + totalMem + " MB total memory.");
|
||||||
long freeMem = ((Runtime.getRuntime().maxMemory() - Runtime.getRuntime().totalMemory()) + Runtime.getRuntime().freeMemory()) / 1048576;
|
_log.info(getClass().getSimpleName() + ": Geodata use " + geodataMemory + " MB of memory.");
|
||||||
long totalMem = Runtime.getRuntime().maxMemory() / 1048576;
|
_log.info(getClass().getSimpleName() + ": Maximum number of connected players is " + Config.MAXIMUM_ONLINE_USERS + ".");
|
||||||
_log.info(getClass().getSimpleName() + ": Started, free memory " + freeMem + " Mb of " + totalMem + " Mb");
|
_log.info(getClass().getSimpleName() + ": Server loaded in " + ((System.currentTimeMillis() - serverLoadStart) / 1000) + " seconds.");
|
||||||
Toolkit.getDefaultToolkit().beep();
|
|
||||||
LoginServerThread.getInstance().start();
|
|
||||||
|
|
||||||
final SelectorConfig sc = new SelectorConfig();
|
final SelectorConfig sc = new SelectorConfig();
|
||||||
sc.MAX_READ_PER_PASS = Config.MMO_MAX_READ_PER_PASS;
|
sc.MAX_READ_PER_PASS = Config.MMO_MAX_READ_PER_PASS;
|
||||||
@@ -465,8 +466,8 @@ public class GameServer
|
|||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
_log.log(Level.INFO, getClass().getSimpleName() + ": Maximum numbers of connected players: " + Config.MAXIMUM_ONLINE_USERS);
|
LoginServerThread.getInstance().start();
|
||||||
_log.log(Level.INFO, getClass().getSimpleName() + ": Server loaded in " + ((System.currentTimeMillis() - serverLoadStart) / 1000) + " seconds.");
|
Toolkit.getDefaultToolkit().beep();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception
|
public static void main(String[] args) throws Exception
|
||||||
@@ -497,10 +498,6 @@ public class GameServer
|
|||||||
{
|
{
|
||||||
new Status(Server.serverMode).start();
|
new Status(Server.serverMode).start();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
_log.info(GameServer.class.getSimpleName() + ": Telnet server is currently disabled.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void printSection(String s)
|
public static void printSection(String s)
|
||||||
|
Reference in New Issue
Block a user